public class RPCRequest extends BaseRequest implements java.util.concurrent.Callable
RPCManager
, RPCResponse
Modifier and Type | Method and Description |
---|---|
RPCResponse | call() Calls through to execute() |
RPCResponse | execute() If this request is a DMI request, executes the request through the DMI layer and returns an RPCResponse. |
java.lang.String | getAppID() If this is a DMI request, returns the appID against which this request is being made. |
java.lang.Object | getData() Retrieves the data sent by the client. |
java.util.List | getMethodArguments() If this is a DMI request, returns the arguments the client is passing to the DMI method. |
java.lang.String | getMethodName() If this is a DMI request, returns the name of the DMI method being invoked by the client. |
java.lang.String | getServerObjectID() If this is a DMI request, returns the ID of the ServerObject against which this request is being made. |
boolean | isDMI() Returns true if this request is a DMI request, false if it is a custom RPC. |
freeAllResources, getContext, getDsTransaction, getDSTransaction, getRPCManager, isClientRequest, setClientRequest, setContext, setDsTransaction, setDSTransaction, setRPCManager
public java.lang.Object getData()
JS Type | Java Type |
Object: {} | Map |
Array: [] | List |
String | String |
Number | Long|Double |
Boolean | Boolean |
Date | java.util.Date |
public boolean isDMI()
public java.lang.String getAppID()
RPCRequest.isDMI()
public java.lang.String getServerObjectID()
If you're using the loadDMIStubs JSP tag and calling methods directly on the resulting JavaScript classes, the client will always send ServerObject ID if one exists on the ServerObject XML definition and the className if the ID does not exist.
RPCRequest.isDMI()
public java.lang.String getMethodName()
RPCRequest.isDMI()
public java.util.List getMethodArguments()
Note that the DMI method invoked may declare that it takes additional, optional arguments that are provided by the DMI layer itself because they cannot be directly passed by the client such as the HttpServletRequest or the HttpSession objects.
RPCRequest.getMethodName()
, RPCRequest.isDMI()
public RPCResponse call() throws java.lang.Exception
java.lang.Exception
RPCRequest.execute()
public RPCResponse execute() throws java.lang.Exception
If you're writing your own RPC endpoint to replace the provided IDACall, you can use this method in conjuction with isDMI() to preserve builtin DMI handling by writing a dispacher like so:
if (rpcRequest.isDMI()) { rpcManager.send(rpcRequest, rpcRequest.execute()); } else { // Custom RPC - do something with it... }
execute
in class BaseRequest
java.lang.Exception