public interface AppServerEntry
AppServerManager
class.
These low-level APIs are meant to be used only by P2J runtime code. For outside access, use
the APIs defined by the helper
class.
Modifier and Type | Method and Description |
---|---|
AppServerInvocationResult |
connect(java.lang.String appServer,
boolean sessionFree,
java.lang.String user,
java.lang.String pwd,
java.lang.String serverInfo)
Establish a new appserver connection.
|
boolean |
deleteProcedure(java.lang.String id,
java.lang.String resId)
Delete the remote procedure, specified by the resource ID.
|
void |
disconnect(java.lang.String id)
Disconnect the appserver connection, with the given ID.
|
character |
getProcedureName(java.lang.String id,
java.lang.String resId)
Get the name of the remote procedure, specified by the resource ID.
|
AppServerInvocationResult |
initializeProxy(java.lang.String id,
int requestId,
java.lang.String code,
boolean transactionDistinct,
java.lang.String modes,
java.lang.Object[] args)
Initialize the specified proxy procedure, by calling the
execute method. |
AppServerInvocationResult |
invoke(java.lang.String id,
int requestId,
long timeout,
character name,
java.lang.String resId,
boolean function,
boolean dynamicFunction,
boolean superCall,
boolean transactionDistinct,
java.lang.String modes,
java.lang.Object... args)
Invoke a remote external procedure, internal procedure or user-defined function.
|
AppServerInvocationResult |
invokePersistent(java.lang.String id,
int requestId,
long timeout,
character name,
boolean transactionDistinct,
java.lang.String modes,
java.lang.Object... args)
Invoke a remote external procedure, persistently.
|
java.lang.String |
obtainProxy(java.lang.String id,
java.lang.String name)
Obtain a proxy for the given external procedure.
|
void |
sendStop(java.lang.String id)
Send a STOP condition to the request currently being executed on the specified connection.
|
void |
sendStop(java.lang.String id,
int requestId)
Send the STOP condition to the request running with the specified ID.
|
int |
uniqueId()
Obtain an unique ID from the remote side.
|
AppServerInvocationResult connect(java.lang.String appServer, boolean sessionFree, java.lang.String user, java.lang.String pwd, java.lang.String serverInfo)
user
, pwd
and serverInfo
parameters will be passed.appServer
- The name of the target appserver.sessionFree
- Flag indicating if the connection request is for a session-free operating mode.user
- The first parameter to pass to the connect procedure, if any.pwd
- The second parameter to pass to the connect procedure, if any.serverInfo
- The third parameter to pass to the connect procedure, if any.AppServerInvocationResult
instance with any result or caught errors.void disconnect(java.lang.String id)
id
- The connection ID to disconnect.AppServerInvocationResult invokePersistent(java.lang.String id, int requestId, long timeout, character name, boolean transactionDistinct, java.lang.String modes, java.lang.Object... args)
id
- The appserver connection id.requestId
- The ID of the request.timeout
- The maximum allowed time for this invocation to complete. In milliseconds.
Use 0
to disable the timeout.name
- The legacy 4GL name for the procedure.transactionDistinct
- Flag indicating if the TRANSACTION DISTINCT clause is in effect.modes
- A string representation of the modes of each parameter. May be null
args
- The procedure's arguments.AppServerInvocationResult
instance, which holds the code for the remote
procedure, all updated OUTPUT/INPUT-OUTPUT arguments and any returned value.AppServerInvocationResult invoke(java.lang.String id, int requestId, long timeout, character name, java.lang.String resId, boolean function, boolean dynamicFunction, boolean superCall, boolean transactionDistinct, java.lang.String modes, java.lang.Object... args)
id
- The appserver connection id.requestId
- The ID of the request.timeout
- The maximum allowed time for this invocation to complete. In milliseconds.
Use 0
to disable the timeout.name
- The legacy 4GL name for the procedure/function.resId
- The code of a remote procedure in which to invoke the procedure or function.function
- true
if this is a function call.dynamicFunction
- true
if this is a DYNAMIC-FUNCTION call.superCall
- true
if this is a RUN SUPER or SUPER() call.transactionDistinct
- Flag indicating if the TRANSACTION DISTINCT clause is in effect.modes
- A string representation of the modes of each parameter. May be null
args
- The procedure's arguments.AppServerInvocationResult
instance with all updated OUTPUT/INPUT-OUTPUT
arguments and any returned value.boolean deleteProcedure(java.lang.String id, java.lang.String resId)
id
- The appserver connection id.resId
- The ID of a remote procedure which needs to be deleted.true
if the remote procedure was deleted.character getProcedureName(java.lang.String id, java.lang.String resId)
id
- The appserver connection id.resId
- The resource ID of a remote procedure.void sendStop(java.lang.String id, int requestId)
id
- The appserver connection id.requestId
- The ID of the request.void sendStop(java.lang.String id)
id
- The appserver connection id.int uniqueId()
java.lang.String obtainProxy(java.lang.String id, java.lang.String name)
id
- The appserver connection id.name
- A name of a remote external procedure.AppServerInvocationResult initializeProxy(java.lang.String id, int requestId, java.lang.String code, boolean transactionDistinct, java.lang.String modes, java.lang.Object[] args)
execute
method.id
- The appserver connection id.requestId
- The ID of the request.code
- The code of a persistent external procedure to which the agent is associated. May
be null
.transactionDistinct
- Flag indicating if the TRANSACTION DISTINCT clause is in effect.modes
- A string representation of the modes of each parameter. May be null
args
- The procedure's arguments.