|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface through which session input and output streams can be written to and read from.
Method Summary | |
java.lang.Object |
getBlock(SessionStreamID id)
Gets the next block of data available from the specified session output stream. |
java.lang.Object |
getFully(SessionStreamID id)
Gets an aggregate of all the data from the specified session output stream. |
java.lang.Object |
getNBlocks(SessionStreamID id,
int numberOfBlocks)
Gets an aggregate of a number of available blocks of data from a session output stream. |
boolean |
hasInput(SessionStreamID id)
Determines whether or not an input stream with the specified identity exists and is open for writing to. |
boolean |
hasOutput(SessionStreamID id)
Determines whether or not an output stream with the specified identity exists. |
boolean |
hasSession(SessionID id)
Determines whether or not a session with the specified identity exists. |
void |
putBlock(SessionStreamID id,
java.lang.Object data)
Puts a block of data onto a specified session stream. |
void |
putFully(SessionStreamID id,
java.lang.Object data)
Puts a block containing all the input data for a specified session stream into the stream and then closes the stream for further input. |
Method Detail |
public boolean hasSession(SessionID id) throws SessionLookupException
id
- The session identifier.
true
if the session exists
otherwise false
.
SessionLookupException
- if there is a problem in accessing
the session.public boolean hasInput(SessionStreamID id) throws SessionNotFoundException, SessionLookupException
id
- The session stream identifier for the input stream.
true
if the stream exists and is open,
otherwise false
.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.public boolean hasOutput(SessionStreamID id) throws SessionNotFoundException, SessionLookupException
If it exists but contains no more data then a
EngineConstants.NO_MORE_DATA
block will be
returned from the getBlock
and
getNBlocks
methods.
id
- The session stream identifier for the output stream.
true
if the stream exists and is open,
otherwise false
.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.public java.lang.Object getBlock(SessionStreamID id) throws SessionNotFoundException, SessionLookupException, SessionStreamNotFoundException, SessionStreamRequestNotProcessingException, SessionStreamIOException
To indicate to the caller that no more data is available, a
no-more-data block - a qualified name
{http://ogsadai.org.uk/namespaces/2005/10/properties}NoMoreData
(see the constant
uk.org.ogsadai.engine.EngineConstants.NO_MORE_DATA
)
can be expected to be provided by this method after retrieval
of the final block of data.
id
- The session stream identifier.
Object
containing a single block of
data.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.
SessionStreamNotFoundException
- if there is no such
session or no such stream in the session.
SessionStreamRequestNotProcessingException
- if the request
to which the stream belongs has not started processing.
SessionStreamIOException
- if there is a problem when
reading from the specified session stream.public java.lang.Object getFully(SessionStreamID id) throws SessionNotFoundException, SessionLookupException, SessionStreamNotFoundException, SessionStreamRequestNotProcessingException, SessionStreamIOException
id
- The session stream identifier
Object
containing an aggregate of all the
blocks of data.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.
SessionStreamNotFoundException
- if there is no such
session or no such stream in the session.
SessionStreamRequestNotProcessingException
- if the request
to which the stream belongs has not started processing.
SessionStreamIOException
- if there is a problem when
reading from the specified session stream.public java.lang.Object getNBlocks(SessionStreamID id, int numberOfBlocks) throws SessionNotFoundException, SessionLookupException, SessionStreamNotFoundException, SessionStreamRequestNotProcessingException, SessionStreamIOException
To indicate to the caller that no more data is available, a
no-more-data block - a qualified name
{http://ogsadai.org.uk/namespaces/2005/10/properties}NoMoreData
(see the constant
uk.org.ogsadai.engine.EngineConstants.NO_MORE_DATA
)
can be expected to be provided by this method after retrieval
of the final block of data.
id
- The session stream identifier.numberOfBlocks
- The number of blocks to attempt to aggregate. If less than
this number are contained in the stream then an aggregate of
the maximum available will be returned.
Object
containing an aggregate of a number of
blocks of data.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.
SessionStreamNotFoundException
- if there is no such
session or no such stream in the session.
SessionStreamRequestNotProcessingException
- if the request
to which the stream belongs has not started processing.
SessionStreamIOException
- if there is a problem when
reading from the specified session stream.public void putBlock(SessionStreamID id, java.lang.Object data) throws SessionNotFoundException, SessionLookupException, SessionStreamNotFoundException, SessionStreamRequestNotProcessingException, SessionStreamClosedException
To indicate that no more data is available, a no-more-data
block - a qualified name
{"http://ogsadai.org.uk/namespaces/2005/10/properties"}NoMoreData
(see the constant
uk.org.ogsadai.engine.EngineConstants.NO_MORE_DATA
)
should be provided to this method after putting the final block
of data.
id
- The session stream identifier.data
- The block of data.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.
SessionStreamNotFoundException
- if there is no such
session or no such stream in the session.
SessionStreamRequestNotProcessingException
- if the request
to which the stream belongs has not started processing.
SessionStreamClosedException
- if the stream has already
been closed via provision of a no-more-data block.public void putFully(SessionStreamID id, java.lang.Object data) throws SessionNotFoundException, SessionLookupException, SessionStreamNotFoundException, SessionStreamRequestNotProcessingException, SessionStreamClosedException
id
- The session stream identifier.data
- The block containing all the data for the stream.
SessionNotFoundException
- if the session in id
does not exist.
SessionLookupException
- if there is a problem in accessing
the session.
SessionStreamNotFoundException
- if there is no such
session or no such stream in the session.
SessionStreamRequestNotProcessingException
- if the request
to which the stream belongs has not started processing.
SessionStreamClosedException
- if the stream has already
been closed via provision of a no-more-data block.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |