Package emissary.core.sentinel
Class Sentinel
- java.lang.Object
-
- emissary.core.sentinel.Sentinel
-
-
Field Summary
Fields Modifier and Type Field Description protected Configurator
config
static String
DEFAULT_NAMESPACE_NAME
protected boolean
enabled
protected static org.slf4j.Logger
logger
protected long
pollingInterval
protected Set<Protocol>
protocols
protected boolean
timeToQuit
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configure()
Get the Configuratorlong
getPollingInterval()
Get the currently configured polling intervalprotected void
init()
Initialize Protocolsstatic Sentinel
lookup()
Lookup the default Sentinel in theNamespace
void
quit()
Safely stop the monitoring Threadvoid
run()
Runnable interface where we get to monitor stuffprotected void
run(Protocol protocol)
static void
start()
Start up the Sentinel threadString
toString()
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
DEFAULT_NAMESPACE_NAME
public static final String DEFAULT_NAMESPACE_NAME
- See Also:
- Constant Field Values
-
config
protected Configurator config
-
pollingInterval
protected long pollingInterval
-
timeToQuit
protected boolean timeToQuit
-
enabled
protected boolean enabled
-
-
Constructor Detail
-
Sentinel
public Sentinel()
Create a Sentinel - set it running and bind into theNamespace
-
-
Method Detail
-
start
public static void start()
Start up the Sentinel thread
-
lookup
public static Sentinel lookup() throws NamespaceException
Lookup the default Sentinel in theNamespace
- Returns:
- The registered Sentinel
- Throws:
NamespaceException
-
getPollingInterval
public long getPollingInterval()
Get the currently configured polling interval- Returns:
- the currently configured polling interval
-
quit
public void quit()
Safely stop the monitoring Thread
-
run
public void run()
Runnable interface where we get to monitor stuff
-
run
protected void run(Protocol protocol)
-
configure
protected void configure()
Get the Configurator
-
init
protected void init()
Initialize Protocols
-
-