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 TypeMethodDescriptionvoid
onEvent
(CouchbaseEvent event) Called every time when a system event happens that should be handled by consumers of theClient
.void
onEvent
(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 EventHandlerAdapter
register
(Client dcpClient, EventDispatcher dispatcher)
-
Method Details
-
register
-
onEvent
Description copied from interface:SystemEventHandler
Called every time when a system event happens that should be handled by consumers of theClient
.- Specified by:
onEvent
in 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:ControlEventHandler
Called 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:
onEvent
in interfaceControlEventHandler
- Parameters:
flowController
- the flow controller for the passed event.event
- the control event happening.
-