/** * Perform the close operation on the managed endpoint. A subclass may override this method * to provide additional close actions or alter the standard close path such as endpoint * detach etc. */ protected void doClose() { getEndpoint().close(); }
@Override public void locallyClosed(AmqpConnection connection, Exception error) { if (endpoint != null) { // TODO: if this is a producer/consumer link then we may only be detached, // rather than fully closed, and should respond appropriately. endpoint.close(); } LOG.info("Resource {} was locally closed", this); connection.fireClientException(error); }
/** * Perform the close operation on the managed endpoint. A subclass may * override this method to alter the standard close path such as endpoint * detach etc. */ protected void closeOrDetachEndpoint() { getEndpoint().close(); }
private void close(Endpoint endpoint) { if (endpoint.getLocalState() != EndpointState.CLOSED) { endpoint.close(); } }
private void close(Endpoint endpoint) { if (endpoint.getLocalState() != EndpointState.CLOSED) { endpoint.close(); } }
/** * Perform the close operation on the managed endpoint. A subclass may * override this method to alter the standard close path such as endpoint * detach etc. */ protected void closeOrDetachEndpoint() { getEndpoint().close(); }
public void processRemoteClose(Endpoint endpoint, Task onComplete) { endpoint.close(); onComplete.run(); }
public void close() { getEndpoint().close(); pumpOut(); }
@Override public void failed(Exception cause) { if (openRequest != null) { if (endpoint != null) { // TODO: if this is a producer/consumer link then we may only be detached, // rather than fully closed, and should respond appropriately. endpoint.close(); } openRequest.onFailure(cause); openRequest = null; } if (closeRequest != null) { closeRequest.onFailure(cause); closeRequest = null; } }
@Override public void remotelyClosed(AmqpConnection connection) { Exception error = AmqpSupport.convertToException(getEndpoint().getRemoteCondition()); if (endpoint != null) { // TODO: if this is a producer/consumer link then we may only be detached, // rather than fully closed, and should respond appropriately. endpoint.close(); } LOG.info("Resource {} was remotely closed", this); connection.fireClientException(error); }
@Override public void closed() { getEndpoint().close(); getEndpoint().free(); if (this.closeRequest != null) { this.closeRequest.onSuccess(); this.closeRequest = null; } }
public void processRemoteOpen(Endpoint endpoint, Task onComplete) { ErrorCondition condition = endpoint.getCondition(); condition.setCondition(Symbol.valueOf("error")); condition.setDescription("Not supported"); endpoint.close(); onComplete.run(); }
protected final void handleClosed(AmqpProvider provider, Throwable cause) { // If the resource being built is closed during the creation process // then this is always an error. resourceInfo.setState(ResourceState.REMOTELY_CLOSED); // Perform any post processing relating to closure during creation attempt afterClosed(getResource(), getResourceInfo()); Throwable openError; if (hasRemoteError()) { openError = AmqpSupport.convertToException(parent.getProvider(), getEndpoint(), getEndpoint().getRemoteCondition()); } else if (cause != null) { openError = cause; } else { openError = getOpenAbortException(); } if (requestTimeoutTask != null) { requestTimeoutTask.cancel(false); } LOG.warn("Open of resource:({}) failed: {}", resourceInfo, openError.getMessage()); // This resource is now terminated. getEndpoint().close(); getEndpoint().free(); getEndpoint().setContext(null); getRequest().onFailure(openError); }
protected final void handleClosed(AmqpProvider provider, Throwable cause) { // If the resource being built is closed during the creation process // then this is always an error. resourceInfo.setState(ResourceState.REMOTELY_CLOSED); // Perform any post processing relating to closure during creation attempt afterClosed(getResource(), getResourceInfo()); Throwable openError; if (hasRemoteError()) { openError = AmqpSupport.convertToException(parent.getProvider(), getEndpoint(), getEndpoint().getRemoteCondition()); } else if (cause != null) { openError = cause; } else { openError = getOpenAbortException(); } if (requestTimeoutTask != null) { requestTimeoutTask.cancel(false); } LOG.warn("Open of resource:({}) failed: {}", resourceInfo, openError.getMessage()); // This resource is now terminated. getEndpoint().close(); getEndpoint().free(); getEndpoint().setContext(null); getRequest().onFailure(openError); }
getEndpoint().close(); getEndpoint().free(); getEndpoint().setContext(null);
getEndpoint().close(); getEndpoint().free(); getEndpoint().setContext(null);