|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Registry of duplex sequences
.
Typical use of this registry is shown as follows:
ServiceClient sc = ServiceClient.create(WSDL_URL); Service service = (Service) sc.createProxy(Service.class); RegistryFactory factory = RegistryFactory.getInstance(); DuplexSequenceRegistry registry = factory.getDuplexSequenceRegistry(); // load persistent sequence or create a new one (if it was not stored yet) DuplexSequence sequence = registry.loadSequence(PERSISTENT_SEQUENCE_PREFIX, sc); if (sequence == null) { sequence = registry.createSequence(PERSISTENT_SEQUENCE_PREFIX, sc, true); } OutputSequence outputSequence = sequence.getOutputSequence(); InputSequence inputSequence = sequence.getInputSequence();
Method Summary | |
DuplexSequence |
createSequence(ServiceClient serviceClient)
Returns a newly created sequence with a uniquely generated id . |
DuplexSequence |
createSequence(java.lang.String id,
ServiceClient serviceClient)
Returns a newly created sequence with a unique id . |
DuplexSequence |
createSequence(java.lang.String prefix,
ServiceClient serviceClient,
boolean generateSuffix)
Returns a newly created sequence with a unique id that begins with
the provided prefix and ends with a uniquely generated suffix. |
DuplexSequence |
getSequence(java.lang.String id)
Returns an existing sequence or null if this sequence does not exist. |
DuplexSequence[] |
getSequences()
Returns all existing sequences. |
DuplexSequence[] |
getSequences(java.lang.String prefix)
Returns existing sequences whose ids start with the provided prefix. |
DuplexSequence |
loadSequence(java.lang.String id,
ServiceClient serviceClient)
Returns a sequence loaded from the persistent store and associates it with the provided ServiceClient . |
DuplexSequence[] |
loadSequences(ServiceClient serviceClient)
Returns all existing sequences and associates them with the provided ServiceClient . |
DuplexSequence[] |
loadSequences(java.lang.String prefix,
ServiceClient serviceClient)
Returns existing sequences whose ids start with the provided prefix and associates them with the provided ServiceClient . |
Method Detail |
public DuplexSequence createSequence(ServiceClient serviceClient) throws SequenceException
id
. The
sequence is associated with the provided ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
SequenceException
public DuplexSequence createSequence(java.lang.String id, ServiceClient serviceClient) throws SequenceException
id
. The
sequence is associated with the provided ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
id
- the unique id.
SequenceException
- when non-unique id is provided.public DuplexSequence createSequence(java.lang.String prefix, ServiceClient serviceClient, boolean generateSuffix) throws SequenceException
id
that begins with
the provided prefix and ends with a uniquely generated suffix. The
sequence is associated with the provided ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
prefix
- beginning of the sequence id.generateSuffix
- if false no suffix is added to the sequence id.
SequenceException
- when non-unique id is provided.public DuplexSequence getSequence(java.lang.String id) throws SequenceException
null
if this sequence does not exist.
This must be called for the second and other times (when this sequence has already been associated with
a ServiceClient
).
SequenceException
- when the returned sequence has not been associated with ServiceClient
.loadSequence(String, org.systinet.wasp.webservice.ServiceClient)
public DuplexSequence loadSequence(java.lang.String id, ServiceClient serviceClient) throws SequenceException
ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
SequenceException
public DuplexSequence[] getSequences(java.lang.String prefix) throws SequenceException
ServiceClient
).
prefix
- ids of returned sequences start with this prefix.
SequenceException
- when the returned sequences have not been associated with ServiceClient
.loadSequences(String, org.systinet.wasp.webservice.ServiceClient)
public DuplexSequence[] loadSequences(java.lang.String prefix, ServiceClient serviceClient) throws SequenceException
ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
prefix
- ids of returned sequences start with this prefix.
SequenceException
public DuplexSequence[] getSequences() throws SequenceException
ServiceClient
).
SequenceException
- when the returned sequences have not been associated with ServiceClient
.loadSequences(org.systinet.wasp.webservice.ServiceClient)
public DuplexSequence[] loadSequences(ServiceClient serviceClient) throws SequenceException
ServiceClient
.
ServiceClient.setAsyncEndpointPath(String)
).
SequenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |