Module neovim.notifications
Class NeovimStreamNotificationHandler
java.lang.Object
com.ensarsarajcic.neovim.java.notifications.NeovimStreamNotificationHandler
- All Implemented Interfaces:
NeovimNotificationHandler
public final class NeovimStreamNotificationHandler
extends Object
implements NeovimNotificationHandler
Implementation of
NeovimNotificationHandler based on ReactiveRpcStreamer
Utilizes NotificationCreatorCollector for generating actual objects from raw data and ReactiveRpcStreamer
for reading incoming notifications. Output should provide properly generated notifications of the right type
which can be casted to access notification specific data.
Example:
NeovimNotificationHandler notificationHandler = new NeovimNotificationHandler(streamer);
notification.uiEvents().subscribe(uiEventSubscriber);
notification.bufferEvents().subscribe(bufferEventSubscriber);
-
Constructor Summary
ConstructorsConstructorDescriptionNeovimStreamNotificationHandler(ReactiveRpcStreamer reactiveRpcStreamer) Creates a newNeovimStreamNotificationHandlerreading notifications fromReactiveRpcStreamerpassed in the constructor. -
Method Summary
Modifier and TypeMethodDescriptionPasses down a publisher ofBufferEventobjects receivedBufferEventis a special type of notification that is received when attached to a buffer in Neovim It will never completePasses down a publisher ofGlobalEventobjects receivedGlobalEventis a superclass of all general nvim notifications It will never completeuiEvents()Passes down a publisher ofNeovimRedrawEventobjects receivedNeovimRedrawEventis a special type of notification that is received when attached to Neovim It will never complete
-
Constructor Details
-
NeovimStreamNotificationHandler
Creates a newNeovimStreamNotificationHandlerreading notifications fromReactiveRpcStreamerpassed in the constructor. It may not be null.- Parameters:
reactiveRpcStreamer- streamer to be used to read notifications- Throws:
NullPointerException- if reactiveRpcStreamer is null
-
-
Method Details
-
uiEvents
Description copied from interface:NeovimNotificationHandlerPasses down a publisher ofNeovimRedrawEventobjects receivedNeovimRedrawEventis a special type of notification that is received when attached to Neovim It will never complete- Specified by:
uiEventsin interfaceNeovimNotificationHandler- Returns:
Flow.Publisherpassing down ui events as they come
-
bufferEvents
Description copied from interface:NeovimNotificationHandlerPasses down a publisher ofBufferEventobjects receivedBufferEventis a special type of notification that is received when attached to a buffer in Neovim It will never complete- Specified by:
bufferEventsin interfaceNeovimNotificationHandler- Returns:
Flow.Publisherpassing down buffer events as they come
-
globalEvents
Description copied from interface:NeovimNotificationHandlerPasses down a publisher ofGlobalEventobjects receivedGlobalEventis a superclass of all general nvim notifications It will never complete- Specified by:
globalEventsin interfaceNeovimNotificationHandler- Returns:
Flow.Publisherpassing down global events as they come
-