summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/process/StandardServer.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
committerabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
commit0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch)
tree5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/process/StandardServer.java
parent036cbdba66f804743c4c838ed598d6972c4b3e17 (diff)
More code cleanup:
Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class
Diffstat (limited to 'source/com/c2kernel/process/StandardServer.java')
-rw-r--r--[-rwxr-xr-x]source/com/c2kernel/process/StandardServer.java39
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;
}