com.maverick.nio
Class Daemon<T extends ProtocolContext>
java.lang.Object
com.maverick.nio.Daemon<T>
public abstract class Daemon<T extends ProtocolContext>
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ioAcceptor
protected org.apache.mina.core.service.IoAcceptor ioAcceptor
contextFactory
protected ProtocolContextFactory<T extends ProtocolContext> contextFactory
daemonContext
protected DaemonContext<T extends ProtocolContext> daemonContext
Daemon
public Daemon(ProtocolContextFactory<T> contextFactory)
Daemon
public Daemon()
setContextFactory
public void setContextFactory(ProtocolContextFactory<T> contextFactory)
getEventService
public EventService getEventService()
getVersion
public static String getVersion()
- Returns the current version of the API.
getReleaseDate
public static Date getReleaseDate()
- Returns the release date of the current version.
startup
public final boolean startup()
throws IOException
- Throws:
IOException
verifyStartup
protected abstract boolean verifyStartup()
shutdown
public void shutdown()
configure
protected abstract void configure(DaemonContext<T> daemonContext)
throws IOException
- Throws:
IOException
getContext
public DaemonContext<T> getContext()
startListeningInterface
public boolean startListeningInterface(InetAddress addressToBind,
int portToBind)
stopListeningInterface
public void stopListeningInterface(InetAddress addressToBind,
int portToBind)
createAcceptor
protected org.apache.mina.core.service.IoAcceptor createAcceptor(DaemonContext<T> daemonContext)
createIoAcceptor
protected org.apache.mina.core.service.IoAcceptor createIoAcceptor(DaemonContext<T> daemonContext)
preStartup
protected void preStartup()
- Invoked before startup, for subclasses to override.
postStartup
protected void postStartup()
- Invoked after startup, for subclasses to override.
isStarted
public boolean isStarted()
isStarting
public boolean isStarting()
onStart
public void onStart()
throws IOException
- Throws:
IOException
onShutdown
public void onShutdown()
Copyright © 2012. All Rights Reserved.