com.neeve.server.controller
Class SrvController

java.lang.Object
  extended by com.neeve.root.RootObject
      extended by com.neeve.daemon.controller.DmnController
          extended by com.neeve.server.controller.SrvController
All Implemented Interfaces:
ISrvAppServerStopper

public final class SrvController
extends com.neeve.daemon.controller.DmnController
implements ISrvAppServerStopper

Server controller.

This class supplies the main runtime entry point into the server.

Threading:
This class is not safe for concurrent access by multiple threads.

Nested Class Summary
static class SrvController.IntHistogramComputer
          Tracks statistics collection for timings stat.
static class SrvController.IntSeriesCollector
          Collects timings stats for a IStats.Series stat.
static class SrvController.StatsRunner
          The statistics runner Intended For Internal Use Only
 
Field Summary
 
Fields inherited from class com.neeve.daemon.controller.DmnController
FLG_NON_BLOCKING
 
Method Summary
 SrvAppManager getAppManager()
          Get the server application manager
 Object getBootstrapConfigurer()
          Gets the bootstrap Configurer for this SrvController if any is attached.
static SrvController getInstance(SrvConfigDescriptor configDescriptor)
          Get a server controller.
 void setBootstrapConfigurer(Object configurer)
          Tags this SrvController with an opaque bootstrap Configurer This is set by the server's main class at boot when an external configuration provider is registered.
 
Methods inherited from class com.neeve.daemon.controller.DmnController
getEventHandler, setEventHandler, setLauncher, start, stop, stop, stop
 
Methods inherited from class com.neeve.root.RootObject
getChecked, getThreaded, getTracer, setChecked, setTracer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.neeve.server.app.ISrvAppServerStopper
stop, stop
 

Method Detail

getInstance

public static final SrvController getInstance(SrvConfigDescriptor configDescriptor)
Get a server controller.

Parameters:
configDescriptor - The configuration descriptor that identifies the controller.
Returns:
Returns the created controller instance for the supplied descriptor.
Threading:
This method is safe for concurrent access by multiple threads.

There exists a single controller instance per server configuration descriptor i.e per server instance since each descriptor describes a server instance. If a controller for the supplied descriptor already exists, this method returns that instance. Otherwise, it creates a new instance and returns it to the user.


setBootstrapConfigurer

public void setBootstrapConfigurer(Object configurer)
Tags this SrvController with an opaque bootstrap Configurer

This is set by the server's main class at boot when an external configuration provider is registered. The Configurer may also be set by an embedded application that programmatically creates the server, so that the configuration object can be surfaced to applications after the server has loaded them. In this case, the Configurer should be set prior to the SrvController being started.

Parameters:
configurer - The Configurer to set.

getBootstrapConfigurer

public Object getBootstrapConfigurer()
Gets the bootstrap Configurer for this SrvController if any is attached.

Returns:
The bootstrap Configurer if set.

getAppManager

public final SrvAppManager getAppManager()
Get the server application manager



Copyright © 2016 Neeve Research, LLC. All Rights Reserved.