|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.fostore.Main
Standalone server for FOStore databases.
This class is public
because it has a main
entry
point for running as a standalone program.
Nested Class Summary | |
(package private) class |
Main.ConnectionRunnable
The Runnable class for incoming connections. |
(package private) class |
Main.ListenerRunnable
The Listener Thread class. |
(package private) class |
Main.TimeoutRunnable
The Timeout Runnable class. |
Field Summary | |
(package private) int |
backlog
The backlog for Socket.listen. |
private static int |
DEFAULT_BACKLOG
Default backlog. |
private static int |
DEFAULT_TIMEOUT
Default timeout. |
(package private) java.lang.Thread |
listenerThread
The Thread responsible for listening for incoming connection requests. |
(package private) static org.apache.commons.logging.Log |
logger
Logger |
private static I18NHelper |
msg
I18N support. |
(package private) int |
port
The port number to use for incoming connections. |
(package private) java.lang.String |
root
The root of the file system for database path names. |
(package private) java.util.HashSet |
serviceThreads
The set of Threads servicing incoming connections. |
(package private) static boolean |
shutdown
A flag indicating that the server is shutting down. |
(package private) static java.lang.Object |
shutdownSynchronizer
The synchronizing Object for the shutdown flag. |
(package private) java.util.Date |
startTime
The time this server started running. |
(package private) int |
timeout
The number of seconds with no activity before shutting down. |
(package private) static java.lang.Thread |
timeoutThread
The Thread responsible for detecting inactivity. |
Constructor Summary | |
Main()
Creates new Main |
Method Summary | |
(package private) static void |
flush()
Flush the standard output. |
(package private) static boolean |
getShutdown()
Test if the server is shutting down. |
(package private) void |
handleConnection(java.net.Socket socket)
Handle the incoming connection. |
static void |
main(java.lang.String[] args)
The main routine. |
(package private) static void |
print(java.lang.String s)
Print a message on the standard output. |
(package private) static void |
resetTimeout()
|
(package private) void |
run(java.lang.String[] args)
Run the main program. |
(package private) static void |
setShutdown()
Set the shutdown flag. |
(package private) void |
startListenerThread()
Start the Listener Thread. |
(package private) void |
startTimeoutThread()
Start the TimeoutThread. |
(package private) static void |
usage()
Print the usage message on standard output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final I18NHelper msg
static final org.apache.commons.logging.Log logger
int port
int backlog
private static final int DEFAULT_BACKLOG
int timeout
private static final int DEFAULT_TIMEOUT
java.lang.String root
final java.util.Date startTime
static boolean shutdown
static java.lang.Object shutdownSynchronizer
static java.lang.Thread timeoutThread
java.lang.Thread listenerThread
java.util.HashSet serviceThreads
Constructor Detail |
public Main()
Method Detail |
public static void main(java.lang.String[] args)
args
- the command line argumentsstatic void usage()
void run(java.lang.String[] args)
args
- the command line argumentsvoid startTimeoutThread()
static void resetTimeout()
void startListenerThread()
void handleConnection(java.net.Socket socket)
socket
- the socket connected by the listenerstatic boolean getShutdown()
static void setShutdown()
static void print(java.lang.String s)
s
- the message to print.static void flush()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |