org.eclipse.emf.emfstore.internal.server
Class EMFStoreController

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.EMFStoreController
All Implemented Interfaces:
Runnable, org.eclipse.equinox.app.IApplication

public class EMFStoreController
extends Object
implements org.eclipse.equinox.app.IApplication, Runnable

The EMFStoreController is controlling startup and shutdown of the EmfStore.

Author:
koegel, wesendonk, jfaltermeier

Field Summary
 
Fields inherited from interface org.eclipse.equinox.app.IApplication
EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART
 
Constructor Summary
EMFStoreController()
           
 
Method Summary
 AccessControl getAccessControl()
          Returns the AccessControl component of the EMFStore controller.
static EMFStoreController getInstance()
          Return the singleton instance of EmfStoreControler.
 ServerSpace getServerSpace()
          Returns the ServerSpace.
 void run()
          
 void run(boolean waitForTermination)
          Run the server.
static EMFStoreController runAsNewThread()
          Starts the server in a new thread.
 void shutdown(FatalESException exception)
          Shutdown EmfStore due to an fatal exception.
 Object start(org.eclipse.equinox.app.IApplicationContext context)
          
 void stop()
          
 void stopServer()
          Stops the EMFStore gracefully.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMFStoreController

public EMFStoreController()
Method Detail

start

public Object start(org.eclipse.equinox.app.IApplicationContext context)
             throws FatalESException

Specified by:
start in interface org.eclipse.equinox.app.IApplication
Throws:
FatalESException
See Also:
IApplication.start(org.eclipse.equinox.app.IApplicationContext)

run

public void run(boolean waitForTermination)
         throws FatalESException
Run the server.

Parameters:
waitForTermination - true if the server should force the calling thread to wait for its termination
Throws:
FatalESException - if the server fails fatally

getInstance

public static EMFStoreController getInstance()
Return the singleton instance of EmfStoreControler.

Returns:
the instance

stopServer

public void stopServer()
Stops the EMFStore gracefully.


shutdown

public void shutdown(FatalESException exception)
Shutdown EmfStore due to an fatal exception.

Parameters:
exception - the fatal exception that triggered the shutdown

run

public void run()

Specified by:
run in interface Runnable
See Also:
Runnable.run()

runAsNewThread

public static EMFStoreController runAsNewThread()
                                         throws FatalESException
Starts the server in a new thread.

Returns:
an controller for the running EMFStore
Throws:
FatalESException - in case of failure

getServerSpace

public ServerSpace getServerSpace()
Returns the ServerSpace.

Returns:
the server space

getAccessControl

public AccessControl getAccessControl()
Returns the AccessControl component of the EMFStore controller.

Returns:
the AccessControl component

stop

public void stop()

Specified by:
stop in interface org.eclipse.equinox.app.IApplication
See Also:
IApplication.stop()


Copyright © 2015. All Rights Reserved.