Class Rpc


  • public final class Rpc
    extends Object
    The implementation of the <query/> element in the jabber:iq:rpc namespace.

    This class is immutable.

    See Also:
    XEP-0009: Jabber-RPC, XML Schema
    • 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.