|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.jms.net.connector.Response
public class Response
A Response
wraps the result of a remote method invocation
Request
,
Connection
,
Serialized FormConstructor Summary | |
---|---|
Response(java.lang.Object object,
java.lang.reflect.Method method)
Construct a new Response for a successful invocation |
|
Response(java.lang.Throwable exception)
Construct a new Response for a failed invocation |
Method Summary | |
---|---|
java.lang.Throwable |
getException()
Returns the exception generated by the invocation |
java.lang.Object |
getObject()
Returns the result of the invocation |
boolean |
isException()
Determines if the response is an exception |
boolean |
isReturn()
Determines if the response is a successful return |
static Response |
read(java.io.ObjectInput in,
java.lang.reflect.Method method)
Read a response from a stream |
void |
write(java.io.ObjectOutput out)
Writes this to a stream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Response(java.lang.Object object, java.lang.reflect.Method method)
Response
for a successful invocation
object
- the result of the invocationmethod
- the invoked methodpublic Response(java.lang.Throwable exception)
Response
for a failed invocation
exception
- the exception generated by the invocationMethod Detail |
---|
public java.lang.Object getObject()
public java.lang.Throwable getException()
null
if no exception was thrownpublic boolean isReturn()
true
if the response is a successful returnpublic boolean isException()
true
if the response is an exceptionpublic void write(java.io.ObjectOutput out) throws java.io.IOException
out
- the stream to write to
java.io.IOException
- if an I/O error occurspublic static Response read(java.io.ObjectInput in, java.lang.reflect.Method method) throws java.lang.ClassNotFoundException, java.io.IOException
in
- the stream to read frommethod
- the method that the response relates to
java.lang.ClassNotFoundException
- if the response contains a class which
can't be found
java.io.IOException
- if an I/O error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |