- All Superinterfaces:
PushHandler
- All Known Implementing Classes:
DefaultEndpoint,PubSubClusterEndpoint,PubSubEndpoint
public interface Endpoint extends PushHandler
Wraps a stateful
Endpoint that abstracts the underlying channel. Endpoints may be connected, disconnected and in
closed states. Endpoints may feature reconnection capabilities with replaying queued commands.- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description StringgetId()voidinitialState()Reset this endpoint to its initial state, clear all buffers and potentially close the bound channel.voidnotifyChannelActive(Channel channel)Notify about channel activation.voidnotifyChannelInactive(Channel channel)Notify about channel deactivation.voidnotifyDrainQueuedCommands(io.lettuce.core.protocol.HasQueuedCommands queuedCommands)Signal the endpoint to drain queued commands from the queue holder.voidnotifyException(Throwable t)Notify about an exception occured in channel/command processingvoidregisterConnectionWatchdog(ConnectionWatchdog connectionWatchdog)Associate aConnectionWatchdogwith theEndpoint.Methods inherited from interface io.lettuce.core.protocol.PushHandler
addListener, getPushListeners, removeListener
-
Method Details
-
initialState
void initialState()Reset this endpoint to its initial state, clear all buffers and potentially close the bound channel.- Since:
- 5.1
-
notifyChannelActive
Notify about channel activation.- Parameters:
channel- the channel
-
notifyChannelInactive
Notify about channel deactivation.- Parameters:
channel- the channel
-
notifyException
Notify about an exception occured in channel/command processing- Parameters:
t- the Exception
-
notifyDrainQueuedCommands
void notifyDrainQueuedCommands(io.lettuce.core.protocol.HasQueuedCommands queuedCommands)Signal the endpoint to drain queued commands from the queue holder.- Parameters:
queuedCommands- the queue holder.
-
registerConnectionWatchdog
Associate aConnectionWatchdogwith theEndpoint.- Parameters:
connectionWatchdog- the connection watchdog.
-
getId
String getId()- Returns:
- the endpoint Id.
- Since:
- 6.1
-