|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectexternalInformationPort.ExternalInformationPortController
public class ExternalInformationPortController
Controller class of component ExternalInformationPort
.
Implements the architecture interface
ExternalInformationPortInterface
.
Used for Information
(for example a public key) exchange with
"external" communication partners (for example other mixes or clients). This
component doesn't affect the sending of mix messages directly (That's done
by the InputOutputHandler
: see
architectureInterface.InputOutputHandlerInterface
).
Each exchangeable type of information is specified in the enumeration
Information
.
Constructor Summary | |
---|---|
ExternalInformationPortController()
Generates a new ExternalInformationPort component. |
Method Summary | |
---|---|
void |
acceptRequests()
Make component start listening for requests (on communication channel). |
java.lang.Object |
getInformation(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest)
Generic method to receive some Information from a
specified ExternalInformationPort component. |
java.lang.Object |
getInformation(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest,
byte[] data)
Generic method to receive some Information from a
specified ExternalInformationPort component, sending the
bypassed data. |
java.lang.Object[] |
getInformationFromAll(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest)
Generic method to receive some Information from several
ExternalInformationPort components. |
java.lang.Object[] |
getInformationFromAll(java.net.InetAddress informationProviderAddress,
int informationProviderPort,
Information informationOfInterest,
byte[] data)
Generic method to receive some Information from several
ExternalInformationPort components, sending the bypassed
data. |
void |
initialize()
Initialization method for this component. |
void |
initialize(java.security.PublicKey publicKey,
MessageProcessorController messageProcessor)
Initialization method for this component. |
void |
setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
Makes the bypassed initialization vector available via InformationProvider . |
void |
setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
Makes the bypassed key available via InformationProvider . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExternalInformationPortController()
ExternalInformationPort
component.
Used for Information
(for example a public key) exchange
with "external" communication partners (for example other mixes or
clients). This component doesn't affect the sending of mix messages
directly (That's done by the InputOutputHandler
: see
architectureInterface.InputOutputHandlerInterface
).
Each exchangeable type of information is specified in the enumeration
Information
.
Component can't be used before calling initialize()
.
initialize()
,
initialize(PublicKey, MessageProcessorController)
Method Detail |
---|
public void initialize(java.security.PublicKey publicKey, MessageProcessorController messageProcessor)
Information
(see
initialize()
for receival only). Must be called before
using an instance of this class for anything but dispensing references
on the instance itself.
publicKey
- The mix' public key, this object belongs to
(will be made available via
InformationProvider
).messageProcessor
- Used to encrypt certain kinds of
Information
.initialize()
public void initialize()
Information
from a
communication partner's ExternalInformationPort
(see
initialize(PublicKey, MessageProcessorController)
for
providing Information
, too). Must be called before
using an instance of this class for anything but dispensing references
on the instance itself.
initialize(PublicKey, MessageProcessorController)
public void setInterMixKeyWithPreviousMix(javax.crypto.SecretKey interMixKey)
InformationProvider
.
This key is used to encrypt data between mixes.
interMixKey
- Key used to encrypt data between mixes.public void setInterMixIVWithPreviousMix(javax.crypto.spec.IvParameterSpec interMixIV)
InformationProvider
. This initialization vector is used to
encrypt data between mixes.
interMixIV
- Initialization vector used to encrypt data
between mixes.public java.lang.Object getInformation(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest) throws InformationRetrieveException
Information
from a
specified ExternalInformationPort
component.
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformation
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
ExternalInformationPort
component to receive data from.informationProviderPort
- Port the
ExternalInformationPort
component to receive data from
runs on.informationOfInterest
- Type of Information
,
that shall be received.
Information
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object getInformation(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest, byte[] data) throws InformationRetrieveException
Information
from a
specified ExternalInformationPort
component, sending the
bypassed data.
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformation
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
ExternalInformationPort
component to receive data from.informationProviderPort
- Port the
ExternalInformationPort
component to receive data from
runs on.informationOfInterest
- Type of Information
,
that shall be received.data
- Data to be transmitted.
Information
.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest) throws InformationRetrieveException
Information
from several
ExternalInformationPort
components. The first component's
address and port number must be specified. The other components
addresses are received by their predecessor (= telescope
implementation).
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformationFromAll
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
InformationProvider
-component to receive data from.informationProviderPort
- Port the InformationProvider
-component to receive data
from runs on.informationOfInterest
- Type of Information
,
that shall be received.
Information
s.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest, byte[] data) throws InformationRetrieveException
Information
from several
ExternalInformationPort
components, sending the bypassed
data. The first component's address and port number must be specified.
The other components' addresses are received by their predecessor (=
telescope implementation).
If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.
getInformationFromAll
in interface ExternalInformationPortInterface
informationProviderAddress
- Address of the
InformationProvider
component to receive data from.informationProviderPort
- Port the InformationProvider
component to receive data
from runs on.informationOfInterest
- Type of Information
,
that shall be received.data
- Data to be transmitted.
Information
s.
InformationRetrieveException
- Thrown, when requested
Information
not
available.public void acceptRequests()
acceptRequests
in interface ExternalInformationPortInterface
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |