|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServerHandler
A ServerHandler is a class that handles an accepting socket.
Method Summary | |
---|---|
ServerHandler |
clone(ServerHandlerManager shm,
java.lang.String identifier,
ObservableProperties props)
Clone this server handler, and custmozie it with the given properties. |
void |
errlog(java.lang.String msg)
Log an error into this server's error log. |
ResourceReference |
getConfigResource()
Get the root, configuration resource for that server. |
java.lang.String |
getIdentifier()
Get this server identifier. |
java.net.InetAddress |
getInetAddress()
Get the network addresses on which this server is listening. |
void |
initialize(ServerHandlerManager shm,
java.lang.String id,
ObservableProperties props)
Initialize the server from the given set of properties. |
void |
log(java.lang.String msg)
Log a normal message into this server's log. |
void |
shutdown()
Shutdown this server handler. |
void |
start()
Start the server, after everything has been initialized. |
void |
trace(java.lang.String msg)
Emit a debugging trace on behalf of this server. |
Method Detail |
---|
java.lang.String getIdentifier()
void errlog(java.lang.String msg)
msg
- The message to log.void log(java.lang.String msg)
msg
- The message to log.void trace(java.lang.String msg)
msg
- The trace to emit.java.net.InetAddress getInetAddress()
ResourceReference getConfigResource()
ServerHandler clone(ServerHandlerManager shm, java.lang.String identifier, ObservableProperties props) throws ServerHandlerInitException
Once cloned, the new server is assumed to be running happily, as if it had been initialized.
shm
- The global server handler manager.identifier
- The new ServerHandler identifier.props
- The properties that overide part of the configuration of
the cloned server.
ServerHandlerInitException
- if initialization failed.void initialize(ServerHandlerManager shm, java.lang.String id, ObservableProperties props) throws ServerHandlerInitException
A Server instance that has initialize itself successfully is considered to be running.
shm
- The global server handler manager.identifier
- A String identifying the server.props
- The property set this server should use to initialize
itself.
ServerHandlerInitException
- if initialization failed.void start() throws ServerHandlerInitException
ServerHandlerInitException
- if initialization failed.void shutdown()
This server handler clones are considered shutdown too.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |