eneter.messaging.endpoints.typedmessages
Interface IDuplexTypedMessageSender<TResponse,TRequest>

Type Parameters:
TResponse - Type of the response message which can be received.
TRequest - Type of the request message which can be sent.
All Superinterfaces:
IAttachableDuplexOutputChannel

public interface IDuplexTypedMessageSender<TResponse,TRequest>
extends IAttachableDuplexOutputChannel

Sender for one specified message type. This is a client component which send request messages and receive response messages. It can send messages to DuplextTypedMessageReceiver.


Method Summary
 Event<DuplexChannelEventArgs> connectionClosed()
          Raised when the service closed the connection with the client.
 Event<DuplexChannelEventArgs> connectionOpened()
          Raised when the connection with the receiver is open.
 Event<TypedResponseReceivedEventArgs<TResponse>> responseReceived()
          Raised when a response message is received.
 void sendRequestMessage(TRequest message)
          Sends message to the service.
 
Methods inherited from interface eneter.messaging.infrastructure.attachable.IAttachableDuplexOutputChannel
attachDuplexOutputChannel, detachDuplexOutputChannel, getAttachedDuplexOutputChannel, isDuplexOutputChannelAttached
 

Method Detail

connectionOpened

Event<DuplexChannelEventArgs> connectionOpened()
Raised when the connection with the receiver is open.

Returns:

connectionClosed

Event<DuplexChannelEventArgs> connectionClosed()
Raised when the service closed the connection with the client. The event is raised only if the service closes the connection with the client. It is not raised if the client closed the connection by IDuplexOutputChannel.closeConnection().

Returns:

responseReceived

Event<TypedResponseReceivedEventArgs<TResponse>> responseReceived()
Raised when a response message is received.

Returns:

sendRequestMessage

void sendRequestMessage(TRequest message)
                        throws java.lang.Exception
Sends message to the service.

Parameters:
message -
Throws:
java.lang.Exception