Package rocks.xmpp.extensions.rpc
Class RpcException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- rocks.xmpp.extensions.rpc.RpcException
-
- All Implemented Interfaces:
Serializable
public final class RpcException extends Exception
This exception can be thrown by aRpcHandler
to indicate application-level errors.By throwing this exception in the
RpcHandler.process(Jid, String, java.util.List)
method a<fault/>
will be returned.
-
-
Constructor Summary
Constructors Constructor Description RpcException(int faultCode, String faultString)
Creates a RPC exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFaultCode()
Gets the fault code.String
getFaultString()
Gets the fault string.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RpcException
public RpcException(int faultCode, String faultString)
Creates a RPC exception.- Parameters:
faultCode
- The fault code. It is up to the server implementer, or higher-level standards to specify fault codes.faultString
- The fault string, i.e. error message.
-
-
Method Detail
-
getFaultCode
public int getFaultCode()
Gets the fault code.- Returns:
- The fault code.
-
getFaultString
public String getFaultString()
Gets the fault string.- Returns:
- The fault string.
-
-