public abstract class Daemon<T extends ProtocolContext> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ProtocolContextFactory<T> |
contextFactory |
protected DaemonContext<T> |
daemonContext |
protected org.apache.mina.core.service.IoAcceptor |
ioAcceptor |
| Constructor and Description |
|---|
Daemon() |
Daemon(ProtocolContextFactory<T> contextFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configure(DaemonContext<T> daemonContext) |
protected org.apache.mina.core.service.IoAcceptor |
createAcceptor(DaemonContext<T> daemonContext) |
protected org.apache.mina.core.service.IoAcceptor |
createIoAcceptor(DaemonContext<T> daemonContext) |
DaemonContext<T> |
getContext() |
EventService |
getEventService() |
static Date |
getReleaseDate()
Returns the release date of the current version.
|
static String |
getVersion()
Returns the current version of the API.
|
boolean |
isStarted() |
boolean |
isStarting() |
void |
onShutdown() |
void |
onStart() |
protected void |
postStartup()
Invoked after startup, for subclasses to override.
|
protected void |
preStartup()
Invoked before startup, for subclasses to override.
|
void |
setContextFactory(ProtocolContextFactory<T> contextFactory) |
void |
shutdown() |
boolean |
startListeningInterface(InetAddress addressToBind,
int portToBind) |
boolean |
startup() |
void |
stopListeningInterface(InetAddress addressToBind,
int portToBind) |
protected abstract boolean |
verifyStartup() |
protected org.apache.mina.core.service.IoAcceptor ioAcceptor
protected ProtocolContextFactory<T extends ProtocolContext> contextFactory
protected DaemonContext<T extends ProtocolContext> daemonContext
public Daemon(ProtocolContextFactory<T> contextFactory)
public Daemon()
public void setContextFactory(ProtocolContextFactory<T> contextFactory)
public EventService getEventService()
public static String getVersion()
public static Date getReleaseDate()
public final boolean startup()
throws IOException
IOExceptionprotected abstract boolean verifyStartup()
public void shutdown()
protected abstract void configure(DaemonContext<T> daemonContext) throws IOException
IOExceptionpublic DaemonContext<T> getContext()
public boolean startListeningInterface(InetAddress addressToBind, int portToBind)
public void stopListeningInterface(InetAddress addressToBind, int portToBind)
protected org.apache.mina.core.service.IoAcceptor createAcceptor(DaemonContext<T> daemonContext)
protected org.apache.mina.core.service.IoAcceptor createIoAcceptor(DaemonContext<T> daemonContext)
protected void preStartup()
protected void postStartup()
public boolean isStarted()
public boolean isStarting()
public void onStart()
throws IOException
IOExceptionpublic void onShutdown()
Copyright © 2012. All Rights Reserved.