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:rpc
namespace.This class is immutable.
- See Also:
- XEP-0009: Jabber-RPC, XML Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Rpc.MethodCall
The implementation of a RPC method call.static class
Rpc.MethodResponse
The implementation of a method response.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Rpc.MethodCall
getMethodCall()
Gets the method call.Rpc.MethodResponse
getMethodResponse()
Gets the method response.static Rpc
ofFaultResponse(int faultCode, String faultString)
Creates a method response with a fault.static Rpc
ofMethodCall(String methodName, Value... parameters)
Creates a method call with a list of parameters.static Rpc
ofMethodResponse(Value value)
Creates a method response.String
toString()
-
-
-
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.
-
-