Property | Type | Description | |
---|---|---|---|
ORIGINAL_DEFAULT_HANDLER_METHOD | string |
Method | Description | |
---|---|---|
MessageListenerAdapter ( ) : System |
Initializes a new instance of the MessageListenerAdapter class with default settings.
|
|
MessageListenerAdapter ( object handlerObject ) : System |
Initializes a new instance of the MessageListenerAdapter class for the given handler object
|
|
OnMessage ( IMessage message ) : void |
Standard JMS {@link MessageListener} entry point. Delegates the message to the target listener method, with appropriate conversion of the message arguments In case of an exception, the HandleListenerException method will be invoked. Note Does not support sending response messages based on result objects returned from listener methods. Use the ISessionAwareMessageListener entry point (typically through a Spring message listener container) for handling result objects as well. |
|
OnMessage ( IMessage message, ISession session ) : void |
Spring ISessionAwareMessageListener entry point. Delegates the message to the target listener method, with appropriate conversion of the message argument. If the target method returns a non-null object, wrap in a NMS message and send it back.
|
Method | Description | |
---|---|---|
BuildMessage ( ISession session, Object result ) : IMessage |
Builds a JMS message to be sent as response based on the given result object.
|
|
GetHandlerMethodName ( IMessage originalIMessage, object extractedMessage ) : string |
Gets the name of the listener method that is supposed to handle the given message. The default implementation simply returns the configured default listener method, if any.
|
|
GetResponseDestination ( IMessage request, IMessage response, ISession session ) : IDestination |
Determine a response destination for the given message. The default implementation first checks the JMS Reply-To Destination of the supplied request; if that is not |
|
HandleListenerException ( |
Handle the given exception that arose during listener execution. The default implementation logs the exception at error level. This method only applies when used as standard NMS MessageListener. In case of the Spring ISessionAwareMessageListener mechanism, exceptions get handled by the caller instead.
|
|
HandleResult ( object result, IMessage request, ISession session ) : void |
Handles the given result object returned from the listener method, sending a response message back.
|
|
InitDefaultStrategies ( ) : void |
Initialize the default implementations for the adapter's strategies.
|
|
PostProcessProducer ( IMessageProducer producer, IMessage response ) : void |
Post-process the given message producer before using it to send the response. The default implementation is empty.
|
|
PostProcessResponse ( IMessage request, IMessage response ) : void |
Post-process the given response message before it will be sent. The default implementation sets the response's correlation id to the request message's correlation id.
|
|
ResolveDefaultResponseDestination ( ISession session ) : IDestination |
Resolves the default response destination into a Destination, using this accessor's IDestinationResolver in case of a destination name.
|
|
SendResponse ( ISession session, IDestination destination, IMessage response ) : void |
Sends the given response message to the given destination.
|
Method | Description | |
---|---|---|
ExtractMessage ( IMessage message ) : object |
Extract the message body from the given message.
|
protected BuildMessage ( ISession session, Object result ) : IMessage | ||
session | ISession | The JMS Session to operate on. |
result | Object | The content of the message, as returned from the listener method. |
return | IMessage |
protected GetHandlerMethodName ( IMessage originalIMessage, object extractedMessage ) : string | ||
originalIMessage | IMessage | The NMS request message. |
extractedMessage | object | The converted JMS request message, /// to be passed into the listener method as argument. |
return | string |
protected GetResponseDestination ( IMessage request, IMessage response, ISession session ) : IDestination | ||
request | IMessage | The original incoming message. |
response | IMessage | The outgoing message about to be sent. |
session | ISession | The session to operate on. |
return | IDestination |
protected HandleListenerException ( |
||
ex | The exception to handle. | |
return | void |
protected HandleResult ( object result, IMessage request, ISession session ) : void | ||
result | object | The result object to handle (never null ). |
request | IMessage | The original request message. |
session | ISession | The session to operate on (may be null ). |
return | void |
public MessageListenerAdapter ( object handlerObject ) : System | ||
handlerObject | object | The delegate object. |
return | System |
public OnMessage ( IMessage message ) : void | ||
message | IMessage | The incoming message. |
return | void |
public OnMessage ( IMessage message, ISession session ) : void | ||
message | IMessage | The incoming message. |
session | ISession | The session to operate on. |
return | void |
protected PostProcessProducer ( IMessageProducer producer, IMessage response ) : void | ||
producer | IMessageProducer | The producer that will be used to send the message. |
response | IMessage | The outgoing message about to be sent. |
return | void |
protected PostProcessResponse ( IMessage request, IMessage response ) : void | ||
request | IMessage | The original incoming message. |
response | IMessage | The outgoing JMS message about to be sent. |
return | void |
protected ResolveDefaultResponseDestination ( ISession session ) : IDestination | ||
session | ISession | The session to operate on. |
return | IDestination |
protected SendResponse ( ISession session, IDestination destination, IMessage response ) : void | ||
session | ISession | The session to operate on. |
destination | IDestination | The destination to send to. |
response | IMessage | The outgoing message about to be sent. |
return | void |