All Packages Class Hierarchy This Package Previous Next Index
Class distinct.rpc.Pmap
java.lang.Object
|
+----distinct.rpc.Pmap
- public class Pmap
- extends Object
- implements XDRType
Interface to the portmapper.
-
PMAPPORT
-
-
PMAPPROC_CALLIT
-
-
PMAPPROC_DUMP
-
-
PMAPPROC_GETPORT
-
-
PMAPPROC_NULL
-
-
PMAPPROC_SET
-
-
PMAPPROC_UNSET
-
-
PMAPPROG
-
-
PMAPVERS
-
-
PMAPVERS_ORIG
-
-
PMAPVERS_PROTO
-
-
Pmap()
-
-
Pmap(int, int, int, int)
- Creates a portmapper entry.
-
getPort(InetAddress)
- Requests the portnumber of an entry in the portmapper of a given host
and sets the portnumber of the server in the Pmap object.
-
indirectCall(InetAddress, int, XDRType, XDRType, int)
- Calls a server via RPCBind's INDIRECT interface
(and also sets the portnumber of the server in the Pmap object).
-
remoteCall(InetAddress, int, XDRType, XDRType, int)
- Calls a server via the Portmapper's CALLIT interface
(and also sets the portnumber of the server in the Pmap object).
-
set(InetAddress)
- Registeres an entry in the portmapper of a given host.
This method creates a temporary UDP client for calling the portmapper.
-
unset(InetAddress)
- Unregisteres an entry in the portmapper of a given host.
-
xdr_decode(XDRStream)
- Decodes a portmapper entry in compliance to RFC 1832 (XDR).
-
xdr_encode(XDRStream)
- Encodes a portmapper entry in compliance to RFC 1832 (XDR).
PMAPPORT
public static final int PMAPPORT
PMAPPROG
public static final int PMAPPROG
PMAPVERS
public static final int PMAPVERS
PMAPVERS_PROTO
public static final int PMAPVERS_PROTO
PMAPVERS_ORIG
public static final int PMAPVERS_ORIG
PMAPPROC_NULL
public static final int PMAPPROC_NULL
PMAPPROC_SET
public static final int PMAPPROC_SET
PMAPPROC_UNSET
public static final int PMAPPROC_UNSET
PMAPPROC_GETPORT
public static final int PMAPPROC_GETPORT
PMAPPROC_DUMP
public static final int PMAPPROC_DUMP
PMAPPROC_CALLIT
public static final int PMAPPROC_CALLIT
Pmap
public Pmap()
Pmap
public Pmap(int progp,
int versp,
int protp,
int portp)
- Creates a portmapper entry.
- Parameters:
- progp - The program ID.
- versp - The version of the program.
- protp - The protocol identifier (JRPC.kIPPROTO_TCP or JRPC.kIPPROTO_UDP).
- portp - The port number.
xdr_encode
public void xdr_encode(XDRStream xdrs)
- Encodes a portmapper entry in compliance to RFC 1832 (XDR).
- Parameters:
- xdrs - The XDR output stream.
xdr_decode
public void xdr_decode(XDRStream xdrs) throws RPCError
- Decodes a portmapper entry in compliance to RFC 1832 (XDR).
- Parameters:
- xdrs - The XDR input stream.
set
public boolean set(InetAddress host)
- Registeres an entry in the portmapper of a given host.
This method creates a temporary UDP client for calling the portmapper.
- Parameters:
- host - The host where the portmapper lives.
- Returns:
- true on success
unset
public boolean unset(InetAddress host)
- Unregisteres an entry in the portmapper of a given host.
This method creates a temporary UDP client for calling the portmapper.
- Parameters:
- host - The host where the portmapper lives.
- Returns:
- true on success
getPort
public int getPort(InetAddress host)
- Requests the portnumber of an entry in the portmapper of a given host
and sets the portnumber of the server in the Pmap object.
This method creates a temporary UDP client for calling the portmapper.
- Parameters:
- host - The host where the portmapper lives.
- Returns:
- The port number on success, 0 on error.
remoteCall
public int remoteCall(InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout) throws RPCError, IOException
- Calls a server via the Portmapper's CALLIT interface
(and also sets the portnumber of the server in the Pmap object).
This method creates a temporary UDP client for calling the portmapper. In case
of any error at the remote site, the Portmapper sends no reply at all
(only the timeout will terminate the call).
- Parameters:
- host - The host where the portmapper lives.
- proc - The ID of the request function as defined in the .x IDL file.
- in - The input parameter (as it has to be marshalled it must be derived from XDRType).
- out - The output parameter (as it has to be marshalled it must be derived from XDRType).
- timeout - The timeout value for this call in ms (0 means no timeout at all, -1 means immediate return).
- Returns:
- The port number on success, 0 on error.
- Throws: IOException
- When the call fails because the socket connetion fails.
- Throws: RPCError
- When the calls fails for any other reason.
indirectCall
public int indirectCall(InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout) throws RPCError, IOException
- Calls a server via RPCBind's INDIRECT interface
(and also sets the portnumber of the server in the Pmap object).
This method creates a temporary UDP client for calling RPCBind. In case
of an error at the remote site, RPCBind reports back an error-code.
- Parameters:
- host - The host where the portmapper lives.
- proc - The ID of the request function as defined in the .x IDL file.
- in - The input parameter (as it has to be marshalled it must be derived from XDRType).
- out - The output parameter (as it has to be marshalled it must be derived from XDRType).
- timeout - The timeout value for this call in ms (0 means no timeout at all, -1 means immediate return).
- Returns:
- The port number on success, 0 on error.
- Throws: IOException
- When the call fails because the socket connetion fails.
- Throws: RPCError
- When the calls fails for any other reason.
All Packages Class Hierarchy This Package Previous Next Index