eneter.messaging.endpoints.typedmessages
Class TypedRequestReceivedEventArgs<TRequestMessage>

java.lang.Object
  extended by eneter.messaging.endpoints.typedmessages.TypedRequestReceivedEventArgs<TRequestMessage>
Type Parameters:
TRequestMessage - type of the request message

public final class TypedRequestReceivedEventArgs<TRequestMessage>
extends java.lang.Object

Event argument used when the typed message is received.


Constructor Summary
TypedRequestReceivedEventArgs(java.lang.String responseReceiverId, java.lang.String senderAddress, java.lang.Exception error)
          Constructs the message from the exception.
TypedRequestReceivedEventArgs(java.lang.String responseReceiverId, java.lang.String senderAddress, TRequestMessage requestMessage)
          Constructs the event.
 
Method Summary
 java.lang.Exception getReceivingError()
          Returns the error detected during receiving of the message.
 TRequestMessage getRequestMessage()
          Returns the received message.
 java.lang.String getResponseReceiverId()
          Returns the client identifier where the response can be sent.
 java.lang.String getSenderAddress()
          Returns the address where the sender of the request message is located.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedRequestReceivedEventArgs

public TypedRequestReceivedEventArgs(java.lang.String responseReceiverId,
                                     java.lang.String senderAddress,
                                     TRequestMessage requestMessage)
Constructs the event.

Parameters:
responseReceiverId - identifies the client where the response can be sent
senderAddress - address of the message sender. It is null if not applicable for the messaging system.
requestMessage - message

TypedRequestReceivedEventArgs

public TypedRequestReceivedEventArgs(java.lang.String responseReceiverId,
                                     java.lang.String senderAddress,
                                     java.lang.Exception error)
Constructs the message from the exception.

Parameters:
responseReceiverId - identifies the client where the response can be sent
senderAddress - address of the message sender. It is null if not applicable for the messaging system.
error - error detected during receiving the message
Method Detail

getRequestMessage

public TRequestMessage getRequestMessage()
Returns the received message.

Returns:

getResponseReceiverId

public java.lang.String getResponseReceiverId()
Returns the client identifier where the response can be sent.

Returns:

getSenderAddress

public java.lang.String getSenderAddress()
Returns the address where the sender of the request message is located. (e.g. IP address of the client). It can be empty string if not applicable for used messaging.

Returns:

getReceivingError

public java.lang.Exception getReceivingError()
Returns the error detected during receiving of the message.

Returns: