com.thetransactioncompany.jsonrpc2
Class JSONRPC2ParamsType

java.lang.Object
  extended by com.thetransactioncompany.jsonrpc2.JSONRPC2ParamsType

public final class JSONRPC2ParamsType
extends java.lang.Object

Defines the three parameter types for JSON-RPC 2.0 requests and notifications.

The JSON-RPC 2.0 specification and user group forum can be found here.

Version:
1.9.1 (2010-03-15)
Author:
Vladimir Dzhuvinov

Field Summary
static JSONRPC2ParamsType ARRAY
          The parameters are packed as a JSON array.
static int ARRAY_CONST
          The integer constant for the "ARRAY" parameters type.
static JSONRPC2ParamsType NO_PARAMS
          No parameters.
static int NO_PARAMS_CONST
          The integer constant for the "NO_PARAMS" parameters type.
static JSONRPC2ParamsType OBJECT
          The parameters are packed as a JSON object.
static int OBJECT_CONST
          The integer constant for the "OBJECT" parameters type.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates wheter the provided object is equal to this parameters type.
 java.lang.String getName()
          Retrieves the name for this parameters type.
 int intValue()
          Retrieves the integer constant for this parameters type.
 java.lang.String toString()
          Retrieves a string representing this parameters type.
static JSONRPC2ParamsType valueOf(int intValue)
          Retrieves the parameters type with the specified integer constant.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_PARAMS_CONST

public static final int NO_PARAMS_CONST
The integer constant for the "NO_PARAMS" parameters type.

See Also:
Constant Field Values

NO_PARAMS

public static final JSONRPC2ParamsType NO_PARAMS
No parameters.


ARRAY_CONST

public static final int ARRAY_CONST
The integer constant for the "ARRAY" parameters type.

See Also:
Constant Field Values

ARRAY

public static final JSONRPC2ParamsType ARRAY
The parameters are packed as a JSON array.


OBJECT_CONST

public static final int OBJECT_CONST
The integer constant for the "OBJECT" parameters type.

See Also:
Constant Field Values

OBJECT

public static final JSONRPC2ParamsType OBJECT
The parameters are packed as a JSON object.

Method Detail

getName

public java.lang.String getName()
Retrieves the name for this parameters type.

Returns:
The parameters type name.

intValue

public int intValue()
Retrieves the integer constant for this parameters type.

Returns:
The parameters integer constant.

valueOf

public static JSONRPC2ParamsType valueOf(int intValue)
Retrieves the parameters type with the specified integer constant.

Parameters:
intValue - The integer constant for which to retrieve the corresponding parameters type.
Returns:
The parameters type or null if none matches.

equals

public boolean equals(java.lang.Object o)
Indicates wheter the provided object is equal to this parameters type.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object for which to make the comparison.
Returns:
true if the objects are equal, or false if not.

toString

public java.lang.String toString()
Retrieves a string representing this parameters type.

Overrides:
toString in class java.lang.Object
Returns:
A string representing this parameters type.


Copyright © 2009-2010 Vladimir Dzhuvinov. All Rights Reserved.