public class ProgRestService extends RestService
Allows both PERSISTENT and DELETE mode, in use by SOAP services.
Modifier and Type | Field and Description |
---|---|
protected java.lang.ThreadLocal<java.lang.Integer> |
agentId
The agent ID where the remote procedure was created.
|
protected java.lang.String |
pname
The target program name.
|
protected java.lang.ThreadLocal<java.lang.String> |
resourceId
The external program resource ID (for persistent procedures as the result, and for internal entries as
input).
|
cfg, definitionParameters, key, ls, serviceSignature, timeout
Constructor and Description |
---|
ProgRestService(LegacyService ls,
java.lang.String pname,
java.lang.reflect.Method m,
ServiceKey key,
int timeout)
Initialize with the details for an external program invocation.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Parameter> |
getParameters()
Get the
Parameter s as they are defined at the external program. |
java.lang.Object |
invoke(AppServerHelper helper,
java.lang.String token,
java.lang.Object[] args)
Invoke this service.
|
void |
reset()
Reset the last invoke configuration.
|
void |
setResourceId(java.lang.String resourceId,
int agentId)
Set the external program resource ID to be used by this service.
|
buildDefinitionParameters, getDefinitionParameters, getExecutionMode, getParser, getProcedureHandle, getRequestID, getSerializer, isPersistent, nextRequestId, resolveModes
protected java.lang.ThreadLocal<java.lang.String> resourceId
protected final java.lang.String pname
protected java.lang.ThreadLocal<java.lang.Integer> agentId
public ProgRestService(LegacyService ls, java.lang.String pname, java.lang.reflect.Method m, ServiceKey key, int timeout)
ls
- The annotation at the Java class (defining the resource).pname
- The program name.m
- The target method for this service.key
- The service key.timeout
- The invocation timeout.protected java.util.List<Parameter> getParameters()
Parameter
s as they are defined at the external program.public void setResourceId(java.lang.String resourceId, int agentId)
resourceId
- The resourceId
.agentId
- The agentId
.public void reset()
reset
in class RestService
public java.lang.Object invoke(AppServerHelper helper, java.lang.String token, java.lang.Object[] args)
invoke
in class RestService
helper
- The appserver helper used to execute the requests.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.args
- The arguments.