code: @Override
    public void onNext(final RemoteEvent<T> value) {
      try {
  
        LOG.log(Level.FINEST, "Link: {0} event: {1}", new Object[] {linkRef, value});
  
        if (linkRef.get() == null) {
          queue.add(value);
  
          final Link<byte[]> link = transport.get(value.remoteAddress());
          if (link != null) {
            LOG.log(Level.FINEST, "transport get link: {0}", link);
            setLink(link);
            return;
          }
  
          final ConnectFutureTask<Link<byte[]>> cf = new ConnectFutureTask<>(
              new ConnectCallable(transport, value.localAddress(), value.remoteAddress()),
              new ConnectEventHandler<>(this));
          executor.submit(cf);
  
        } else {
          // encode and write bytes
          // consumeQueue();
          LOG.log(Level.FINEST, "Send: {0} event: {1}", new Object[] {linkRef, value});
          linkRef.get().write(encoder.encode(value));
        }
  
      } catch (final RemoteRuntimeException ex) {
        LOG.log(Level.SEVERE, "Remote Exception", ex);
        throw ex;
      }
    }
docs: Handles the event to send to a remote node.
  
  @param value the event
  @throws RemoteRuntimeException