architectureInterface
Interface InputOutputHandlerInterface

All Known Implementing Classes:
InputOutputHandlerController

public interface InputOutputHandlerInterface

Architecture interface for component InputOutputHandler.

Handles (mix) message-based connections (see package Message) to communication partners (clients, other mixes and proxy servers) and therefore abstracts from the physic communication channels.

Must be thread-safe.

Author:
Karl-Peter Fuchs

Method Summary
 void acceptConnections()
          Must make the implementing component listen for connections/messages on communication channel(s).
 void addReplies(Reply[] replies)
          Must accept the bypassed (already processed) Replyies and send them to the previous communication partner (e. g. mix).
 void addReply(Reply reply)
          Must accept the bypassed (already processed) Reply and send it to the previous communication partner (e. g. mix).
 void addRequest(Request request)
          Must accept the bypassed (already processed) Request and send it to the next communication partner (e. g. mix).
 void addRequests(Request[] requests)
          Must accept the bypassed (already processed) Requests and send them to the next communication partner (e. g. mix).
 Reply getReply()
          Must return an (unprocessed) Reply, that was received from a communication partner (e. g. proxy or other mix), previously.
 Request getRequest()
          Must return an (unprocessed) Request, that was received from a communication partner (e. g. client or other mix), previously.
 

Method Detail

addRequest

void addRequest(Request request)
Must accept the bypassed (already processed) Request and send it to the next communication partner (e. g. mix).

Must return immediately (asynchronous behavior), the process of sending itself may be deferred (e. g. if communication channel is busy).

Must assure order (queuing strategy).

Parameters:
request - Message, that shall be sent to the next communication partner.
See Also:
addRequests(Request[])

addRequests

void addRequests(Request[] requests)
Must accept the bypassed (already processed) Requests and send them to the next communication partner (e. g. mix).

Must return immediately (asynchronous behavior), the process of sending itself may be deferred (e. g. if communication channel is busy).

Must assure order (queuing strategy).

Parameters:
requests - Messages, that shall be sent to the next communication partner.
See Also:
addRequest(Request)

getRequest

Request getRequest()
Must return an (unprocessed) Request, that was received from a communication partner (e. g. client or other mix), previously.

If no requests are available, the method must block until a new request arrives.

Must assure order (queuing strategy).

Returns:
Request, that was received from a communication partner, previously..

addReply

void addReply(Reply reply)
Must accept the bypassed (already processed) Reply and send it to the previous communication partner (e. g. mix).

Must return immediately (asynchronous behavior), the process of sending itself may be deferred (e. g. if communication channel is busy).

Must assure order (queuing strategy).

Parameters:
reply - Message, that shall be sent to the previous communication partner.
See Also:
addReplies(Reply[])

addReplies

void addReplies(Reply[] replies)
Must accept the bypassed (already processed) Replyies and send them to the previous communication partner (e. g. mix).

Must return immediately (asynchronous behavior), the process of sending itself may be deferred (e. g. if communication channel is busy).

Must assure order (queuing strategy).

Parameters:
replies - Messages, that shall be sent to the previous communication partner.
See Also:
addReply(Reply)

getReply

Reply getReply()
Must return an (unprocessed) Reply, that was received from a communication partner (e. g. proxy or other mix), previously.

If no replies are available, the method must block until a new reply arrives.

Must assure order (queuing strategy).

Returns:
Reply, the implementing component InputOutputHandler has received from a communication partner, previously.

acceptConnections

void acceptConnections()
Must make the implementing component listen for connections/messages on communication channel(s).