|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoemware.core.ServiceManager
public final class ServiceManager
The service manager. This class is the base for all java applications. When
a server/module is started/initialized, it is done so here. If a stop service
is registered, then it interacts with the service manager. There will only be
one instance of this singleton running. The service manager executes the
start/stop chains registered.
The startup/shutdown is modular so you don't need to add application specific
initialization here.
The contract is to call the startup method when you begin and the shutdown
method when you need to exit :-^
| Field Summary | |
|---|---|
static int |
STATE_INITIALIZE
|
static int |
STATE_RUNNING
|
static int |
STATE_STARTING
|
static int |
STATE_STOPPED
|
static int |
STATE_STOPPING
|
| Method Summary | |
|---|---|
java.lang.String |
getAppDir()
|
java.lang.String |
getBaseDir()
|
java.lang.String |
getDataDir()
|
java.lang.String |
getEnvName()
|
static ServiceManager |
getInstance()
Returns the (only) instance of this class. |
short |
getInstanceId()
|
short |
getNodeId()
|
int |
getRunState()
|
java.lang.String |
getServiceName()
|
long |
getStartTime()
|
long |
getUptime()
|
boolean |
isRunning()
|
boolean |
isStopping()
|
static void |
main(java.lang.String[] pArgs)
The main method. |
void |
shutdown()
The stop hook. |
void |
startup()
The start hook. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int STATE_INITIALIZE
public static final int STATE_STARTING
public static final int STATE_RUNNING
public static final int STATE_STOPPING
public static final int STATE_STOPPED
| Method Detail |
|---|
public final void startup()
throws ServiceException
ServiceException
public final void shutdown()
throws ServiceException
ServiceExceptionpublic static final void main(java.lang.String[] pArgs)
pArgs - The command line arguments.public final boolean isRunning()
public final boolean isStopping()
public final java.lang.String getServiceName()
public final java.lang.String getEnvName()
public final short getNodeId()
public final java.lang.String getAppDir()
public final java.lang.String getBaseDir()
public final java.lang.String getDataDir()
public final short getInstanceId()
public final int getRunState()
public final long getStartTime()
public final long getUptime()
public static final ServiceManager getInstance()
throws ServiceException
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||