org.acplt.oncrpc
public class OncRpcServerIdent extends java.lang.Object implements XdrAble
OncRpcServerIdent
represents 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 OncRpcServerIdent
can be directly serialized into an
encoding XDR stream (that is more political correct than "flushed down
the toilet").
Modifier and Type | Field and Description |
---|---|
int |
port
The port number of the ONC/RPC server in question.
|
int |
program
The program number of the ONC/RPC server in question.
|
int |
protocol
The protocol used for communicating with the ONC/RPC server in question.
|
int |
version
The program version number of the ONC/RPC server in question.
|
Constructor and Description |
---|
OncRpcServerIdent()
Constuct an
OncRpcServerIdent object 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 an
OncRpcServerIdent object with the
requested program number, version number, protocol type and port
number. |
OncRpcServerIdent(XdrDecodingStream xdr)
Constructs an
OncRpcServerIdent object and restores
its state from the given XDR stream. |
Modifier and Type | Method and Description |
---|---|
void |
xdrDecode(XdrDecodingStream xdr)
Decodes -- that is: deserializes -- an OncRpcServerIdent object
from a XDR stream.
|
void |
xdrEncode(XdrEncodingStream xdr)
Encodes -- that is: serializes -- an OncRpcServerIdent object
into a XDR stream.
|
public int program
public int version
public int protocol
OncRpcProtocols
interface.public int port
public OncRpcServerIdent()
OncRpcServerIdent
object with senseless
default values for the requested program number, version number,
protocol type and port number.public OncRpcServerIdent(int program, int version, int protocol, int port)
OncRpcServerIdent
object with the
requested program number, version number, protocol type and port
number.public OncRpcServerIdent(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
OncRpcServerIdent
object and restores
its state from the given XDR stream.OncRpcException
java.io.IOException
public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, java.io.IOException
xdrEncode
in interface XdrAble
xdr
- XDR stream to which information is sent for encoding.OncRpcException
- if an ONC/RPC error occurs.java.io.IOException
- if an I/O error occurs.public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
xdrDecode
in interface XdrAble
xdr
- XDR stream from which decoded information is retrieved.OncRpcException
- if an ONC/RPC error occurs.java.io.IOException
- if an I/O error occurs.