|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Registry of output 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(); OutputSequenceRegistry registry = factory.getOutputSequenceRegistry(); // load persistent sequence or create a new one (if it was not stored yet) OutputSequence sequence = registry.loadSequence(PERSISTENT_SEQUENCE_PREFIX, sc); if (sequence == null) { sequence = registry.createSequence(PERSISTENT_SEQUENCE_PREFIX, sc, true); }
Method Summary | |
OutputSequence |
createSequence(ServiceClient serviceClient)
Returns a newly created sequence with a uniquely generated id . |
OutputSequence |
createSequence(java.lang.String id,
ServiceClient serviceClient)
Returns a newly created sequence with a unique id . |
OutputSequence |
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. |
OutputSequence |
getSequence(java.lang.String id)
Returns an existing sequence or null if this sequence does not exist. |
OutputSequence[] |
getSequences()
Returns all existing sequences. |
OutputSequence[] |
getSequences(java.lang.String prefix)
Returns existing sequences whose ids start with the provided prefix. |
OutputSequence |
loadSequence(java.lang.String id,
ServiceClient serviceClient)
Returns a sequence loaded from the persistent store and associates it with the provided ServiceClient . |
OutputSequence[] |
loadSequences(ServiceClient serviceClient)
Returns all existing sequences and associates them with the provided ServiceClient . |
OutputSequence[] |
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 OutputSequence createSequence(ServiceClient serviceClient) throws SequenceException
id
. The
sequence is associated with the provided ServiceClient
.
SequenceException
public OutputSequence createSequence(java.lang.String id, ServiceClient serviceClient) throws SequenceException
id
. The
sequence is associated with the provided ServiceClient
.
id
- the unique id.
SequenceException
- when non-unique id is provided.public OutputSequence 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
.
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 OutputSequence 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 OutputSequence loadSequence(java.lang.String id, ServiceClient serviceClient) throws SequenceException
ServiceClient
.
SequenceException
public OutputSequence[] 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 OutputSequence[] loadSequences(java.lang.String prefix, ServiceClient serviceClient) throws SequenceException
ServiceClient
.
prefix
- ids of returned sequences start with this prefix.
SequenceException
public OutputSequence[] getSequences() throws SequenceException
ServiceClient
).
SequenceException
- when the returned sequences have not been associated with ServiceClient
.loadSequences(org.systinet.wasp.webservice.ServiceClient)
public OutputSequence[] 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 |