org.acplt.oncrpc
Class OncRpcClientReplyMessage
java.lang.Object
|
+--org.acplt.oncrpc.OncRpcMessage
|
+--org.acplt.oncrpc.OncRpcReplyMessage
|
+--org.acplt.oncrpc.OncRpcClientReplyMessage
- public class OncRpcClientReplyMessage
- extends OncRpcReplyMessage
The OncRpcReplyMessage
class represents an ONC/RPC reply
message as defined by ONC/RPC in RFC 1831. Such messages are sent back by
ONC/RPC to servers to clients and contain (in case of real success) the
result of a remote procedure call.
The decision to define only one single class for the accepted and
rejected replies was driven by the motivation not to use polymorphism
and thus have to upcast and downcast references all the time.
The derived classes are only provided for convinience on the server
side.
Field Summary |
protected OncRpcClientAuth |
auth
Client-side authentication protocol handling object to use when
decoding the reply message. |
Method Summary |
OncRpcException |
newException()
Return an appropriate exception object according to the state this
reply message header object is in. |
boolean |
successfullyAccepted()
Check whether this OncRpcReplyMessage represents an
accepted and successfully executed remote procedure call. |
void |
xdrDecode(XdrDecodingStream xdr)
Decodes -- that is: deserializes -- a ONC/RPC message header object
from a XDR stream. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
toString,
wait,
wait,
wait |
auth
protected OncRpcClientAuth auth
- Client-side authentication protocol handling object to use when
decoding the reply message.
OncRpcClientReplyMessage
public OncRpcClientReplyMessage(OncRpcClientAuth auth)
- Initializes a new
OncRpcReplyMessage
object to represent
an invalid state. This default constructor should only be used if in the
next step the real state of the reply message is immediately decoded
from a XDR stream.
- Parameters:
auth
- Client-side authentication protocol handling object which
is to be used when decoding the verifier data contained in the reply.
successfullyAccepted
public boolean successfullyAccepted()
- Check whether this
OncRpcReplyMessage
represents an
accepted and successfully executed remote procedure call.
- Returns:
true
if remote procedure call was accepted and
successfully executed.
newException
public OncRpcException newException()
- Return an appropriate exception object according to the state this
reply message header object is in. The exception object then can be
thrown.
- Returns:
- Exception object of class
OncRpcException
or a subclass
thereof.
xdrDecode
public void xdrDecode(XdrDecodingStream xdr)
throws OncRpcException,
java.io.IOException
- Decodes -- that is: deserializes -- a ONC/RPC message header object
from a XDR stream.
- Throws:
- OncRpcException - if an ONC/RPC error occurs.
- java.io.IOException - if an I/O error occurs.