FileDocCategorySizeDatePackage
ClientPipeCreator.javaAPI DocGlassfish v2 API4086Tue Jul 24 05:01:34 BST 2007com.sun.enterprise.webservice

ClientPipeCreator

public class ClientPipeCreator extends com.sun.xml.ws.assembler.ClientPipelineHook
This is used by WSClientContainer to return proper 196 security pipe to the StandAlonePipeAssembler and TangoPipeAssembler

Fields Summary
private com.sun.enterprise.deployment.ServiceReferenceDescriptor
svcRef
Constructors Summary
public ClientPipeCreator()

    
     
    
public ClientPipeCreator(com.sun.enterprise.deployment.ServiceReferenceDescriptor ref)

        svcRef = ref;
    
Methods Summary
public com.sun.xml.ws.api.pipe.PipecreateSecurityPipe(com.sun.xml.ws.policy.PolicyMap map, com.sun.xml.ws.api.pipe.ClientPipeAssemblerContext ctxt, com.sun.xml.ws.api.pipe.Pipe tail)

        HashMap propBag = new HashMap();
        propBag.put(PipeConstants.POLICY, map);
        propBag.put(PipeConstants.WSDL_MODEL, ctxt.getWsdlModel());
        propBag.put(PipeConstants.SERVICE, ctxt.getService());
        propBag.put(PipeConstants.BINDING, ctxt.getBinding());
        propBag.put(PipeConstants.ENDPOINT_ADDRESS, ctxt.getAddress());
        propBag.put(PipeConstants.SERVICE_REF, svcRef);
	propBag.put(PipeConstants.NEXT_PIPE,tail);
        ClientSecurityPipe ret = new ClientSecurityPipe(propBag, tail);
        AuthConfigRegistrationWrapper listenerWrapper = ClientPipeCloser.getInstance().lookupListenerWrapper(svcRef);
        //there is a 1-1 mapping between Service_Ref and a ListenerWrapper
        if (listenerWrapper != null) {
            //override the listener that was created by the ConfigHelper CTOR :if one was already registered
            listenerWrapper.incrementReference();
            ret.getPipeHelper().setRegistrationWrapper(listenerWrapper);
        } else {
            //register a new listener
            ClientPipeCloser.getInstance().registerListenerWrapper(
                    svcRef, ret.getPipeHelper().getRegistrationWrapper());
        }
  
        return ret;