|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A reply session is used by a server to send a reply back to a client.
Method Summary | |
void |
close()
Closes the session, letting the associated resources be released or reused. |
Marshaller |
prepareExceptionReply()
Lets the target session write its own headers into a newly created message and returns it (exception case) |
Marshaller |
prepareLocationForwardReply()
Lets the target session write its own headers into a newly created message and returns it (location forward case) |
Marshaller |
prepareReply()
Lets the target session write its own headers into a newly created message and returns it (standard reply case) |
Marshaller |
prepareSystemExceptionReply()
Lets the target session write its own headers into a newly created message and returns it (system exception case) |
void |
send(Marshaller m)
Sends the reply down the protocol stack. |
Method Detail |
public Marshaller prepareReply() throws org.objectweb.jonathan.apis.kernel.JonathanException
An entity wishing to send a message as a reply to an invocation must not
create a marshaller on its own and directly
send
it down the protocol stack. Instead, it must
ask the session for a marshaller, into which the session will usually
already have written its specific headers.
The prepareException
method must only be used to prepare
messages corresponding to a non-exceptional reply from the server. If the
reply corresponds to an exception raised by the server, use
prepareExceptionReply
instead.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public Marshaller prepareExceptionReply() throws org.objectweb.jonathan.apis.kernel.JonathanException
An entity wishing to send a message as a reply to an invocation must not
create a marshaller on its own and directly
send
it down the protocol stack. Instead, it must
ask the session for a marshaller, into which the session will usually
already have written its specific headers.
The prepareExceptionReply
method must only be used to prepare
messages
corresponding to an exception raised by the server.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public Marshaller prepareSystemExceptionReply() throws org.objectweb.jonathan.apis.kernel.JonathanException
An entity wishing to send a message as a reply to an invocation must not
create a marshaller on its own and directly
send
it down the protocol stack. Instead, it must
ask the session for a marshaller, into which the session will usually
already have written its specific headers.
The prepareSystemExceptionReply
method must only be used to prepare
messages
corresponding to an system exception raised by the server.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public Marshaller prepareLocationForwardReply() throws org.objectweb.jonathan.apis.kernel.JonathanException
An entity wishing to send a message as a reply to an invocation must not
create a marshaller on its own and directly
send
it down the protocol stack. Instead, it must
ask the session for a marshaller, into which the session will usually
already have written its specific headers.
The prepareLocationForwardReply
method must only be used to prepare
messages corresponding to an location forward message raised by the server.
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public void send(Marshaller m) throws org.objectweb.jonathan.apis.kernel.JonathanException
The sent message must have been obtained by calling the
prepareReply
or
prepareExceptionReply
method.
It is the responsibility of the recipient of the message to
close
it.
m
- the message to send;
org.objectweb.jonathan.apis.kernel.JonathanException
- if something goes wrong.public void close()
Sessions may have an exclusive access to a communication resource. It is thus very important to ensure that they are properly closed if they are no longer in use.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |