@Override protected void destroy() { for (ResourceReference resource : resources) { resource.close(); } }
@Override protected void destroy() { containerReference.close(); }
@Override public void close() { reference.close(); } }
@Override public void release() { initialCreationReference.close(); }
@Override protected void destroy() { log.log(LogLevel.DEBUG, "Destroying message bus client."); sessionReference.close(); done = true; }
/** * Close the reference that is normally closed by {@link #handleResponse(Response)}. * * This is to be used in error situations, where handleResponse() may not be invoked. */ public void unrefer() { if (closed.getAndSet(true)) { // This simply means that handleResponse() has been run, in which case we are // guaranteed that the reference is closed. return; } requestReference.close(); } }
@Override protected void destroy() { log.log(LogLevel.DEBUG, "Destroying message bus server."); running.set(false); sessionReference.close(); }
public void kill() { // No new requests should be sent to this object, but there can be old one, even though this is very unlikely. while (ongoingRequests.get() > 0) { try { ongoingRequests.wait(100); } catch (InterruptedException e) { break; } } sourceSession.getReference().close(); }
@Override protected void destroy() { log.log(LogLevel.DEBUG, "Destroying shared destination session."); session.destroy(); mbusReference.close(); } }
@Override protected void destroy() { log.log(LogLevel.DEBUG, "Destroying shared intermediate session."); session.destroy(); mbusReference.close(); } }
@Override protected void destroy() { if (parentReference != null) { parentReference.close(); } if (container != null) { container.release(); } }
@Override protected void destroy() { log.log(LogLevel.DEBUG, "Destroying shared source session."); session.close(); mbusReference.close(); }
@Override public void completed() { if (closed.getAndSet(true)) { throw new IllegalStateException(delegate + " is already called."); } try { if (delegate != null) { delegate.completed(); } } finally { requestReference.close(); } }
@Override public void completed() { if (closed.getAndSet(true)) { throw new AlreadyCompletedException(delegate); } try { if (delegate != null) { delegate.completed(); } } finally { requestReference.close(); } }