com.isomorphic.rpc
Class RPCRequest
java.lang.Object
|
+--com.isomorphic.rpc.RPCRequest
- public class RPCRequest
- extends java.lang.Object
RPCRequest encapsulates the data sent by the client-side RPCManager. Use the server-side
RPCManager class to parse an RPC HttpRequest and retrieve RPCRequest objects.
- See Also:
RPCManager,
RPCResponse
|
Method Summary |
java.lang.Object |
getData()
Retrieves the data sent by the client. |
getData
public java.lang.Object getData()
- Retrieves the data sent by the client. You'll need to cast the data to the appropriate
type. The type is determined by the type of JavaScript object that you provided as the
"data" parameter to RPCManager.send(). Here's the mapping of JS types to their
corresponding Java types:
| JS Type | Java Type |
| Object: {} | Map |
| Array: [] | List |
| String | String |
| Number | Long|Double |
| Boolean | Boolean |
| Date | java.util.Date |
Note that the order of keys/values in the Maps created on the server is not guaranteed
because JavaScript Object literals do not guarantee order.