Package jade.imtp.leap.JICP
Class JICPServer
- java.lang.Object
-
- java.lang.Thread
-
- jade.imtp.leap.JICP.JICPServer
-
- All Implemented Interfaces:
JICPMediatorManager,PDPContextManager.Listener,Runnable
public class JICPServer extends Thread implements PDPContextManager.Listener, JICPMediatorManager
Class declaration- Author:
- Giovanni Caire - TILAB, Ronnie Taib - Motorola, Nicolas Lhuillier - Motorola, Steffen Rusitschka - Siemens
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCEPT_LOCAL_HOST_ONLYstatic StringACCEPT_MEDIATORSstatic StringUNCHECK_LOCAL_HOST-
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Fields inherited from interface jade.imtp.leap.JICP.JICPMediatorManager
LEAP_PROPERTY_FILE, LEAP_PROPERTY_FILE_DEFAULT, PDP_CONTEXT_MANAGER_CLASS
-
-
Constructor Summary
Constructors Constructor Description JICPServer(Profile p, JICPPeer myPeer, ICP.Listener l, ConnectionFactory f, int max)Constructor declaration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegisterMediator(String id)Called by a Mediator to notify that it is no longer activeStringgetLocalHost()Retrieve the local host of this JICPMediatorManagerintgetLocalPort()Retrieve the local port of this JICPMediatorManagervoidhandlePDPContextClosed(String id)Called by the PDPContextManager (if any)voidrun()JICPServer thread entry point.voidshutdown()Shut down this JICP servervoidtick(long currentTime)Called by the JICPPeer ticker at each tick-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
ACCEPT_LOCAL_HOST_ONLY
public static final String ACCEPT_LOCAL_HOST_ONLY
- See Also:
- Constant Field Values
-
UNCHECK_LOCAL_HOST
public static final String UNCHECK_LOCAL_HOST
- See Also:
- Constant Field Values
-
ACCEPT_MEDIATORS
public static final String ACCEPT_MEDIATORS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JICPServer
public JICPServer(Profile p, JICPPeer myPeer, ICP.Listener l, ConnectionFactory f, int max) throws ICPException
Constructor declaration- Throws:
ICPException
-
-
Method Detail
-
getLocalPort
public int getLocalPort()
Description copied from interface:JICPMediatorManagerRetrieve the local port of this JICPMediatorManager- Specified by:
getLocalPortin interfaceJICPMediatorManager
-
getLocalHost
public String getLocalHost()
Description copied from interface:JICPMediatorManagerRetrieve the local host of this JICPMediatorManager- Specified by:
getLocalHostin interfaceJICPMediatorManager
-
shutdown
public void shutdown()
Shut down this JICP server
-
run
public void run()
JICPServer thread entry point. Accept incoming connections and for each of them start a ConnectionHandler that handles it.
-
tick
public void tick(long currentTime)
Called by the JICPPeer ticker at each tick
-
deregisterMediator
public void deregisterMediator(String id)
Called by a Mediator to notify that it is no longer active- Specified by:
deregisterMediatorin interfaceJICPMediatorManager
-
handlePDPContextClosed
public void handlePDPContextClosed(String id)
Called by the PDPContextManager (if any)- Specified by:
handlePDPContextClosedin interfacePDPContextManager.Listener
-
-