|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tibco.bw.poa.runtime.ReturnWrapper<N>
public class ReturnWrapper<N>
This class wraps an object of a particular ReturnWrapper.WrappedType
.
This class is used by asynchronous advice implementations to wrap the response object that gets generated on the advice thread. For more
information see AdviceController.setReady(ReturnWrapper)
.
The constructor is not exposed; instead use one of the following static methods to create an instance of ReturnWrapper
:
wrapObject(Object)
wrapException(AspectException)
#wrapXmlNode(N)
ReturnWrapper
, first, ensure that the wrapped object is of the
desired type by calling getWrappedType()
; then call the appropriate accessor method:
AsyncAdvice
,
AdviceController
Nested Class Summary | |
---|---|
static class |
ReturnWrapper.WrappedType
Indicates the type of the wrapped object |
Method Summary | ||
---|---|---|
AspectException |
getException()
Returns the wrapped AspectException |
|
java.lang.Object |
getObject()
Returns the wrapped object |
|
ReturnWrapper.WrappedType |
getWrappedType()
Returns the WrappedType enum indicating the type of the wrapped object |
|
N |
getXmlNode()
Returns the wrapped XML node |
|
static
|
wrapException(AspectException ex)
Creates a ReturnWrapper instance containing an AspectException and a WrappedType of
WrappedType.EXCEPTION |
|
static
|
wrapObject(java.lang.Object obj)
Creates a ReturnWrapper instance containing an object and a WrappedType of WrappedType.OBJECT |
|
static
|
wrapXmlNode(N node)
Creates a ReturnWrapper instance containing an XML node of type N and a WrappedType of
WrappedType.XML_NODE |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <N> ReturnWrapper<N> wrapObject(java.lang.Object obj)
ReturnWrapper
instance containing an object and a WrappedType
of WrappedType.OBJECT
N
- the node type parameterobj
- the object to wrap
public static <N> ReturnWrapper<N> wrapException(AspectException ex)
ReturnWrapper
instance containing an AspectException
and a WrappedType
of
WrappedType.EXCEPTION
N
- the node type parameterex
- the exception to wrap
public static <N> ReturnWrapper<N> wrapXmlNode(N node)
ReturnWrapper
instance containing an XML node of type N
and a WrappedType
of
WrappedType.XML_NODE
N
- the node type parameternode
- the node to wrap
public ReturnWrapper.WrappedType getWrappedType()
WrappedType
enum indicating the type of the wrapped object
public AspectException getException()
java.lang.IllegalStateException
- if wrapped item is not an AspectException
and the ReturnWrapper
instance was not created with the wrapException
methodpublic java.lang.Object getObject()
java.lang.IllegalStateException
- if wrapped item is not an Object
and the ReturnWrapper
instance was not created with the wrapObject
methodpublic N getXmlNode()
java.lang.IllegalStateException
- if wrapped item is not an N
and the ReturnWrapper
instance was not created with the wrapXmlNode
method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |