Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

MessageListenerAdapter.GetResponseDestination Method

Determine a response destination for the given message.

[Visual Basic]
Protected Overridable Sub GetResponseDestination( _
   ByVal request As IMessage, _
   ByVal response As IMessage, _
   ByVal session As ISession _
)
[C#]
protected virtual IDestination GetResponseDestination(
   IMessage request,
   IMessage response,
   ISession session
);

Parameters

request
The original incoming message.
response
Tthe outgoing message about to be sent.
session
The session to operate on.

Return Value

the response destination (never

null
)

Remarks

The default implementation first checks the JMS Reply-To Destination of the supplied request; if that is not

null
it is returned; if it is
null
, then the configured DefaultResponseDestination default response destination is returned; if this too is
null
, then an InvalidDestinationExceptionis thrown.

Exceptions

Exception Type Condition
NMSException if thrown by NMS API methods
InvalidDestinationException if no destination can be determined.

See Also

MessageListenerAdapter Class | Spring.Messaging.Nms.Listener.Adapter Namespace