|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.support.RemoteInvocationResult
public class RemoteInvocationResult
Encapsulates a remote invocation result, holding a result value or an exception. Used for HTTP-based serialization invokers.
This is an SPI class, typically not used directly by applications. Can be subclassed for additional invocation parameters.
RemoteInvocation
,
Serialized FormField Summary | |
---|---|
private java.lang.Throwable |
exception
|
private static long |
serialVersionUID
Use serialVersionUID from Spring 1.1 for interoperability |
private java.lang.Object |
value
|
Constructor Summary | |
---|---|
RemoteInvocationResult(java.lang.Object value)
Create a new RemoteInvocationResult for the given result value. |
|
RemoteInvocationResult(java.lang.Throwable exception)
Create a new RemoteInvocationResult for the given exception. |
Method Summary | |
---|---|
java.lang.Throwable |
getException()
Return the exception thrown by an unsuccessful invocation of the target method, if any. |
java.lang.Object |
getValue()
Return the result value returned by a successful invocation of the target method, if any. |
boolean |
hasException()
Return whether this invocation result holds an exception. |
boolean |
hasInvocationTargetException()
Return whether this invocation result holds an InvocationTargetException, thrown by an invocation of the target method itself. |
java.lang.Object |
recreate()
Recreate the invocation result, either returning the result value in case of a successful invocation of the target method, or rethrowing the exception thrown by the target method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.Object value
private java.lang.Throwable exception
Constructor Detail |
---|
public RemoteInvocationResult(java.lang.Object value)
value
- the result value returned by a successful invocation
of the target methodpublic RemoteInvocationResult(java.lang.Throwable exception)
exception
- the exception thrown by an unsuccessful invocation
of the target methodMethod Detail |
---|
public java.lang.Object getValue()
hasException()
public java.lang.Throwable getException()
hasException()
public boolean hasException()
false
, the result value applies
(even if null
).
getValue()
,
getException()
public boolean hasInvocationTargetException()
hasException()
public java.lang.Object recreate() throws java.lang.Throwable
java.lang.Throwable
- the exception, if any
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |