public class jportmap
extends org.acplt.oncrpc.server.OncRpcServerStub
implements org.acplt.oncrpc.server.OncRpcDispatchable
jportmap implements a Java-based ONC/RPC port mapper,
speaking the widely deployed protocol version 2.
This class can be either used stand-alone (a static main is
provided for this purpose) or as part of an application. In this case you
should check first for another portmap already running before starting your
own one.
| Modifier and Type | Field and Description |
|---|---|
InetAddress[] |
locals
List of IP addresses assigned to this host.
|
static int |
PMAP_PORT
Well-known port where the portmap process can be found on Internet hosts.
|
static int |
PMAP_PROGRAM
Program number of the portmapper as defined in RFC 1832.
|
static int |
PMAP_VERSION
Program version number of the portmapper as defined in RFC 1832.
|
Vector |
servers
The list of registrated servers.
|
| Constructor and Description |
|---|
jportmap()
Create a new portmap instance, create the transport registration
information and UDP and TCP-based transports, which will be bound
later to port 111.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispatchOncRpcCall(org.acplt.oncrpc.server.OncRpcCallInformation call,
int program,
int version,
int procedure)
Dispatch incomming ONC/RPC calls to the individual handler functions.
|
static void |
main(String[] args)
Create an instance of an ONC/RPC portmapper and run it.
|
public InetAddress[] locals
public Vector servers
public static final int PMAP_PORT
public static final int PMAP_PROGRAM
public static final int PMAP_VERSION
public jportmap()
throws org.acplt.oncrpc.OncRpcException,
IOException
org.acplt.oncrpc.OncRpcException - in case of an RPC error.IOException - in case of an IO error.public void dispatchOncRpcCall(org.acplt.oncrpc.server.OncRpcCallInformation call,
int program,
int version,
int procedure)
throws org.acplt.oncrpc.OncRpcException,
IOException
dispatchOncRpcCall in interface org.acplt.oncrpc.server.OncRpcDispatchablecall - The ONC/RPC call, with references to the transport and
XDR streams to use for retrieving parameters and sending replies.program - the portmap's program number, 100000version - the portmap's protocol version, 2procedure - the procedure to call.org.acplt.oncrpc.OncRpcException - if an ONC/RPC error occurs.IOException - if an I/O error occurs.public static void main(String[] args)
run() method without any parameters,
but instead supply it the transports to handle. Registration and
deregistration is not necessary and not possible.args - An array containing the command line arguments.Copyright © 2016. All rights reserved.