org.systinet.wasp.wsrm.sequence
Interface OutputSequence
- All Superinterfaces:
- OneWaySequence, Sequence
- public interface OutputSequence
- extends OneWaySequence
Used for one-way invocation or for sending messages in request-response pattern.
- Since:
- SSJ 6.5
- Component:
- WS Reliable Messaging Interfaces
Method Summary |
void |
finish()
Closes this sequence. |
long |
getCurrentLength()
Returns the number of messages in this (possibly open ) sequence. |
void |
setLength(long length)
Sets the length of this output sequence. |
getCurrentLength
public long getCurrentLength()
- Returns the number of messages in this (possibly
open
) sequence.
Use when getting
an incomplete output sequence
and wanting to know how many messages has already been sent.
Note that the returned value denotes the number
of messages already processed. Since
messages are usually processed asynchronously, care should be taken
not to use it in situations where it is unclear how many unprocessed messages
are pending.
- Returns:
- number of messages in a sequence. In case of a complete sequence, it is
equal to
OneWaySequence.getLength()
.
setLength
public void setLength(long length)
throws SequenceException
- Sets the length of this output sequence. The length
can be also set by calling method
finish()
. In such a case, the sequence
length is set to the current sequence length
incremented
by one and an empty message (marked as last) is sent.
Please note that
- the
length
must always be greater than the number
of messages already sent in the sequence.
- this method cannot be called for more times unless setting the same or less value.
- Throws:
SequenceException
finish
public void finish()
throws SequenceException
- Closes this sequence. In case that the sequence length has not been already set or
has been set to a larger number than is the number of currently sent messages, it also
sends an empty message (marked as last) denoting end of this sequence.
- Throws:
SequenceException