Package org.acplt.oncrpc
Class OncRpcServerIdent
- java.lang.Object
-
- org.acplt.oncrpc.OncRpcServerIdent
-
- All Implemented Interfaces:
XdrAble
public class OncRpcServerIdent extends java.lang.Object implements XdrAble
The classOncRpcServerIdentrepresents an tuple { program, version, protocol, port} uniquely identifying a particular ONC/RPC server on a given host. This information is used, for instance, as the ONC/RPC portmap PMAP_GETPORT call parameters.An
OncRpcServerIdentcan be directly serialized into an encoding XDR stream (that is more political correct than "flushed down the toilet").- Version:
- $Revision: 1.1.1.1 $ $Date: 2003/08/13 12:03:41 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
-
Field Summary
Fields Modifier and Type Field Description intportThe port number of the ONC/RPC server in question.intprogramThe program number of the ONC/RPC server in question.intprotocolThe protocol used for communicating with the ONC/RPC server in question.intversionThe program version number of the ONC/RPC server in question.
-
Constructor Summary
Constructors Constructor Description OncRpcServerIdent()Constuct anOncRpcServerIdentobject with senseless default values for the requested program number, version number, protocol type and port number.OncRpcServerIdent(int program, int version, int protocol, int port)Constructs anOncRpcServerIdentobject with the requested program number, version number, protocol type and port number.OncRpcServerIdent(XdrDecodingStream xdr)Constructs anOncRpcServerIdentobject and restores its state from the given XDR stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidxdrDecode(XdrDecodingStream xdr)Decodes -- that is: deserializes -- an OncRpcServerIdent object from a XDR stream.voidxdrEncode(XdrEncodingStream xdr)Encodes -- that is: serializes -- an OncRpcServerIdent object into a XDR stream.
-
-
-
Field Detail
-
program
public int program
The program number of the ONC/RPC server in question.
-
version
public int version
The program version number of the ONC/RPC server in question.
-
protocol
public int protocol
The protocol used for communicating with the ONC/RPC server in question. This can be one of the constants ("public final static int") defined in theOncRpcProtocolsinterface.
-
port
public int port
The port number of the ONC/RPC server in question.
-
-
Constructor Detail
-
OncRpcServerIdent
public OncRpcServerIdent()
Constuct anOncRpcServerIdentobject with senseless default values for the requested program number, version number, protocol type and port number.
-
OncRpcServerIdent
public OncRpcServerIdent(int program, int version, int protocol, int port)Constructs anOncRpcServerIdentobject with the requested program number, version number, protocol type and port number.
-
OncRpcServerIdent
public OncRpcServerIdent(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
Constructs anOncRpcServerIdentobject and restores its state from the given XDR stream.- Throws:
OncRpcExceptionjava.io.IOException
-
-
Method Detail
-
xdrEncode
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, java.io.IOException
Encodes -- that is: serializes -- an OncRpcServerIdent object into a XDR stream.- Specified by:
xdrEncodein interfaceXdrAble- Parameters:
xdr- XDR stream to which information is sent for encoding.- Throws:
OncRpcException- if an ONC/RPC error occurs.java.io.IOException- if an I/O error occurs.
-
xdrDecode
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
Decodes -- that is: deserializes -- an OncRpcServerIdent object from a XDR stream.- Specified by:
xdrDecodein interfaceXdrAble- Parameters:
xdr- XDR stream from which decoded information is retrieved.- Throws:
OncRpcException- if an ONC/RPC error occurs.java.io.IOException- if an I/O error occurs.
-
-