|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread com.ibm.etools.iseries.subsystems.qsys.api.SystemCommunicationsDaemon
public class SystemCommunicationsDaemon
Communications daemon that can be used by other functions for receiving incoming socket requests. Functions need to implement the ICommunicationsDaemonHandler interface and register a unique 4 byte id (as an integer) which the server sends across the socket to let the daemon know which local function to pass the socket off to.
Nested Class Summary | |
---|---|
protected class |
SystemCommunicationsDaemon.CommunicationHandlerThread
Inner class for running ICommunicationHandlers on a new thread. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static String |
copyright
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
boolean |
addCommunicationsDaemonHandler(ISystemCommunicationsDaemonHandler handler,
int requestKey)
Add a new CommunicationsDaemonHandler |
static void |
addDaemonListener(ISystemCommunicationsDaemonListener listener)
Add an ISystemCommunicationsDaemonListener listener to receive state change events from the SystemCommunicationsDaemon. |
static SystemCommunicationsDaemon |
getInstance()
Returns the singleton instance of this class. |
static int |
getNextKey()
getNextKey() can be called to generated a dynamic key used by any communications handler. |
int |
getPort()
Returns the port the daemon is currently running on, or zero if the daemon is not running. |
static boolean |
isAutoStart()
Returns the user preference for auto-starting the communications daemon when the Workbench starts. |
boolean |
isRunning()
Check to see if the iSeries communications daemon is running |
void |
removeCommunicationsDaemonHandler(int requestKey)
Remove a CommunicationsDaemonHandler |
static void |
removeDaemonListener(ISystemCommunicationsDaemonListener listener)
Remove the ISystemCommunicationsDaemonListener listener. |
void |
run()
|
void |
startDaemon()
Start the communications daemon if it is not already running |
void |
startDaemon(boolean displayErrors)
Start the communications daemon if it is not already running |
void |
stopDaemon()
Stops the communications daemon if it is running |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String copyright
Method Detail |
---|
public static SystemCommunicationsDaemon getInstance()
public void run()
run
in interface Runnable
run
in class Thread
Thread.run()
public void startDaemon()
public void startDaemon(boolean displayErrors)
displayErrors
- true if error messages should be displayed, false
if they should be not be displayed.public void stopDaemon()
public int getPort()
public boolean isRunning()
public static boolean isAutoStart()
public boolean addCommunicationsDaemonHandler(ISystemCommunicationsDaemonHandler handler, int requestKey)
requestKey
- The request key must be four byte integer key used by this handler. This
is the first thing that much be sent over the socket from the corresponding
client / server when connecting to the RSE communications daemon. The daemon
when then compare this integer against all registered handlers and pass off the
socket connection (via the handleRequest method) to the first match.
Use the SystemCommunicationsDaemon.getInstance().addCommunicationsDaemonHandler(...)
method to register with the daemon. There is also a corresponding remove method.
Known handlers:
RSEInteractiveJobHandler 0x67DF7A14
CODECommIntegrationHandler 0xA387E2CD
iSeries DebugEngine
The range of integers from 0xD0000000 to 0xFFFFFFFF is reserved for dyanmically
generated kes.
ISystemCommunicationsDaemonHandler
public void removeCommunicationsDaemonHandler(int requestKey)
ISystemCommunicationsDaemonHandler
public static int getNextKey()
public static void addDaemonListener(ISystemCommunicationsDaemonListener listener)
public static void removeDaemonListener(ISystemCommunicationsDaemonListener listener)
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |