C# 클래스 Spring.Messaging.Nms.Listener.AbstractMessageListenerContainer

Abstract base class for message listener containers. Can either host a standard NMS MessageListener or a Spring-specific ISessionAwareMessageListener
상속: Spring.Messaging.Nms.Listener.AbstractListenerContainer
파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

공개 메소드들

메소드 설명
ExecuteListener ( ISession session, IMessage message ) : void

Executes the specified listener, committing or rolling back the transaction afterwards (if necessary).

보호된 메소드들

메소드 설명
CheckMessageListener ( object messageListener ) : void

Checks the message listener, throwing an exception if it does not correspond to a supported listener type. By default, only a standard JMS MessageListener object or a Spring ISessionAwareMessageListener object will be accepted.

CommitIfNecessary ( ISession session, IMessage message ) : void

Perform a commit or message acknowledgement, as appropriate

DoExecuteListener ( ISession session, IMessage message ) : void

Executes the specified listener, committing or rolling back the transaction afterwards (if necessary).

DoInvokeListener ( IMessageListener listener, IMessage message ) : void

Invoke the specified listener as standard JMS MessageListener.

Default implementation performs a plain invocation of the OnMessage methods

DoInvokeListener ( ISessionAwareMessageListener listener, ISession session, IMessage message ) : void

Invoke the specified listener as Spring SessionAwareMessageListener, exposing a new NMS Session (potentially with its own transaction) to the listener if demanded.

HandleListenerException ( Exception ex ) : void

Handle the given exception that arose during listener execution.

The default implementation logs the exception at error level, not propagating it to the JMS provider - assuming that all handling of acknowledgement and/or transactions is done by this listener container. This can be overridden in subclasses.

InvokeErrorHandler ( Exception exception ) : void

Invokes the error handler.

InvokeExceptionListener ( Exception ex ) : void

Invokes the registered exception listener, if any.

InvokeListener ( ISession session, IMessage message ) : void

Invokes the specified listener: either as standard NMS MessageListener or (preferably) as Spring SessionAwareMessageListener.

IsSessionLocallyTransacted ( ISession session ) : bool

Determines whether the given Session is locally transacted, that is, whether its transaction is managed by this listener container's Session handling and not by an external transaction coordinator.

The Session's own transacted flag will already have been checked before. This method is about finding out whether the Session's transaction is local or externally coordinated.

RollbackIfNecessary ( ISession session ) : void

Perform a rollback, if appropriate.

RollbackOnExceptionIfNecessary ( ISession session, Exception ex ) : void

Perform a rollback, handling rollback excepitons properly.

ValidateConfiguration ( ) : void

Validate that the destination is not null and that if the subscription is durable, then we are not using the Pub/Sub domain.

메소드 상세

CheckMessageListener() 보호된 메소드

Checks the message listener, throwing an exception if it does not correspond to a supported listener type. By default, only a standard JMS MessageListener object or a Spring ISessionAwareMessageListener object will be accepted.
protected CheckMessageListener ( object messageListener ) : void
messageListener object The message listener.
리턴 void

CommitIfNecessary() 보호된 메소드

Perform a commit or message acknowledgement, as appropriate
In case of commit failure
protected CommitIfNecessary ( ISession session, IMessage message ) : void
session ISession The session to commit.
message IMessage The message to acknowledge.
리턴 void

DoExecuteListener() 보호된 메소드

Executes the specified listener, committing or rolling back the transaction afterwards (if necessary).
If thrown by NMS API methods.
protected DoExecuteListener ( ISession session, IMessage message ) : void
session ISession The session to operate on.
message IMessage The received message.
리턴 void

DoInvokeListener() 보호된 메소드

Invoke the specified listener as standard JMS MessageListener.
Default implementation performs a plain invocation of the OnMessage methods
if thrown by the NMS API methods
protected DoInvokeListener ( IMessageListener listener, IMessage message ) : void
listener IMessageListener The listener to invoke.
message IMessage The received message.
리턴 void

DoInvokeListener() 보호된 메소드

Invoke the specified listener as Spring SessionAwareMessageListener, exposing a new NMS Session (potentially with its own transaction) to the listener if demanded.
If thrown by NMS API methods.
protected DoInvokeListener ( ISessionAwareMessageListener listener, ISession session, IMessage message ) : void
listener ISessionAwareMessageListener The Spring ISessionAwareMessageListener to invoke.
session ISession The session to operate on.
message IMessage The received message.
리턴 void

ExecuteListener() 공개 메소드

Executes the specified listener, committing or rolling back the transaction afterwards (if necessary).
public ExecuteListener ( ISession session, IMessage message ) : void
session ISession The session to operate on.
message IMessage The received message.
리턴 void

HandleListenerException() 보호된 메소드

Handle the given exception that arose during listener execution.
The default implementation logs the exception at error level, not propagating it to the JMS provider - assuming that all handling of acknowledgement and/or transactions is done by this listener container. This can be overridden in subclasses.
protected HandleListenerException ( Exception ex ) : void
ex System.Exception The exceptin to handle
리턴 void

InvokeErrorHandler() 보호된 메소드

Invokes the error handler.
protected InvokeErrorHandler ( Exception exception ) : void
exception System.Exception The exception.
리턴 void

InvokeExceptionListener() 보호된 메소드

Invokes the registered exception listener, if any.
protected InvokeExceptionListener ( Exception ex ) : void
ex System.Exception The exception that arose during NMS processing.
리턴 void

InvokeListener() 보호된 메소드

Invokes the specified listener: either as standard NMS MessageListener or (preferably) as Spring SessionAwareMessageListener.
If thrown by NMS API methods.
protected InvokeListener ( ISession session, IMessage message ) : void
session ISession The session to operate on.
message IMessage The received message.
리턴 void

IsSessionLocallyTransacted() 보호된 메소드

Determines whether the given Session is locally transacted, that is, whether its transaction is managed by this listener container's Session handling and not by an external transaction coordinator.
The Session's own transacted flag will already have been checked before. This method is about finding out whether the Session's transaction is local or externally coordinated.
protected IsSessionLocallyTransacted ( ISession session ) : bool
session ISession The session to check.
리턴 bool

RollbackIfNecessary() 보호된 메소드

Perform a rollback, if appropriate.
In case of a rollback error
protected RollbackIfNecessary ( ISession session ) : void
session ISession The session to rollback.
리턴 void

RollbackOnExceptionIfNecessary() 보호된 메소드

Perform a rollback, handling rollback excepitons properly.
in case of a rollback error.
protected RollbackOnExceptionIfNecessary ( ISession session, Exception ex ) : void
session ISession The session to rollback.
ex System.Exception The thrown application exception.
리턴 void

ValidateConfiguration() 보호된 메소드

Validate that the destination is not null and that if the subscription is durable, then we are not using the Pub/Sub domain.
protected ValidateConfiguration ( ) : void
리턴 void