Class EventHandlerAdapter
java.lang.Object
com.couchbase.client.dcp.highlevel.internal.EventHandlerAdapter
- All Implemented Interfaces:
ControlEventHandler,SystemEventHandler
Bridges the gap between the various low-level callback handlers and the
high-level
DatabaseChangeListener.-
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(CouchbaseEvent event) Called every time when a system event happens that should be handled by consumers of theClient.voidonEvent(ChannelFlowController flowController, com.couchbase.client.core.deps.io.netty.buffer.ByteBuf event) Called every time when a control event happens that should be handled by consumers of theClient.static EventHandlerAdapterregister(Client dcpClient, EventDispatcher dispatcher)
-
Method Details
-
register
-
onEvent
Description copied from interface:SystemEventHandlerCalled every time when a system event happens that should be handled by consumers of theClient.- Specified by:
onEventin interfaceSystemEventHandler- Parameters:
event- the system event happening.
-
onEvent
public void onEvent(ChannelFlowController flowController, com.couchbase.client.core.deps.io.netty.buffer.ByteBuf event) Description copied from interface:ControlEventHandlerCalled every time when a control event happens that should be handled by consumers of theClient.Even if you are not doing anything with the events, make sure to release the buffer!!
- Specified by:
onEventin interfaceControlEventHandler- Parameters:
flowController- the flow controller for the passed event.event- the control event happening.
-