Module neovim.notifications
Class NeovimStreamNotificationHandler
- java.lang.Object
-
- com.ensarsarajcic.neovim.java.notifications.NeovimStreamNotificationHandler
-
- All Implemented Interfaces:
NeovimNotificationHandler
public final class NeovimStreamNotificationHandler extends java.lang.Object implements NeovimNotificationHandler
Implementation ofNeovimNotificationHandlerbased onReactiveRpcStreamerUtilizes
NotificationCreatorCollectorfor generating actual objects from raw data andReactiveRpcStreamerfor 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
Constructors Constructor Description NeovimStreamNotificationHandler(com.ensarsarajcic.neovim.java.corerpc.reactive.ReactiveRpcStreamer reactiveRpcStreamer)Creates a newNeovimStreamNotificationHandlerreading notifications fromReactiveRpcStreamerpassed in the constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.Flow.Publisher<BufferEvent>bufferEvents()Passes down a publisher ofBufferEventobjects receivedBufferEventis a special type of notification that is received when attached to a buffer in Neovim It will never completejava.util.concurrent.Flow.Publisher<NeovimRedrawEvent>uiEvents()Passes down a publisher ofNeovimRedrawEventobjects receivedNeovimRedrawEventis a special type of notification that is received when attached to Neovim It will never complete
-
-
-
Constructor Detail
-
NeovimStreamNotificationHandler
public NeovimStreamNotificationHandler(com.ensarsarajcic.neovim.java.corerpc.reactive.ReactiveRpcStreamer reactiveRpcStreamer)
Creates a newNeovimStreamNotificationHandlerreading notifications fromReactiveRpcStreamerpassed in the constructor. It may not be null.- Parameters:
reactiveRpcStreamer- streamer to be used to read notifications- Throws:
java.lang.NullPointerException- if reactiveRpcStreamer is null
-
-
Method Detail
-
uiEvents
public java.util.concurrent.Flow.Publisher<NeovimRedrawEvent> 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
public java.util.concurrent.Flow.Publisher<BufferEvent> 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
-
-