/** * Subclasses should implement this method to perform the actual IO channel close. * * @param onClose */ protected void doClose(@Nullable Consumer<Boolean> onClose) { getReactor().schedule(onClose, true); }
/** * Notify this server's consumers that the server has started. */ protected void notifyStart(final Runnable started) { getReactor().notify(start.getObject(), selfEvent); if (null != started) { getReactor().schedule(new Consumer<Runnable>() { @Override public void accept(Runnable r) { r.run(); } }, started); } }
/** * Notify this server's consumers that the server has stopped. */ protected void notifyShutdown() { getReactor().notify(shutdown.getObject(), selfEvent); }