Package com.microsoft.azure.servicebus
Interface ISessionHandler
-
public interface ISessionHandlerDefines the contract for registering the session message processing callbackQueueClient.registerSessionHandler(ISessionHandler)orSubscriptionClient.registerSessionHandler(ISessionHandler)forQueueClientandSubscriptionClient.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidnotifyException(Throwable exception, ExceptionPhase phase)Receiving the exceptions that passed by pump during message processing.CompletableFuture<Void>OnCloseSessionAsync(IMessageSession session)Called just before a session is closed by the session pumpCompletableFuture<Void>onMessageAsync(IMessageSession session, IMessage message)The callback for message pump to pass receivedMessages.
-
-
-
Method Detail
-
onMessageAsync
CompletableFuture<Void> onMessageAsync(IMessageSession session, IMessage message)
The callback for message pump to pass receivedMessages.- Parameters:
session- TheMessageSessionof the message.message- The receivedMessage.- Returns:
- CompletableFuture for the message handler.
-
OnCloseSessionAsync
CompletableFuture<Void> OnCloseSessionAsync(IMessageSession session)
Called just before a session is closed by the session pump- Parameters:
session- session being closed- Returns:
- a future that executes the action
-
notifyException
void notifyException(Throwable exception, ExceptionPhase phase)
Receiving the exceptions that passed by pump during message processing.- Parameters:
exception- Exception received in pump.phase- Exception phase.
-
-