|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Ancestor of one-way sequences. These sequences are created and their WS-RM id (aka wireId) sent during
reliable communication. There are two kinds of a one-way sequence: OutputSequence
and
InputSequence
.
Nested Class Summary | |
static class |
OneWaySequence.MessageState
Enumeration representing the state of a single message in a sequence. |
static class |
OneWaySequence.State
Enumeration representing a sequence state. |
Field Summary | |
static int |
UNKNOWN_LENGTH
Unknown sequence length or message number. |
Method Summary | |
void |
abort()
Aborts this sequence immediately; sequence gets to final OneWaySequence.State.BROKEN
state and no more messages can be sent within it. |
java.util.Date |
getExpires()
Returns the date when this sequence expires or null
when it was not specified. |
long |
getLength()
Returns the length of this sequence or UNKNOWN_LENGTH if the length is not known yet. |
OneWaySequence.MessageState |
getMessageState(long messageNumber)
Returns the state of a message with the given message number (within this sequence). |
OneWaySequence.State |
getState()
Returns the current state of this sequence. |
java.lang.String |
getWireId()
WS-RM id that is sent on the wire. |
boolean |
isActive()
Determines whether this sequence is in active state and should be used in processing. |
boolean |
isExpired()
Determines, whether this sequence has expired. |
boolean |
isOutput()
Returns true if this sequence is an output sequence. |
void |
setActive(boolean active)
Sets this sequence to the active or inactive state. |
Methods inherited from interface org.systinet.wasp.wsrm.sequence.Sequence |
getID, setExpires |
Field Detail |
public static final int UNKNOWN_LENGTH
Method Detail |
public boolean isOutput()
true
if this sequence is an output sequence.
public java.lang.String getWireId()
public java.util.Date getExpires()
null
when it was not specified.
public long getLength()
UNKNOWN_LENGTH
if the length is not known yet.
The length of the output sequence is known either when it is explicitly set
by OutputSequence.setLength(long)
or when the method OutputSequence.finish()
is called.
In the latter case, an empty message marked as last is sent.
UNKNOWN_LENGTH
if the
length can not be determined (yet).public OneWaySequence.State getState()
OneWaySequence.State
public OneWaySequence.MessageState getMessageState(long messageNumber) throws SequenceException
state
of the message.
SequenceException
- if something goes wrong.InputSequence.getCurrentMessageNumber()
,
OneWaySequence.MessageState
public boolean isExpired()
getState()
).
true
if this sequence has expired (and so no more messages
can be sent or received within it)public void setActive(boolean active) throws SequenceException
ServiceClient
/ ServiceEndpoint
.
It is useful when there are several pending sequences
at one time. Each newly created OneWaySequence
is set active by default deactivating all
other competing sequences (all sequences attached to one ServiceClient
or ServiceEndpoint
.
SequenceException
public boolean isActive()
public void abort() throws SequenceException
OneWaySequence.State.BROKEN
state and no more messages can be sent within it. There is no guarantee,
which of those messages being in OneWaySequence.MessageState.NOT_DELIVERED
state will
be delivered after this sequence has been aborted.
SequenceException
- if sequence is expired or sequence is in OneWaySequence.State.BROKEN
state or some DB operation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |