Package com.google.api.client.json.rpc2
Class JsonRpcRequest
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.rpc2.JsonRpcRequest
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description JsonRpcRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonRpcRequestclone()Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.ObjectgetId()Returns the identifier established by the client that must be a string or a number ornullfor a notification and therefore not expect to receive a response.StringgetMethod()Returns the name of the method to be invoked.ObjectgetParameters()Returns the structured value that holds the parameter values to be used during the invocation of the method ornullfor none.StringgetVersion()Returns the version of the JSON-RPC protocol which is"2.0".JsonRpcRequestset(String fieldName, Object value)Sets the given field value (may benull) for the given field name.voidsetId(Object id)Sets the identifier established by the client that must be a string or a number ornullfor a notification and therefore not expect to receive a response.voidsetMethod(String method)Sets the name of the method to be invoked.voidsetParameters(Object parameters)Sets the structured value that holds the parameter values to be used during the invocation of the method ornullfor none.-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, values
-
-
-
-
Method Detail
-
getVersion
public String getVersion()
Returns the version of the JSON-RPC protocol which is"2.0".- Since:
- 1.5
-
getId
public Object getId()
Returns the identifier established by the client that must be a string or a number ornullfor a notification and therefore not expect to receive a response.- Since:
- 1.5
-
setId
public void setId(Object id)
Sets the identifier established by the client that must be a string or a number ornullfor a notification and therefore not expect to receive a response.- Since:
- 1.5
-
getMethod
public String getMethod()
Returns the name of the method to be invoked.- Since:
- 1.5
-
setMethod
public void setMethod(String method)
Sets the name of the method to be invoked.- Since:
- 1.5
-
getParameters
public Object getParameters()
Returns the structured value that holds the parameter values to be used during the invocation of the method ornullfor none.- Since:
- 1.5
-
setParameters
public void setParameters(Object parameters)
Sets the structured value that holds the parameter values to be used during the invocation of the method ornullfor none.- Since:
- 1.5
-
set
public JsonRpcRequest set(String fieldName, Object value)
Description copied from class:GenericDataSets the given field value (may benull) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient thanGenericData.put(String, Object)because it avoids accessing the field's original value.Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.
- Overrides:
setin classGenericData
-
clone
public JsonRpcRequest clone()
Description copied from class:GenericDataMakes a "deep" clone of the generic data, in which the clone is completely independent of the original.- Overrides:
clonein classGenericData
-
-