public LegacyEndpoint(Endpoint endpoint) { this.endpoint = endpoint; // JBEAP-14783 - add a handler to shutdown the xnio worker otherwise legacy Remoting 4.0 will not stop // completely when endpoint is closed as it did in 4.0 this.endpoint.addCloseHandler(new CloseHandler<Endpoint>() { @Override public void handleClose(org.jboss.remoting3.Endpoint closed, IOException exception) { endpoint.getXnioWorker().shutdown(); } }); }
@Override public org.jboss.remoting3.HandleableCloseable.Key addCloseHandler(CloseHandler<? super Endpoint> handler) { return this.endpoint.addCloseHandler(handler); }
public Key addCloseHandler(final CloseHandler<? super Endpoint> handler) { return endpoint.addCloseHandler((endpoint, ex) -> handler.handleClose(this, ex)); }
public LegacyEndpoint(Endpoint endpoint) { this.endpoint = endpoint; // JBEAP-14783 - add a handler to shutdown the xnio worker otherwise legacy Remoting 4.0 will not stop // completely when endpoint is closed as it did in 4.0 this.endpoint.addCloseHandler(new CloseHandler<Endpoint>() { @Override public void handleClose(org.jboss.remoting3.Endpoint closed, IOException exception) { endpoint.getXnioWorker().shutdown(); } }); }
@Override public org.jboss.remoting3.HandleableCloseable.Key addCloseHandler(CloseHandler<? super Endpoint> handler) { return this.endpoint.addCloseHandler(handler); }
public Key addCloseHandler(CloseHandler<? super Endpoint> closeHandler) { return endpoint.addCloseHandler(closeHandler); }
public Key addCloseHandler(final CloseHandler<? super Endpoint> handler) { return endpoint.addCloseHandler((endpoint, ex) -> handler.handleClose(this, ex)); }
/** {@inheritDoc} */ public synchronized void stop(final StopContext context) { context.asynchronous(); try { endpoint.closeAsync(); } finally { endpoint.addCloseHandler(new CloseHandler<Endpoint>() { public void handleClose(final Endpoint closed, final IOException exception) { context.complete(); } }); } }
/** {@inheritDoc} */ public void stop(final StopContext context) { context.asynchronous(); final Endpoint endpoint = this.endpoint; this.endpoint = null; try { endpoint.closeAsync(); } finally { endpoint.addCloseHandler((closed, exception) -> { context.complete(); }); } }