The values of content handler ID, type, URL, and action are used to identify the content handler when invoked by {@link Registry#invoke Registry.invoke}. If an Invocation contains an ID then it is used to identify the content handler to be invoked. The other parameters are input to the content handler.
If a type is present, it is used to find handlers that support that type. The application should supply the type if it is known. If the type is not set, then calling the {@link #findType findType} will find the type using the URL to thecontent.
The status value indicates the next processing step of the invocation by the content handler. The status of an Invocation can be any of the following:
All status transitions occur only during method calls that involve the Invocation instance. The transitions that occur are specified in the methods that make the change visible. For example, when an invoking application creates a new Invocation, the status is {@link #INIT INIT}. When the application calls {@link Registry#invoke Registry.invoke}the status changes to {@link #WAITING WAITING}. When the Registry.getResponse
method is invoked, the status will be updated to the appropriate {@link #OK OK}, {@link #CANCELLED CANCELLED}, {@link #INITIATED INITIATED}, or {@link #ERROR ERROR} status from the content handler.
A content handler calls {@link ContentHandlerServer#getRequest ContentHandlerServer.getRequest}to get the next request. The request always has the {@link #ACTIVE ACTIVE} status.When the handler is finished acting on the content, the status is set to either {@link #OK OK}, {@link #CANCELLED CANCELLED}, or {@link #INITIATED INITIATED} bythe {@link ContentHandlerServer#finish ContentHandlerServer.finish} method.
If the handler is chaining, then the new Invocation follows the status transitions of invoke
as described above. The status of the previous invocation being chained from is set to {@link #HOLD HOLD}by the Registry.invoke
method. The status of the previous Invocation is restored to {@link #ACTIVE ACTIVE} by the{@link Registry#getResponse Registry.getResponse}method that returns the status for the new Invocation.
If the content handler application causes faults because it does not properly dequeue and respond to invocations as described in the {@link ContentHandler} class, then thestatus is set to {@link #ERROR ERROR} in the response queued backto the invoking application.
The implementation of the invocation mechanism may save or cache information about the request, the URL, the content type, or content during the invocation. The information may be utilized when the application accesses the content with the {@link #open open} method.The {@link #getURL} method MUST return the original URL unmodifiedby any implementation specific information.
INTERNAL: An Invocation
holds runtime argument values that are used by an {@link XRServiceAdapter} to invoke a named {@link Operation}
@author Mike Norman - michael.norman@oracle.com
@since EclipseLink 1.x
The heart of it is the payload map that can contain anything we then put readers on them. The first reader is this Invocation object that can interpret the data in it.
Essentially we can carry ANYTHING from the client to the server, we keep a series of of predefined variables and method calls to get at the pointers. But really it is just a repository of objects. @author Marc Fleury @author Christoph G. Jung @author Anil.Saldhana@redhat.com @version $Revision: 81030 $
Contains sequence number which should be globally unique and is used for verification in order.
Contains stack trace of invocation
The javadoc does not have lots of examples or documentation because its audience is different. Vast majority of users don't need to use the Invocation. It's mostly useful for other framework authors that extend Mockito. @since 1.9.5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|