java.lang.Object
com.ensarsarajcic.neovim.java.handler.NeovimHandlerProxy
All Implemented Interfaces:
RpcListener.NotificationCallback, RpcListener.RequestCallback

public final class NeovimHandlerProxy extends Object implements RpcListener.RequestCallback, RpcListener.NotificationCallback
Class acting as both a container of RpcListener.RequestCallback and RpcListener.NotificationCallback and as a listener

It passes all notifications/requests to contained listeners through a ExecutorService By default ImmediateExecutorService is used Default instance with ImmediateExecutorService is used by default in NeovimHandlerManager

This allows handlers to not block used streamer when notifications/requests arrive and when many handlers are used

Example:

     
     NeovimHandlerProxy neovimHandlerProxy = new NeovimHandlerProxy(customExecutorService);
     NeovimHandlerManager neovimHandlerManager = new NeovimHandlerManager(neovimHandlerProxy);

     neovimHandlerManager.registerNeovimHandler(uiEventHandler);
     neovimHandlerManager.attachToStream(neovimStream); // All notifications/requests are passed down using customExecutorService now