|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.distinct.rpc.Pmap
Interface to the portmapper.
| Field Summary | |
static int |
PMAPPORT
|
static int |
PMAPPROC_CALLIT
|
static int |
PMAPPROC_DUMP
|
static int |
PMAPPROC_GETPORT
|
static int |
PMAPPROC_NULL
|
static int |
PMAPPROC_SET
|
static int |
PMAPPROC_UNSET
|
static int |
PMAPPROG
|
static int |
PMAPVERS
|
static int |
PMAPVERS_ORIG
|
static int |
PMAPVERS_PROTO
|
static int |
TRANSIENT_RANGE
|
| Constructor Summary | |
Pmap()
|
|
Pmap(int progp,
int versp,
int protp,
int portp)
Creates a portmapper entry. |
|
| Method Summary | |
int |
getPort(java.net.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. |
static int |
getTransient(int vers,
int port,
boolean stream)
Contacts the local Portmapper to register a transient callback server. |
int |
indirectCall(java.net.InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout)
Calls a server via RPCBind's INDIRECT interface (and also sets the portnumber of the server in the Pmap object). |
int |
remoteCall(java.net.InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout)
Calls a server via the Portmapper's CALLIT interface (and also sets the portnumber of the server in the Pmap object). |
boolean |
set(java.net.InetAddress host)
Registeres an entry in the portmapper of a given host. This method creates a temporary UDP client for calling the portmapper. |
boolean |
unset(java.net.InetAddress host)
Unregisteres an entry in the portmapper of a given host. |
void |
xdr_decode(XDRStream xdrs)
Decodes a portmapper entry in compliance to RFC 1832 (XDR). |
void |
xdr_encode(XDRStream xdrs)
Encodes a portmapper entry in compliance to RFC 1832 (XDR). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int PMAPPORT
public static final int PMAPPROG
public static final int PMAPVERS
public static final int PMAPVERS_PROTO
public static final int PMAPVERS_ORIG
public static final int PMAPPROC_NULL
public static final int PMAPPROC_SET
public static final int PMAPPROC_UNSET
public static final int PMAPPROC_GETPORT
public static final int PMAPPROC_DUMP
public static final int PMAPPROC_CALLIT
public static final int TRANSIENT_RANGE
| Constructor Detail |
public Pmap()
public Pmap(int progp,
int versp,
int protp,
int portp)
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.| Method Detail |
public void xdr_encode(XDRStream xdrs)
xdr_encode in interface XDRTypexdrs - The XDR output stream.
public void xdr_decode(XDRStream xdrs)
throws RPCError
xdr_decode in interface XDRTypexdrs - The XDR input stream.public boolean set(java.net.InetAddress host)
host - The host where the portmapper lives.public boolean unset(java.net.InetAddress host)
host - The host where the portmapper lives.public int getPort(java.net.InetAddress host)
host - The host where the portmapper lives.
public int remoteCall(java.net.InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout)
throws RPCError,
java.io.IOException
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).java.io.IOException - When the call fails because the socket connetion fails.RPCError - When the calls fails for any other reason.
public int indirectCall(java.net.InetAddress host,
int proc,
XDRType in,
XDRType out,
int timeout)
throws RPCError,
java.io.IOException
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).java.io.IOException - When the call fails because the socket connetion fails.RPCError - When the calls fails for any other reason.
public static int getTransient(int vers,
int port,
boolean stream)
vers - A version number of the program of the callback server.port - The port on which the callback server waits for requests.stream - true for a TCP server, false for UDP.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||