|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.acplt.oncrpc.apps.jportmap.OncRpcEmbeddedPortmap
public class OncRpcEmbeddedPortmap
The class OncRpcEmbeddedPortmap
provides an embeddable
portmap service, which is automatically started in its own thread if
the (operating) system does not already provide the portmap service.
If an embedded portmap service is started it will stop only after the
last ONC/RPC program has been deregistered.
Nested Class Summary | |
---|---|
(package private) class |
OncRpcEmbeddedPortmap.embeddedjportmap
Extend the portmap service so that it automatically takes itself out of service when the last ONC/RPC programs is deregistered. |
(package private) class |
OncRpcEmbeddedPortmap.OncRpcEmbeddedPortmapThread
The class OncRpcEmbeddedPortmapThread implements a thread
which will run an embedded portmap service. |
Field Summary | |
---|---|
protected OncRpcEmbeddedPortmap.embeddedjportmap |
embeddedPortmap
Portmap object acting as embedded portmap service or null
if no embedded portmap service is necessary because the operating
system already supplies one or another portmapper is already running. |
protected java.lang.Thread |
embeddedPortmapThread
References thread object running the embedded portmap service. |
Constructor Summary | |
---|---|
OncRpcEmbeddedPortmap()
Constructs an embeddable portmap service of class OncRpcEmbeddedPortmap and starts the service if no
other (external) portmap service is available. |
|
OncRpcEmbeddedPortmap(int checkTimeout)
Constructs an embeddable portmap service of class OncRpcEmbeddedPortmap and starts the service if no
other (external) portmap service is available. |
Method Summary | |
---|---|
boolean |
embeddedPortmapInUse()
Indicates whether the embedded portmap service is in use. |
jportmap |
getEmbeddedPortmap()
Returns object implementing the embedded portmap service. |
java.lang.Thread |
getEmbeddedPortmapServiceThread()
Returns the thread object running the embedded portmap service. |
static boolean |
isPortmapRunning()
Indicates whether a portmap service (regardless whether it's supplied by the operating system or an embedded portmap service) is currently running. |
static boolean |
isPortmapRunning(int checkTimeout)
Indicates whether a portmap service (regardless whether it's supplied by the operating system or an embedded portmap service) is currently running. |
void |
shutdown()
Stop the embedded portmap service if it is running. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OncRpcEmbeddedPortmap.embeddedjportmap embeddedPortmap
null
if no embedded portmap service is necessary because the operating
system already supplies one or another portmapper is already running.
protected java.lang.Thread embeddedPortmapThread
Constructor Detail |
---|
public OncRpcEmbeddedPortmap() throws OncRpcException, java.io.IOException
OncRpcEmbeddedPortmap
and starts the service if no
other (external) portmap service is available. This constructor is
the same as OncRpcEmbeddedPortmap
calling with a
timeout of 3 seconds.
The constructor starts the portmap service in its own thread and then returns.
OncRpcException
java.io.IOException
embeddedPortmapInUse()
public OncRpcEmbeddedPortmap(int checkTimeout) throws OncRpcException, java.io.IOException
OncRpcEmbeddedPortmap
and starts the service if no
other (external) portmap service is available.
The constructor starts the portmap service in its own thread and then returns.
checkTimeout
- timeout in milliseconds to wait before assuming
that no portmap service is currently available.
OncRpcException
java.io.IOException
embeddedPortmapInUse()
Method Detail |
---|
public static boolean isPortmapRunning()
true
, if a portmap service (either external or
embedded) is running and can be contacted.public static boolean isPortmapRunning(int checkTimeout)
checkTimeout
- timeout in milliseconds to wait before assuming
that no portmap service is currently available.
true
, if a portmap service (either external or
embedded) is running and can be contacted.public boolean embeddedPortmapInUse()
true
, if embedded portmap service is currently
used.public java.lang.Thread getEmbeddedPortmapServiceThread()
null
if no embedded portmap
service has been started.public jportmap getEmbeddedPortmap()
null
if no
embedded portmap service has been started.public void shutdown()
This method just signals the portmap thread to stop processing ONC/RPC portmap calls and to terminate itself after it has cleaned up after itself.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |