|
Voyager ORB | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The IRequestHandler interface can be implemented to allow a Voyager host to
recognize and process application level protocols such as VRMP, IIOP, and even HTTP.
It is assumed that a request handler can recognize its protocol by scanning the incoming
stream, if not, it does nothing with the stream allowing for the next request handler
in line to process the incoming data.
Method Summary | |
boolean |
canProcess(java.io.InputStream stream)
Allows the request handler to scan the incoming stream and determine if it can handle the incoming protocol. Typically the header size would be read from the stream and compared to the tag. |
int |
getHeaderSize()
The size in bytes of the expected tag or bytes on the stream. |
java.lang.String |
getTag()
A String representation of the first bytes that uniquely identify the incoming data stream as being a particular protocol. |
void |
process(ITransportConnection connection,
java.io.InputStream stream)
If canProcess() returns true, this method is immediately called to handle
the incoming data stream. |
Method Detail |
public java.lang.String getTag()
public int getHeaderSize()
public boolean canProcess(java.io.InputStream stream) throws java.io.IOException
public void process(ITransportConnection connection, java.io.InputStream stream) throws java.io.IOException
canProcess()
returns true, this method is immediately called to handle
the incoming data stream. Note that the first "header size" bytes will already have
been read by the canProcess()
method.
|
ObjectSpace Inc. | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |