Package org.acplt.oncrpc.apps.jportmap
Class jportmap
java.lang.Object
org.acplt.oncrpc.server.OncRpcServerStub
org.acplt.oncrpc.apps.jportmap.jportmap
- All Implemented Interfaces:
OncRpcDispatchable
The class
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.
- Version:
- $Revision: 1.2 $ $Date: 2003/08/14 11:26:50 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of IP addresses assigned to this host.static final intWell-known port where the portmap process can be found on Internet hosts.static final intProgram number of the portmapper as defined in RFC 1832.static final intProgram version number of the portmapper as defined in RFC 1832.The list of registrated servers.Fields inherited from class org.acplt.oncrpc.server.OncRpcServerStub
info, shutdownSignal, transports -
Constructor Summary
ConstructorsConstructorDescriptionjportmap()Create a new portmap instance, create the transport registration information and UDP and TCP-based transports, which will be bound later to port 111. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchOncRpcCall(OncRpcCallInformation call, int program, int version, int procedure) Dispatch incomming ONC/RPC calls to the individual handler functions.static voidCreate an instance of an ONC/RPC portmapper and run it.Methods inherited from class org.acplt.oncrpc.server.OncRpcServerStub
close, getCharacterEncoding, register, registerAuthenticationScheme, run, run, setCharacterEncoding, stopRpcProcessing, unregister
-
Field Details
-
locals
List of IP addresses assigned to this host. Will be filled later by constructor. -
servers
The list of registrated servers. -
PMAP_PORT
public static final int PMAP_PORTWell-known port where the portmap process can be found on Internet hosts.- See Also:
-
PMAP_PROGRAM
public static final int PMAP_PROGRAMProgram number of the portmapper as defined in RFC 1832.- See Also:
-
PMAP_VERSION
public static final int PMAP_VERSIONProgram version number of the portmapper as defined in RFC 1832.- See Also:
-
-
Constructor Details
-
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. The constructor does not start the dispatcher loop.- Throws:
OncRpcException- in case of an RPC error.IOException- in case of an IO error.
-
-
Method Details
-
dispatchOncRpcCall
public void dispatchOncRpcCall(OncRpcCallInformation call, int program, int version, int procedure) throws OncRpcException, IOException Dispatch incomming ONC/RPC calls to the individual handler functions. The CALLIT method is currently unimplemented.- Specified by:
dispatchOncRpcCallin interfaceOncRpcDispatchable- Parameters:
call- 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.- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.- See Also:
-
main
Create an instance of an ONC/RPC portmapper and run it. As we have to bootstrap the ONC/RPC port information chain, we do not use the usual overloadedrun()method without any parameters, but instead supply it the transports to handle. Registration and deregistration is not necessary and not possible.- Parameters:
args- An array containing the command line arguments.
-