|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread de.netseeker.ejoe.core.CombinedConnectionProcessor
public final class CombinedConnectionProcessor
The CombinedConnectionProcessor handles the further processing of accepted client connections. It simply does only separate the readable connections from the incoming flood of accepted connections and schedules a new ConnectionProcessor which will handle read/write operations and adapter invoking for each of the selected connections. This is compareable to the *old BIO style* where one thread is used for each connection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
CombinedConnectionProcessor(ServerInfo serverInfo)
Creates a new CombinedConnectionProcessor instance. |
Method Summary | |
---|---|
int |
getLoad()
Returns the amount of currently queued network events for processing |
boolean |
isValid()
Tells whether this ChannelRegistrar is running and accepting channels for further processing |
void |
register(ConnectionHeader clientInfo,
int interest)
(Re-)Adds a incomplete read channel to the list of channels processed by the Selector of this ChannelRegistrar |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CombinedConnectionProcessor(ServerInfo serverInfo) throws java.io.IOException
serverInfo
- prefilled ConnectionHeader container server settings, eg. compression setting
java.io.IOException
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void register(ConnectionHeader clientInfo, int interest)
ChannelRegistrar
register
in interface ChannelRegistrar
clientInfo
- the ConnectionHeader initially sent by the receiverinterest
- OP_WRITE or OP_READ interestpublic boolean isValid()
ChannelRegistrar
isValid
in interface ChannelRegistrar
public int getLoad()
ChannelRegistrar
getLoad
in interface ChannelRegistrar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |