diff options
Diffstat (limited to 'source/com/c2kernel/process/StandardServer.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/process/StandardServer.java | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/source/com/c2kernel/process/StandardServer.java b/source/com/c2kernel/process/StandardServer.java index 2c9bcaf..72b761e 100755..100644 --- a/source/com/c2kernel/process/StandardServer.java +++ b/source/com/c2kernel/process/StandardServer.java @@ -16,21 +16,21 @@ import org.tanukisoftware.wrapper.WrapperManager; import com.c2kernel.utils.Logger;
/**************************************************************************
- * Base class for all servers i.e. c2k processes that serve Entities
+ * Base class for all servers i.e. c2k processes that serve Entities
*
* @author $Author: abranson $ $Date: 2005/04/28 13:49:43 $
* @version $Revision: 1.47 $
**************************************************************************/
public class StandardServer extends AbstractMain implements WrapperListener
{
- protected static StandardServer server;
+ protected static StandardServer server;
/**************************************************************************
* C2KRootPOA suitable for Factory objects
**************************************************************************/
-
+
@@ -44,26 +44,27 @@ public class StandardServer extends AbstractMain implements WrapperListener {
// read args and init Gateway
standardSetUp(args);
-
+
// connect to LDAP as root
Gateway.connect();
-
+
//start console
Logger.initConsole("ItemServer");
-
+
//initialize the server objects
Gateway.startServer();
-
+
Logger.msg(5, "StandardServer::standardInitialisation - complete.");
}
-
+
/**************************************************************************
* Sets up and runs and item server
**************************************************************************/
- public Integer start(String[] args)
- {
+ @Override
+ public Integer start(String[] args)
+ {
try
{
//initialise everything
@@ -76,17 +77,18 @@ public class StandardServer extends AbstractMain implements WrapperListener }
return null;
}
-
+
public static void main(String[] args) {
server = new StandardServer();
AbstractMain.runningAsWrapper = true;
WrapperManager.start( server, args );
}
-
+
/**
*
*/
- public void controlEvent(int event) {
+ @Override
+ public void controlEvent(int event) {
if (WrapperManager.isControlledByNativeWrapper()) {
// The Wrapper will take care of this event
} else {
@@ -105,11 +107,12 @@ public class StandardServer extends AbstractMain implements WrapperListener * Closes all listeners, quits the VM.
* This method should be called to kill the server process
* e.g. from the NT service wrapper
- **************************************************************************/
- public int stop(int arg0) {
+ **************************************************************************/
+ @Override
+ public int stop(int arg0) {
try
- {
- // close gateway
+ {
+ // close gateway
standardTearDown();
}
catch( Exception ex )
@@ -117,7 +120,7 @@ public class StandardServer extends AbstractMain implements WrapperListener Logger.error(ex);
return 1;
}
-
+
Logger.msg("StandardServer::shutdown - complete. ");
return 0;
}
|
