|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object AbstractExecutableThreadService jhomenet.server.console.ConsoleService
public abstract class ConsoleService
A service that is responsible for reading user input from the server console.
Id: $Id: $
Field Summary | |
---|---|
protected AuthManager |
authManager
Reference to the authentication manager. |
static java.lang.String |
ENV_HARDWAREMANAGER
Known console environment object keys. |
static java.lang.String |
ENV_WORKQUEUE
|
protected java.util.ArrayList<Session> |
sessions
List of sessions created by this service. |
Constructor Summary | |
---|---|
ConsoleService(java.lang.Boolean displayConsole,
AuthManager authManager,
PluginContext pluginContext,
ServerContext serverContext)
|
Method Summary | |
---|---|
protected abstract Session |
acceptNewSession(IWorkQueue workQueue)
Waits for a connection request. |
protected void |
checkForNewSessions()
Listens for connection requests. |
void |
executeImpl()
Execute the service. |
java.lang.String |
getServiceName()
|
void |
serviceIsInitializing()
This method is called by the service manager notifying this class (or service) that the service is initializing. |
void |
serviceIsStopping()
This method is called by the service manager notifying this class (or service) that the service is about to stop. |
void |
sessionEnded(Session session)
Notifies this server that a particular session is ending. |
protected abstract void |
sessionEndedInternal(Session session)
Notify the implementing service class that a session has ended. |
void |
setDisplayConsole(java.lang.Boolean displayConsole)
|
boolean |
shouldStartOnStartup()
|
void |
shutDown()
Requests that the server stop taking connections and terminate any current sessions. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final java.util.ArrayList<Session> sessions
protected final AuthManager authManager
public static final java.lang.String ENV_HARDWAREMANAGER
environmentObjects
map.
public static final java.lang.String ENV_WORKQUEUE
Constructor Detail |
---|
public ConsoleService(java.lang.Boolean displayConsole, AuthManager authManager, PluginContext pluginContext, ServerContext serverContext)
loginService
- pluginContext
- serverContext
- serverConfiguration
- Method Detail |
---|
public boolean shouldStartOnStartup()
jhomenet.commons.service.IExecutableService#shouldStartOnStartup()
public void serviceIsInitializing()
jhomenet.commons.service.AbstractExecutableThreadService#serviceIsInitializing()
public void executeImpl()
jhomenet.commons.service.AbstractExecutableThreadService#execute()
public void serviceIsStopping()
jhomenet.commons.service.AbstractExecutableThreadService#serviceIsStopping()
public java.lang.String getServiceName()
jhomenet.commons.service.IService#getServiceName()
protected void checkForNewSessions()
protected abstract Session acceptNewSession(IWorkQueue workQueue) throws java.lang.InterruptedException
java.lang.InterruptedException
public final void setDisplayConsole(java.lang.Boolean displayConsole)
displayConsole
- the displayConsole to setpublic void shutDown()
public void sessionEnded(Session session)
session
- the session that has terminatedprotected abstract void sessionEndedInternal(Session session)
session
- The session that has endedpublic java.lang.String toString()
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |