architectureInterface
Interface ExternalInformationPortInterface

All Known Implementing Classes:
ExternalInformationPortController

public interface ExternalInformationPortInterface

Architecture interface for component ExternalInformationPort.

ExternalInformationPort is 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.

Must be thread-safe.

Author:
Karl-Peter Fuchs

Method Summary
 void acceptRequests()
          Must 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 InformationProvider component.
 java.lang.Object getInformation(java.net.InetAddress informationProviderAddress, int informationProviderPort, Information informationOfInterest, byte[] data)
          Generic method to receive some Information from a specified InformationProvider 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.
 

Method Detail

getInformation

java.lang.Object getInformation(java.net.InetAddress informationProviderAddress,
                                int informationProviderPort,
                                Information informationOfInterest)
                                throws InformationRetrieveException
Generic method to receive some Information from a specified InformationProvider component.

If communication channel isn't safe, but transmitted data is sensitive, cryptographic measures (like authentication and encryption) should be applied.

Parameters:
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.
Returns:
The requested Information .
Throws:
InformationRetrieveException - Thrown, when requested Information not available.

getInformation

java.lang.Object getInformation(java.net.InetAddress informationProviderAddress,
                                int informationProviderPort,
                                Information informationOfInterest,
                                byte[] data)
                                throws InformationRetrieveException
Generic method to receive some Information from a specified InformationProvider 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.

Parameters:
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.
Returns:
The requested Information .
Throws:
InformationRetrieveException - Thrown, when requested Information not available.

getInformationFromAll

java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress,
                                         int informationProviderPort,
                                         Information informationOfInterest)
                                         throws InformationRetrieveException
Generic method to receive some 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.

Parameters:
informationProviderAddress - Address of the first InformationProvider component to receive data from.
informationProviderPort - Port the first InformationProvider component to receive data from runs on.
informationOfInterest - Type of Information, that shall be received.
Returns:
The requested Information s.
Throws:
InformationRetrieveException - Thrown, when requested Information not available.

getInformationFromAll

java.lang.Object[] getInformationFromAll(java.net.InetAddress informationProviderAddress,
                                         int informationProviderPort,
                                         Information informationOfInterest,
                                         byte[] data)
                                         throws InformationRetrieveException
Generic method to receive some 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.

Parameters:
informationProviderAddress - Address of the first InformationProvider component to receive data from.
informationProviderPort - Port the first InformationProvider component to receive data from runs on.
informationOfInterest - Type of Information, that shall be received.
data - Data to be transmitted.
Returns:
The requested Information s.
Throws:
InformationRetrieveException - Thrown, when requested Information not available.

acceptRequests

void acceptRequests()
Must make component start listening for requests (on communication channel).