|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--org.garret.jipc.server.JIPCServer
Factory for local session. These session can be used to provide
synchornization and communitcation between threads in the same process.
It is possible to share tghe single session between all threads.
Also this class is used as server for remove sessions.
Server should be launched by
"java org.garret.jipc.server.JIPCServer [-d] PORT" command.
The following system proiperties can be soecified:
jipc.debug0 no debugging
1 trace all exceptions
2 trace session open/close requests
3 trace all requests
jipc.linger
| Field Summary | |
static int |
DEBUG_EXCEPTIONS
|
static int |
DEBUG_NONE
Debug levels |
static int |
DEBUG_REQUESTS
|
static int |
DEBUG_SESSIONS
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
JIPCServer(int port)
Constructor server for remote connections. |
|
| Method Summary | |
org.garret.jipc.JIPCSession |
create(java.lang.String address,
int port)
Create session instance. |
void |
dump(java.io.PrintStream out)
Dump information about state of the server: all active sessions and all primitives opened by these sessions |
static org.garret.jipc.JIPCFactory |
getInstance()
Get instance of the server |
static void |
main(java.lang.String[] args)
Server main function. |
void |
run()
This method is executed by thread accepting client connections |
void |
shutdown()
Shutdown the server |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DEBUG_EXCEPTIONS
public static final int DEBUG_NONE
public static final int DEBUG_REQUESTS
public static final int DEBUG_SESSIONS
| Constructor Detail |
public JIPCServer(int port)
throws java.io.IOException
port - port number at which client connections will be accepted| Method Detail |
public org.garret.jipc.JIPCSession create(java.lang.String address,
int port)
JIPCFactory
create in interface JIPCFactoryaddress - server host address (ignored for local sessions)port - server port (ignored for local sessions)
public void dump(java.io.PrintStream out)
throws JIPCException
out - output stream
JIPCExceptionpublic static org.garret.jipc.JIPCFactory getInstance()
public static void main(java.lang.String[] args)
throws java.lang.Exception
Command syntax:
java org.garret.jipc.server.JIPCServer [-d] PORT
Options:
-d start program in daemon mode without interactive dialog
Parameters:
PORT port at which server will accept client connections
Whithout "-d" option this functions starts interactive dialog.
The following commands are supported:
infoexithelp
When server is started in daemon mode, commands to the server can be sent
using org.garret.jipc.client.JIPCServerMonitor utility
java.lang.ExceptionJIPCServerMonitorpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void shutdown()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||