Class NeovimStreamNotificationHandler

  • All Implemented Interfaces:
    NeovimNotificationHandler

    public final class NeovimStreamNotificationHandler
    extends java.lang.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);
         
     
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.Flow.Publisher<BufferEvent> bufferEvents()
      Passes down a publisher of BufferEvent objects received BufferEvent is a special type of notification that is received when attached to a buffer in Neovim It will never complete
      java.util.concurrent.Flow.Publisher<NeovimRedrawEvent> uiEvents()
      Passes down a publisher of NeovimRedrawEvent objects received NeovimRedrawEvent is a special type of notification that is received when attached to Neovim It will never complete
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NeovimStreamNotificationHandler

        public NeovimStreamNotificationHandler​(com.ensarsarajcic.neovim.java.corerpc.reactive.ReactiveRpcStreamer reactiveRpcStreamer)
        Creates a new NeovimStreamNotificationHandler reading notifications from ReactiveRpcStreamer passed 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