|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javaclient2.xdr.OncRpcException
public class OncRpcException
The class OncRpcException
indicates ONC/RPC conditions
that a reasonable application might want to catch. We follow here the
notation established by the Java environment that exceptions can be
caught while errors usually can't. Because we don't want to throw our
applications out of the virtual machine (should I mock here "out of the
window"?), we only define exceptions.
The class OncRpcException
also defines a set of ONC/RPC
error codes as defined by RFC 1831. Note that all these error codes are
solely used on the client-side or server-side, but never transmitted
over the wire. For error codes transmitted over the network, refer to
OncRpcAcceptStatus and OncRpcRejectStatus.
Exception
,
Serialized FormField Summary | |
---|---|
static int |
RPC_AUTHERROR
The ONC/RPC server did not accept the authentication sent by the client. |
static int |
RPC_BUFFEROVERFLOW
A buffer overflow occured with an encoding XDR stream. |
static int |
RPC_BUFFERUNDERFLOW
A buffer underflow occured with an decoding XDR stream. |
static int |
RPC_CANTDECODEARGS
The ONC/RPC server could not decode the arguments sent within the call message. |
static int |
RPC_CANTDECODERES
The client can not decode the result from the remote procedure call. |
static int |
RPC_CANTENCODEARGS
The client can not encode the argments to be sent for the remote procedure call. |
static int |
RPC_CANTRECV
Information to be decoded can not be received. |
static int |
RPC_CANTSEND
Encoded information can not be sent. |
static int |
RPC_FAILED
A generic ONC/RPC exception occured. |
static int |
RPC_PMAPFAILURE
The portmapper could not be contacted at the given host. |
static int |
RPC_PROCUNAVAIL
The given procedure is not available at the ONC/RPC server. |
static int |
RPC_PROGNOTREGISTERED
The requested program is not registered with the given host. |
static int |
RPC_PROGUNAVAIL
The ONC/RPC server does not support this particular program. |
static int |
RPC_PROGVERSMISMATCH
The ONC/RPC server does not support this particular version of the program. |
static int |
RPC_SUCCESS
The remote procedure call was carried out successfully. |
static int |
RPC_SYSTEMERROR
The ONC/RPC server encountered a system error and thus was not able to carry out the requested remote function call successfully. |
static int |
RPC_TIMEDOUT
The remote procedure call timed out. |
static int |
RPC_UNKNOWNPROTO
The caller specified an unknown/unsupported IP protocol. |
static int |
RPC_VERSMISMATCH
ONC/RPC versions of server and client are not compatible. |
static int |
RPC_WRONGMESSAGE
Either a ONC/RPC server or client received the wrong type of ONC/RPC message when waiting for a request or reply. |
Constructor Summary | |
---|---|
OncRpcException()
Constructs an OncRpcException with a reason of
OncRpcException#RPC_FAILED. |
|
OncRpcException(int r)
Constructs an OncRpcException with the specified detail
reason. |
|
OncRpcException(int r,
java.lang.String s)
Constructs an OncRpcException with the specified detail
reason and message. |
|
OncRpcException(java.lang.String s)
Constructs an OncRpcException with the specified detail
message. |
Method Summary | |
---|---|
java.lang.String |
getMessage()
Returns the error message string of this ONC/RPC object. |
int |
getReason()
Returns the error reason of this ONC/RPC exception object. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RPC_SUCCESS
public static final int RPC_CANTENCODEARGS
public static final int RPC_CANTDECODERES
public static final int RPC_CANTSEND
public static final int RPC_CANTRECV
public static final int RPC_TIMEDOUT
public static final int RPC_VERSMISMATCH
public static final int RPC_AUTHERROR
public static final int RPC_PROGUNAVAIL
public static final int RPC_PROGVERSMISMATCH
public static final int RPC_PROCUNAVAIL
public static final int RPC_CANTDECODEARGS
public static final int RPC_SYSTEMERROR
public static final int RPC_UNKNOWNPROTO
public static final int RPC_PMAPFAILURE
public static final int RPC_PROGNOTREGISTERED
public static final int RPC_FAILED
public static final int RPC_BUFFEROVERFLOW
public static final int RPC_BUFFERUNDERFLOW
public static final int RPC_WRONGMESSAGE
Constructor Detail |
---|
public OncRpcException()
OncRpcException
with a reason of
OncRpcException#RPC_FAILED.
public OncRpcException(java.lang.String s)
OncRpcException
with the specified detail
message.
s
- The detail message.public OncRpcException(int r, java.lang.String s)
OncRpcException
with the specified detail
reason and message. For possible reasons, see below.
r
- The detail reason.s
- The detail message.public OncRpcException(int r)
OncRpcException
with the specified detail
reason. The detail message is derived automatically from the reason.
r
- The reason. This can be one of the constants -- oops, that
should be "public final static integers" -- defined in this
interface.Method Detail |
---|
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
OncRpcException
object if it was created either with an error message string or an
ONC/RPC error code.public int getReason()
OncRpcException
object if
it was #OncRpcException(int) created with an error reason; or
RPC_FAILED
if it was #OncRpcException() created
with no error reason.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |