public class InvokeConfig
extends java.lang.Object
implements java.io.Externalizable
The final call can be delegated to ControlFlowOps.invoke(InvokeConfig)
.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
arguments
The arguments for this call.
|
private handle |
asyncHandle
The handle where to pass back the reference to the
async resource . |
private boolean |
asynchronous
Flag indicating if ASYNCHRONOUS option is present.
|
private java.lang.String |
clientContextId
The value of the
OERequestInfo: field. |
private byte[] |
clientPrincipal
The value of the
OERequestInfo:clientPrincipal field. |
private java.lang.String |
clientType
The value of the
OERequestInfo:clientType field. |
private boolean |
dynamicFunction
Flag indicating if this is a DYNAMIC-FUNCTION call.
|
private character |
eventProcedure
This represents the name of the internal procedure for the EVENT-PROCEDURE clause, null if
this clause is not specified.
|
private handle |
eventProcedureContext
The handle to a procedure in which context the specified EVENT-PROCEDURE internal procedure
is found, null if EVENT-PROCEDURE clause is not specified.
|
private static int |
FIELD_ARGS
Constant to identify field
arguments during serialization. |
private static int |
FIELD_ASYNC
Constant to identify field
asynchronous during serialization. |
private static int |
FIELD_ASYNC_HANDLE
Constant to identify field
asyncHandle during serialization. |
private static int |
FIELD_CLIENTCONTEXTID
Constant to identify field
clientContextId during serialization. |
private static int |
FIELD_CLIENTPRINCIPAL
Constant to identify field
clientPrincipal during serialization. |
private static int |
FIELD_CLIENTTYPE
Constant to identify field
clientType during serialization. |
private static int |
FIELD_DYN_FUNC
Constant to identify field
dynamicFunction during serialization. |
private static int |
FIELD_EVT_PROC
Constant to identify field
eventProcedure during serialization. |
private static int |
FIELD_EVT_PROC_CONTEXT
Constant to identify field
eventProcedureContext during serialization. |
private static int |
FIELD_FUNCTION
Constant to identify field
function during serialization. |
private static int |
FIELD_IN_HANDLE
Constant to identify field
inHandle during serialization. |
private static int |
FIELD_IS_CLASS
Constant to identify field
isClass during serialization. |
private static int |
FIELD_MODES
Constant to identify field
modes during serialization. |
private static int |
FIELD_PERSISTENT
Constant to identify field
persistent during serialization. |
private static int |
FIELD_PORT_HANDLE
Constant to identify field
portHandle during serialization. |
private static int |
FIELD_PROC_HANDLE
Constant to identify field
procedureHandle during serialization. |
private static int |
FIELD_REQUESTID
Constant to identify field
requestId during serialization. |
private static int |
FIELD_RETURN_VALUE
Constant to identify field
returnValue during serialization. |
private static int |
FIELD_SERVER_HANDLE
Constant to identify field
serverHandle during serialization. |
private static int |
FIELD_SINGLE_RUN
Constant to identify field
singleRun during serialization. |
private static int |
FIELD_SINGLETON
Constant to identify field
singleton during serialization. |
private static int |
FIELD_SUPER_CALL
Constant to identify field
superCall during serialization. |
private static int |
FIELD_TX_DISTINCT
Constant to identify field
transactionDistinct during serialization. |
private static int |
FIELD_VERSIONINFO
Constant to identify field
versionInfo during serialization. |
private static int |
FIELD_WEB_SERVICE_TOKEN
Constant to identify field
webServiceToken during serialization. |
private boolean |
function
Flag indicating if this is a function or procedure call.
|
private handle |
inHandle
When specified, it will mean the target will be a function or internal procedure, using
the given procedure handle as a start.
|
private boolean |
isClass
Flag indicating that this is a legacy OO class.
|
private java.lang.String |
modes
A string representation of the modes of each parameter.
|
private boolean |
persistent
When set, this call will be an external program call, ran persistent.
|
private handle |
portHandle
The handle where to pass back the reference in case of a web service invocation.
|
private handle |
procedureHandle
The handle where to pass back the reference to the newly persistent-run external program.
|
private java.lang.String |
requestId
The value of the
OERequestInfo:requestId field. |
private boolean |
returnValue
Flag indicating if the OO method call is function-like (return value is needed).
|
private handle |
serverHandle
The remote server handle where to run this request.
|
private boolean |
singleRun
When set, this call will be an external program call, ran in SINGLE-RUN mode.
|
private boolean |
singleton
When set, this call will be an external program call, ran in SINGLETON mode.
|
private boolean |
superCall
Flag indicating if this is a RUN SUPER or SUPER().
|
private character |
target
This call's target (a function, internal procedure or program name).
|
private boolean |
transactionDistinct
Flag indicating if TRANSACTION-DISTINCT option is present.
|
private java.lang.String[] |
versionInfo
The value of the
OERequestInfo:versionInfo field. |
private java.lang.String |
webServiceToken
A token sent via a web service request, to execute the target service in the specified FWD context.
|
Constructor and Description |
---|
InvokeConfig(character target)
Create a new invocation for the given target.
|
InvokeConfig(java.lang.String target)
Create a new invocation for the given target.
|
Modifier and Type | Method and Description |
---|---|
private long |
computeWriting()
For each field, it sets a bit if the field's value is no longer the default value.
|
java.lang.Object[] |
getArguments()
Get the caller's
arguments . |
handle |
getAsyncHandle()
Get the caller's
asyncHandle . |
character |
getEventProcedure()
Get the caller's
eventProcedure . |
handle |
getEventProcedureContext()
Get the caller's
eventProcedureContext . |
handle |
getInHandle()
Get the target handle for internal entry call.
|
java.lang.String |
getModes()
Get the caller's
modes . |
handle |
getPortHandle()
Get the
portHandle . |
handle |
getProcedureHandle()
Get the
procedureHandle . |
java.lang.String |
getRequestId()
Get the request ID.
|
handle |
getServerHandle()
Get the
serverHandle . |
character |
getTarget()
Get the caller's target.
|
java.lang.String |
getWebServiceToken()
Get the web service token.
|
boolean |
isAsynchronous()
Get the
asynchronous flag. |
boolean |
isClass()
Get the
isClass flag. |
boolean |
isDynamicFunction()
Get the caller's
dynamicFunction . |
boolean |
isFunction()
Get the
function flag. |
boolean |
isPersistent()
Get the
persistent flag. |
boolean |
isReturnValue()
Get the
returnValue flag. |
boolean |
isSingleRun()
Get the
singleRun flag. |
boolean |
isSingleton()
Get the
singleton flag. |
boolean |
isSuperCall()
Get the caller's
superCall . |
boolean |
isTransactionDistinct()
Get the
transactionDistinct flag. |
void |
readExternal(java.io.ObjectInput in)
Read this invoke configuration from a stream.
|
(package private) void |
restoreRequest(OerequestInfo req,
java.lang.Integer agentId,
java.lang.Integer sessionId,
java.lang.Integer threadId)
Restore the
OerequestInfo from this call details, as received from a remote call. |
InvokeConfig |
setArguments(java.lang.Object... arguments)
Set this invocation's
arguments . |
InvokeConfig |
setAsyncHandle(handle asyncHandle)
Set this invocation's
asyncHandle handle where to save the async resource. |
InvokeConfig |
setAsynchronous(boolean asynchronous)
Set this invocation's
asynchronous flag. |
InvokeConfig |
setClass()
Mark this configuration as a OO invocation.
|
InvokeConfig |
setDynamicFunction(boolean dynamicFunction)
Set this invocation's
dynamicFunction flag. |
InvokeConfig |
setEventProcedure(character eventProcedure)
Set this invocation's
EVENT-PROCEDURE option. |
InvokeConfig |
setEventProcedure(java.lang.String eventProcedure)
Set this invocation's
EVENT-PROCEDURE option. |
InvokeConfig |
setEventProcedureContext(handle eventProcedureContext)
Set this invocation's
EVENT-PROCEDURE-CONTEXT option. |
InvokeConfig |
setFunction(boolean function)
Set this invocation's
function flag. |
InvokeConfig |
setInHandle(handle inHandle)
Set this invocation's
IN handle option. |
InvokeConfig |
setModes(java.lang.String modes)
Set this invocation's
argument modes . |
InvokeConfig |
setPersistent(boolean persistent)
Set this invocation's
persistent flag. |
InvokeConfig |
setPortHandle(handle portHandle)
Set this invocation's
portHandle handle where to save the web service. |
InvokeConfig |
setProcedureHandle(handle procedureHandle)
Set this invocation's
procedureHandle handle where to save the persistent program. |
InvokeConfig |
setRequestId(java.lang.String requestId)
Set the
requestId . |
InvokeConfig |
setReturnValue(boolean returnValue)
Set this invocation's
returnValue flag. |
InvokeConfig |
setServerHandle(handle serverHandle)
Set this invocation's
serverHandle remote handle where to perform the call. |
InvokeConfig |
setSingleRun(boolean singleRun)
Set this invocation's
singleRun flag. |
InvokeConfig |
setSingleton(boolean singleton)
Set this invocation's
singleton flag. |
InvokeConfig |
setSuperCall(boolean superCall)
Set this invocation's
superCall flag. |
InvokeConfig |
setTarget(character target)
Set this invocation's
target . |
InvokeConfig |
setTarget(java.lang.String target)
Set this invocation's
target . |
InvokeConfig |
setTransactionDistinct(boolean transactionDistinct)
Set this invocation's
transactionDistinct flag. |
InvokeConfig |
setWebServiceToken(java.lang.String webServiceToken)
Set the
webServiceToken . |
(package private) InvokeConfig |
storeRequest(object<? extends OerequestInfo> requestInfo)
Store the passed request info object, to be sent to a remote side.
|
void |
writeExternal(java.io.ObjectOutput out)
Serialize this invoke configuration.
|
private static final int FIELD_IN_HANDLE
inHandle
during serialization.private static final int FIELD_FUNCTION
function
during serialization.private static final int FIELD_PERSISTENT
persistent
during serialization.private static final int FIELD_SINGLE_RUN
singleRun
during serialization.private static final int FIELD_SINGLETON
singleton
during serialization.private static final int FIELD_PROC_HANDLE
procedureHandle
during serialization.private static final int FIELD_SERVER_HANDLE
serverHandle
during serialization.private static final int FIELD_TX_DISTINCT
transactionDistinct
during serialization.private static final int FIELD_ASYNC
asynchronous
during serialization.private static final int FIELD_ASYNC_HANDLE
asyncHandle
during serialization.private static final int FIELD_EVT_PROC
eventProcedure
during serialization.private static final int FIELD_EVT_PROC_CONTEXT
eventProcedureContext
during serialization.private static final int FIELD_ARGS
arguments
during serialization.private static final int FIELD_MODES
modes
during serialization.private static final int FIELD_PORT_HANDLE
portHandle
during serialization.private static final int FIELD_DYN_FUNC
dynamicFunction
during serialization.private static final int FIELD_SUPER_CALL
superCall
during serialization.private static final int FIELD_IS_CLASS
isClass
during serialization.private static final int FIELD_RETURN_VALUE
returnValue
during serialization.private static final int FIELD_CLIENTCONTEXTID
clientContextId
during serialization.private static final int FIELD_REQUESTID
requestId
during serialization.private static final int FIELD_CLIENTPRINCIPAL
clientPrincipal
during serialization.private static final int FIELD_VERSIONINFO
versionInfo
during serialization.private static final int FIELD_CLIENTTYPE
clientType
during serialization.private static final int FIELD_WEB_SERVICE_TOKEN
webServiceToken
during serialization.private final character target
private boolean isClass
private handle inHandle
private boolean function
private boolean persistent
private boolean singleRun
private boolean singleton
private handle procedureHandle
private handle portHandle
private handle serverHandle
private boolean transactionDistinct
private boolean asynchronous
private handle asyncHandle
async resource
.private character eventProcedure
private handle eventProcedureContext
private java.lang.Object[] arguments
private java.lang.String modes
private boolean dynamicFunction
private boolean superCall
private boolean returnValue
private java.lang.String clientContextId
OERequestInfo:
field.private java.lang.String requestId
OERequestInfo:requestId
field.private byte[] clientPrincipal
OERequestInfo:clientPrincipal
field.private java.lang.String[] versionInfo
OERequestInfo:versionInfo
field.private java.lang.String clientType
OERequestInfo:clientType
field.private java.lang.String webServiceToken
public InvokeConfig(character target)
target
- The target to be invoked.public InvokeConfig(java.lang.String target)
target
- The target to be invoked.public InvokeConfig setTarget(character target)
target
.target
- The target to be invoked.public InvokeConfig setTarget(java.lang.String target)
target
.target
- The target to be invoked.public InvokeConfig setClass()
public InvokeConfig setReturnValue(boolean returnValue)
returnValue
flag.returnValue
- The new value of this flag.public InvokeConfig setFunction(boolean function)
function
flag.function
- The new value of this flag.public InvokeConfig setPersistent(boolean persistent)
persistent
flag.persistent
- The new value of this flag.public InvokeConfig setSingleRun(boolean singleRun)
singleRun
flag.singleRun
- The new value of this flag.public InvokeConfig setSingleton(boolean singleton)
singleton
flag.singleton
- The new value of this flag.public InvokeConfig setProcedureHandle(handle procedureHandle)
procedureHandle
handle where to save the persistent program.procedureHandle
- A handle variable or field reference.public InvokeConfig setPortHandle(handle portHandle)
portHandle
handle where to save the web service.portHandle
- A handle variable or field reference.public InvokeConfig setServerHandle(handle serverHandle)
serverHandle
remote handle where to perform the call.serverHandle
- A handle to a remote appserver.public InvokeConfig setTransactionDistinct(boolean transactionDistinct)
transactionDistinct
flag.transactionDistinct
- The new value of this flag.public InvokeConfig setAsynchronous(boolean asynchronous)
asynchronous
flag.asynchronous
- The new value of this flag.public InvokeConfig setAsyncHandle(handle asyncHandle)
asyncHandle
handle where to save the async resource.asyncHandle
- A handle variable or field reference.public InvokeConfig setEventProcedure(character eventProcedure)
EVENT-PROCEDURE
option.eventProcedure
- The event procedure name.public InvokeConfig setEventProcedure(java.lang.String eventProcedure)
EVENT-PROCEDURE
option.eventProcedure
- The event procedure name.public InvokeConfig setEventProcedureContext(handle eventProcedureContext)
EVENT-PROCEDURE-CONTEXT
option.eventProcedureContext
- The event procedure context.public InvokeConfig setInHandle(handle inHandle)
IN handle
option.inHandle
- A program handle where to perform the call.public InvokeConfig setArguments(java.lang.Object... arguments)
arguments
.arguments
- A invocation's arguments.public InvokeConfig setModes(java.lang.String modes)
argument modes
.modes
- A invocation's argument modes.public InvokeConfig setSuperCall(boolean superCall)
superCall
flag.superCall
- Flag indicating that this is a super-call.public InvokeConfig setDynamicFunction(boolean dynamicFunction)
dynamicFunction
flag.dynamicFunction
- Flag indicating that this is a dynamic-function call.public InvokeConfig setRequestId(java.lang.String requestId)
requestId
.requestId
- The request ID.public InvokeConfig setWebServiceToken(java.lang.String webServiceToken)
webServiceToken
.webServiceToken
- The web service token.public boolean isClass()
isClass
flag.public boolean isReturnValue()
returnValue
flag.public boolean isFunction()
function
flag.public boolean isPersistent()
persistent
flag.public boolean isSingleRun()
singleRun
flag.public boolean isSingleton()
singleton
flag.public boolean isTransactionDistinct()
transactionDistinct
flag.public boolean isAsynchronous()
asynchronous
flag.public handle getInHandle()
inHandle
public handle getProcedureHandle()
procedureHandle
.procedureHandle
public handle getPortHandle()
portHandle
.portHandle
public handle getServerHandle()
serverHandle
.serverHandle
public handle getAsyncHandle()
asyncHandle
.asyncHandle
.public character getEventProcedure()
eventProcedure
.eventProcedure
public handle getEventProcedureContext()
eventProcedureContext
.eventProcedureContext
public java.lang.Object[] getArguments()
arguments
.arguments
public boolean isDynamicFunction()
dynamicFunction
.dynamicFunction
public java.lang.String getRequestId()
requestId
.public java.lang.String getWebServiceToken()
webServiceToken
.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
computeWriting()
will be used to set a bit for each field in this class, which was
changed from its default value. Only the fields which are no longer holding the default
value will be serialized.
The target
field is always written.
writeExternal
in interface java.io.Externalizable
out
- The output stream.java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
computeWriting()
).
The target
field is always read.
readExternal
in interface java.io.Externalizable
in
- The input stream.java.io.IOException
java.lang.ClassNotFoundException
InvokeConfig storeRequest(object<? extends OerequestInfo> requestInfo)
requestInfo
- The OerequestInfo
instance.void restoreRequest(OerequestInfo req, java.lang.Integer agentId, java.lang.Integer sessionId, java.lang.Integer threadId)
OerequestInfo
from this call details, as received from a remote call.req
- The request info for the Agent's SESSION.agentId
- The agent ID, as computed by the Agent.sessionId
- The sessionID, as computed by the Agent.threadId
- The threadID, as computed by the Agent.private long computeWriting()
For Boolean
fields, this means the field is set to true
.
For Object
fields, this means the field is now not-null.