/** * This method retrieves the Client Side Policy set/configured for this * HTTPConduit. */ public HTTPClientPolicy getClient() { updateClientPolicy(); return clientSidePolicy; }
private void updateClientPolicy() { if (!clientSidePolicyCalced) { //do no spend time on building Message and Exchange (which basically //are ConcurrentHashMap instances) if the policy is already available Message m = new MessageImpl(); m.setExchange(new ExchangeImpl()); m.getExchange().put(EndpointInfo.class, this.endpointInfo); updateClientPolicy(m); } }
public HTTPClientPolicy getClient(Message message) { ClientPolicyCalculator cpc = new ClientPolicyCalculator(); HTTPClientPolicy pol = message.get(HTTPClientPolicy.class); updateClientPolicy(message); if (pol != null) { pol = cpc.intersect(pol, clientSidePolicy); } else { pol = clientSidePolicy; } PolicyDataEngine policyDataEngine = bus.getExtension(PolicyDataEngine.class); if (policyDataEngine == null) { return pol; } return policyDataEngine.getPolicy(message, pol, cpc); }
/** * This method retrieves the Client Side Policy set/configured for this * HTTPConduit. */ public HTTPClientPolicy getClient() { updateClientPolicy(); return clientSidePolicy; }
/** * Constructor * * @param b the associated Bus. * @param endpoint the endpoint info of the initiator. * @param t the endpoint reference of the target. * @throws IOException */ public HTTPConduit(Bus b, EndpointInfo ei, EndpointReferenceType t) throws IOException { super(getTargetReference(ei, t, b)); bus = b; endpointInfo = ei; if (t != null) { fromEndpointReferenceType = true; } proxyFactory = new ProxyFactory(); cookies = new Cookies(); updateClientPolicy(); }
private void updateClientPolicy() { if (!clientSidePolicyCalced) { //do no spend time on building Message and Exchange (which basically //are ConcurrentHashMap instances) if the policy is already available Message m = new MessageImpl(); m.setExchange(new ExchangeImpl()); m.getExchange().put(EndpointInfo.class, this.endpointInfo); updateClientPolicy(m); } }
public HTTPClientPolicy getClient(Message message) { ClientPolicyCalculator cpc = new ClientPolicyCalculator(); HTTPClientPolicy pol = message.get(HTTPClientPolicy.class); updateClientPolicy(message); if (pol != null) { pol = cpc.intersect(pol, clientSidePolicy); } else { pol = clientSidePolicy; } PolicyDataEngine policyDataEngine = bus.getExtension(PolicyDataEngine.class); if (policyDataEngine == null) { return pol; } return policyDataEngine.getPolicy(message, pol, cpc); }