FileDocCategorySizeDatePackage
ClientSequenceFactory.javaAPI DocExample4436Tue May 29 16:56:30 BST 2007com.sun.xml.ws.api.rm.client

ClientSequenceFactory

public class ClientSequenceFactory extends Object
Factory used by clients who need to provide their own sequences for use by the RMClient runtime. Typically, the client application is maintaining its own persistent store of sent messages and needs to monitor their acknowledgements.

Fields Summary
Constructors Summary
private ClientSequenceFactory()

    
Methods Summary
public static ClientSequencecreateSequence(javax.xml.ws.Service service, javax.xml.namespace.QName portName)
Establishes a new session with the endpoint. The returned (@link ClientSequence} can be specified for use by one or more client instances connected to the endpoint by setting it as the value of the com.sun.xml.rm.session property.

param
service The JAX-WS service representing the service.
param
portName The name of the endpoint.
return
The ClientSequence obtained by sending a RM Protol CreateSequence message to the endpoint. Returns null if the sequence creation fails.

        return RMSource.getRMSource()
            .createSequence(service, portName);
    
public static ClientSequencecreateSequence(javax.xml.ws.Service service, javax.xml.namespace.QName portName, com.sun.xml.ws.api.rm.SequenceSettings settings)
Re-establishes a session using persisted data from an existing session.

param
service The JAX-WS service representing the service.
param
portName The name of the endpoint.
return
The ClientSequence obtained by sending a RM Protol CreateSequence message to the endpoint and replacing its state with the state saved previously from another session with the same endpoint. Returns null is sequence creation fails.

        return RMSource.getRMSource()
            .createSequence(service, portName, 
                settings.sequenceId, settings.companionSequenceId);