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,
java.lang.Object[] requestInfo)
Establish a new appserver connection.
|
boolean |
deleteObject(java.lang.String id,
java.lang.String resId,
int agentId)
Delete the remote object, specified by the resource ID.
|
boolean |
deleteProcedure(java.lang.String id,
java.lang.String resId,
int agentId,
java.lang.String token)
Delete the remote procedure, specified by the resource ID.
|
void |
disableLegacyErrors(java.lang.String id)
Disable legacy OO errors thrown on this connection.
|
void |
disconnect(java.lang.String id)
Disconnect the appserver connection, with the given ID.
|
character |
getProcedureName(java.lang.String id,
java.lang.String resId,
int agentId)
Get the name of the remote procedure, specified by the resource ID.
|
AppServerInvocationResult |
handleWebService(java.lang.String id,
int requestId,
long timeout,
java.lang.Class<?> handler,
java.lang.String basepath,
java.lang.String[] paths,
java.lang.String token,
java.lang.String target,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle a generic web service request.
|
AppServerInvocationResult |
initializeProxy(java.lang.String id,
int requestId,
java.lang.String code,
int agentId,
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 connectionID,
int reqId,
int timeout,
JavaInvokeConfig cfg)
Invoke the given Java method directly.
|
AppServerInvocationResult |
invoke(java.lang.String id,
int requestId,
long timeout,
character name,
java.lang.String resId,
int agentId,
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 |
invoke(java.lang.String id,
int requestId,
long timeout,
InvokeConfig cfg)
Invoke a remote external procedure, internal procedure or user-defined function.
|
AppServerInvocationResult |
invokeMethod(java.lang.String id,
int requestId,
long timeout,
boolean returnValue,
character name,
java.lang.String resId,
int agentId,
java.lang.String modes,
java.lang.Object... args)
Invoke a method in a remotely instantiated class.
|
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.
|
AppServerInvocationResult |
newInstance(java.lang.String id,
int requestId,
long timeout,
character name,
java.lang.String modes,
java.lang.Object... args)
Create a new instance of the specified qualified class name.
|
AppServerInvocationResult |
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, java.lang.Object[] requestInfo)
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.requestInfo
- The details for the OerequestInfo
- see
OerequestInfo.toArray()
.AppServerInvocationResult
instance with any result or caught errors.void disconnect(java.lang.String id)
id
- The connection ID to disconnect.AppServerInvocationResult newInstance(java.lang.String id, int requestId, long timeout, character name, 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 qualified class name for the legacy class.modes
- A string representation of the modes of each parameter. May be null
args
- The constructor's arguments.AppServerInvocationResult
instance, which holds the code for the remote
object, all updated OUTPUT/INPUT-OUTPUT arguments and any returned value.AppServerInvocationResult invokeMethod(java.lang.String id, int requestId, long timeout, boolean returnValue, character name, java.lang.String resId, int agentId, 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.returnValue
- Flag indicating if the return value is required.name
- The legacy 4GL name for the class method.resId
- The code of a remotely instantiated object in which to invoke the method.agentId
- The agent ID where this remote procedure was created.modes
- A string representation of the modes of each parameter. May be null
args
- The method's arguments.AppServerInvocationResult
instance with all updated OUTPUT/INPUT-OUTPUT
arguments and any returned value.boolean deleteObject(java.lang.String id, java.lang.String resId, int agentId)
id
- The appserver connection id.resId
- The ID of a remote object which needs to be deleted.agentId
- The agent ID where this remote procedure was created.true
if the remote object was deleted.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, int agentId, 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.agentId
- The agent ID where this remote procedure was created.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.AppServerInvocationResult invoke(java.lang.String id, int requestId, long timeout, InvokeConfig cfg)
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.cfg
- The invoke configuration.AppServerInvocationResult
instance with all updated OUTPUT/INPUT-OUTPUT
arguments and any returned value.AppServerInvocationResult invoke(java.lang.String connectionID, int reqId, int timeout, JavaInvokeConfig cfg)
All arguments are sent by references: if it was marked as an OUTPUT or INPUT-OUTPUT, any change to that instance will be reflected back to the caller.
connectionID
- The appserver connection id.reqId
- The ID of the request.timeout
- The maximum allowed time for this invocation to complete. In milliseconds.
Use 0
to disable the timeout.cfg
- The configuration with the Java method to be invoked.AppServerInvocationResult
instance with all updated OUTPUT/INPUT-OUTPUT
arguments and any returned value.boolean deleteProcedure(java.lang.String id, java.lang.String resId, int agentId, java.lang.String token)
id
- The appserver connection id.resId
- The ID of a remote procedure which needs to be deleted.agentId
- The agent ID where this remote procedure was created.token
- When not null, it represents the token of a FWD context created for an authenticated and
authorized web service call. The API call will be performed in that context.true
if the remote procedure was deleted.character getProcedureName(java.lang.String id, java.lang.String resId, int agentId)
id
- The appserver connection id.resId
- The resource ID of a remote procedure.agentId
- The agent ID where this remote procedure was created.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()
AppServerInvocationResult 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, int agentId, 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.agentId
- The agent ID where this remote procedure was created.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 handleWebService(java.lang.String id, int requestId, long timeout, java.lang.Class<?> handler, java.lang.String basepath, java.lang.String[] paths, java.lang.String token, java.lang.String target, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
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.handler
- The WebHandler
implementation.basepath
- The service basepath.paths
- The split paths for this handler.target
- The request original target.request
- The Jetty request.response
- The Jetty response.AppServerInvocationResult
instance with any error throw during the web service
processing.void disableLegacyErrors(java.lang.String id)
id
- The appserver connection id.