Package rocks.xmpp.extensions.rpc.model
Class Rpc
- java.lang.Object
-
- rocks.xmpp.extensions.rpc.model.Rpc
-
public final class Rpc extends Object
The implementation of the<query/>element in thejabber:iq:rpcnamespace.This class is immutable.
- See Also:
- XEP-0009: Jabber-RPC, XML Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRpc.MethodCallThe implementation of a RPC method call.static classRpc.MethodResponseThe implementation of a method response.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rpc.MethodCallgetMethodCall()Gets the method call.Rpc.MethodResponsegetMethodResponse()Gets the method response.static RpcofFaultResponse(int faultCode, String faultString)Creates a method response with a fault.static RpcofMethodCall(String methodName, Value... parameters)Creates a method call with a list of parameters.static RpcofMethodResponse(Value value)Creates a method response.StringtoString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
jabber:iq:rpc- See Also:
- Constant Field Values
-
-
Method Detail
-
ofMethodCall
public static Rpc ofMethodCall(String methodName, Value... parameters)
Creates a method call with a list of parameters.- Parameters:
methodName- The method name.parameters- The parameters.- Returns:
- The RPC element.
-
ofMethodResponse
public static Rpc ofMethodResponse(Value value)
Creates a method response.- Parameters:
value- The return value.- Returns:
- The RPC element.
-
ofFaultResponse
public static Rpc ofFaultResponse(int faultCode, String faultString)
Creates a method response with a fault.- Parameters:
faultCode- The fault code.faultString- The fault string.- Returns:
- The RPC element.
-
getMethodCall
public final Rpc.MethodCall getMethodCall()
Gets the method call.- Returns:
- The method call.
-
getMethodResponse
public final Rpc.MethodResponse getMethodResponse()
Gets the method response.- Returns:
- The method response.
-
-