Package org.acplt.oncrpc
Class OncRpcClientReplyMessage
java.lang.Object
org.acplt.oncrpc.OncRpcMessage
org.acplt.oncrpc.OncRpcReplyMessage
org.acplt.oncrpc.OncRpcClientReplyMessage
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.
- Version:
- $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:40 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OncRpcClientAuth
Client-side authentication protocol handling object to use when decoding the reply message.Fields inherited from class org.acplt.oncrpc.OncRpcReplyMessage
acceptStatus, authStatus, highVersion, lowVersion, rejectStatus, replyStatus, UNUSED_PARAMETER
Fields inherited from class org.acplt.oncrpc.OncRpcMessage
messageId, messageType
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a newOncRpcReplyMessage
object to represent an invalid state. -
Method Summary
Modifier and TypeMethodDescriptionReturn an appropriate exception object according to the state this reply message header object is in.boolean
Check whether thisOncRpcReplyMessage
represents an accepted and successfully executed remote procedure call.void
Decodes -- that is: deserializes -- a ONC/RPC message header object from a XDR stream.
-
Field Details
-
auth
Client-side authentication protocol handling object to use when decoding the reply message.
-
-
Constructor Details
-
OncRpcClientReplyMessage
Initializes a newOncRpcReplyMessage
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.
-
-
Method Details
-
successfullyAccepted
public boolean successfullyAccepted()Check whether thisOncRpcReplyMessage
represents an accepted and successfully executed remote procedure call.- Returns:
true
if remote procedure call was accepted and successfully executed.
-
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
Decodes -- that is: deserializes -- a ONC/RPC message header object from a XDR stream.- Throws:
OncRpcException
- if an ONC/RPC error occurs.IOException
- if an I/O error occurs.
-