|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
inputOutputHandler.PreviousMixConnectionHandler
final class PreviousMixConnectionHandler
Handles communication with a previous mix (in the same cascade as this one).
Waits for the previous mix to establish a permanent (TCP) connection, which
is used to transmit the messages (Request
s and
Reply
ies) of all users connected to the cascade's fist mix
(multiplex channel).
(De-)multiplexes Request
s/Reply
ies using an
(encrypted) header (see addInterMixHeader()).
Note: Authentication is NOT implemented!
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 | |
---|---|
protected |
PreviousMixConnectionHandler(InputOutputHandlerController inputOutputHandler,
UserDatabaseController userDatabase,
OutputStrategyController outputStrategy,
ExternalInformationPortController externalInformationPort)
Constructs a new PreviousMixConnectionHandler which handles
communication with a previous mix (in the same cascade as this one). |
Method Summary | |
---|---|
protected void |
acceptConnection()
Makes this PreviousMixConnectionHandler wait for
its predecessor to connect. |
void |
run()
Receives messages from previous mix and passes them to the InputOutputHandler . |
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 |
---|
protected PreviousMixConnectionHandler(InputOutputHandlerController inputOutputHandler, UserDatabaseController userDatabase, OutputStrategyController outputStrategy, ExternalInformationPortController externalInformationPort)
PreviousMixConnectionHandler
which handles
communication with a previous mix (in the same cascade as this one).
Waits for the previous mix to establish a permanent (TCP) connection,
which is used to transmit the messages (Request
s and
Reply
ies) of all users connected to the cascade's fist mix
(multiplex channel). (De-)multiplexes
Request
s/Reply
ies using an (encrypted) header
(see addInterMixHeader()).
Requests
are put in the
InputOutputHandlerController
's
requestInputQueue
(see InputOutputHandlerController.addUnprocessedRequest()
).
Reply
ies are taken from the
InputOutputHandlerController
's replyOutputQueue
(see InputOutputHandlerController.getProcessedReply()
).
Adds/removes user to/from UserDatabase
.
Note: Authentication is NOT implemented!
inputOutputHandler
- Reference on
InputOutputHandlerController
(Used to add messages).userDatabase
- Reference on component
UserDatabase
(Used to
add/remove User
)s.outputStrategy
- Reference on component
OutputStrategy
(Used to add
ChannelReleaseMessages
).externalInformationPort
- Reference on component
ExternalInformationPort
(Used to provide the cryptographic key
used to encrypt/decrypt
multiplex-headers to the previous mix.Method Detail |
---|
protected void acceptConnection()
PreviousMixConnectionHandler
wait for
its predecessor to connect.
public void run()
InputOutputHandler
.
run
in interface java.lang.Runnable
run
in class java.lang.Thread
InputOutputHandlerController.addUnprocessedRequest(message.Request)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |