ISessionHandler 接口


Defines the contract for registering the session message processing callback QueueClient#registerSessionHandler(ISessionHandler) or SubscriptionClient#registerSessionHandler(ISessionHandler) for QueueClient and SubscriptionClient.

public interface ISessionHandler


notifyException(Throwable exception, ExceptionPhase phase)

Receiving the exceptions that passed by pump during message processing.

OnCloseSessionAsync(IMessageSession session)

Called just before a session is closed by the session pump

onMessageAsync(IMessageSession session, IMessage message)

The callback for message pump to pass received Messages.