externalInformationPort
Class InformationProvider

java.lang.Object
  extended by java.lang.Thread
      extended by externalInformationPort.InformationProvider
All Implemented Interfaces:
java.lang.Runnable

final class InformationProvider
extends java.lang.Thread

Provides Information for "external" communication partners (e. g. other mixes or clients) vie network (UDP).

Author:
Karl-Peter Fuchs

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  java.util.EnumMap<Information,java.lang.Integer> enumMap
          Enumeration used to identify incoming requests.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected InformationProvider(java.security.PublicKey publicKey, ExternalInformationPortController eip)
          Creates a new InformationProvider that provides Information for "external" communication partners (e. g.
 
Method Summary
protected  void acceptRequests()
          Make this InformationProvider start listening for requests (on communication channel).
 void run()
          Answers incoming requests.
protected  void setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
          Sets the initialization vector used to encrypt data between this mix and its predecessor.
protected  void setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
          Sets the key used to encrypt data between this mix and its predecessor.
 
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
 

Field Detail

enumMap

java.util.EnumMap<Information,java.lang.Integer> enumMap
Enumeration used to identify incoming requests.

See Also:
Information
Constructor Detail

InformationProvider

protected InformationProvider(java.security.PublicKey publicKey,
                              ExternalInformationPortController eip)
Creates a new InformationProvider that provides Information for "external" communication partners (e. g. other mixes or clients) vie network (UDP).

Parameters:
publicKey - This mix' public key.
eip - Reference on component ExternalInformationPort. Used to reveive Information from communication partners.
Method Detail

setInterMixKeyWithPreviousMix

protected void setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
Sets the key used to encrypt data between this mix and its predecessor.

Parameters:
interMixKey - Key used to encrypt data between this mix and its predecessor.

setInterMixIVWithPreviousMix

protected void setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
Sets the initialization vector used to encrypt data between this mix and its predecessor.

Parameters:
interMixIV - Initialization vector used to encrypt data between this mix and its predecessor.

acceptRequests

protected void acceptRequests()
Make this InformationProvider start listening for requests (on communication channel).


run

public void run()
Answers incoming requests.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread