public void close() throws IOException { connectionInfo.connectionClosed(authConfig, futureResult); delegate.close(); }
/** * Disconnect from the remote controller, allowing reconnection. * * @throws IOException */ protected void disconnect() throws IOException { final Connection connection = this.connection; if(connection != null) { connection.close(); } }
/** * Disconnect from the remote controller, allowing reconnection. * * @throws IOException */ protected void disconnect() throws IOException { final Connection connection = this.connection; if(connection != null) { connection.close(); } }
@Override public void close() throws IOException { synchronized (this) { if(closed.compareAndSet(false, true)) { final Connection connection = this.connection; if(connection != null) { connection.close(); } } } }
@Override public void close() throws IOException { synchronized (this) { if(closed.compareAndSet(false, true)) { final Connection connection = this.connection; if(connection != null) { connection.close(); } } } }
public void close() throws IOException { connectionInfo.connectionClosed(authConfig, futureResult); delegate.close(); }
@Override public synchronized void close() throws NamingException { closed = true; try { if (connection != null) { connection.close(); } } catch (IOException e) { NamingException exception = new NamingException("Failed to close connection"); exception.initCause(e); try { if (currentNamingStore != null) { currentNamingStore.close(); } } catch (NamingException ignored) { } throw exception; } if (currentNamingStore != null) { currentNamingStore.close(); } }
public synchronized void close() { try { if (connection != null) { connection.close(); } } catch (IOException e) { AppClientLogger.ROOT_LOGGER.exceptionClosingConnection(e); } try { if (endpoint != null) { endpoint.close(); } } catch (IOException e) { AppClientLogger.ROOT_LOGGER.exceptionClosingConnection(e); } } }
/** * Connect to the HC and retrieve the current model updates. * * @param controller the server controller * @param callback the operation completed callback * @return the boot operations * @throws IOException for any error */ synchronized void openConnection(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception { boolean ok = false; final Connection connection = connectionManager.connect(); try { channelHandler.executeRequest(new ServerRegisterRequest(), null, callback); channelHandler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, channelHandler)); ok = true; } finally { if(!ok) { connection.close(); } } }
/** * Connect to the HC and retrieve the current model updates. * * @param controller the server controller * @param callback the operation completed callback * @return the boot operations * @throws IOException for any error */ synchronized void openConnection(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception { boolean ok = false; final Connection connection = connectionManager.connect(); try { channelHandler.executeRequest(new ServerRegisterRequest(), null, callback); // HC is the same version, so it will support sending the subject channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_SUBJECT, Boolean.TRUE); channelHandler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, channelHandler)); ok = true; } finally { if(!ok) { connection.close(); } } }
/** * Connect to the HC and retrieve the current model updates. * * @param controller the server controller * @param callback the operation completed callback * * @throws IOException for any error */ synchronized void openConnection(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception { boolean ok = false; final Connection connection = connectionManager.connect(); try { channelHandler.executeRequest(new ServerRegisterRequest(), null, callback); // HC is the same version, so it will support sending the subject channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IDENTITY, Boolean.TRUE); channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IN_VM, Boolean.TRUE); channelHandler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, channelHandler, responseAttachmentSupport)); ok = true; } finally { if(!ok) { connection.close(); } } }
/** * Connect to the HC and retrieve the current model updates. * * @param controller the server controller * @param callback the operation completed callback * * @throws IOException for any error */ synchronized void openConnection(final ModelController controller, final ActiveOperation.CompletedCallback<ModelNode> callback) throws Exception { boolean ok = false; final Connection connection = connectionManager.connect(); try { channelHandler.executeRequest(new ServerRegisterRequest(), null, callback); // HC is the same version, so it will support sending the subject channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IDENTITY, Boolean.TRUE); channelHandler.getAttachments().attach(TransactionalProtocolClient.SEND_IN_VM, Boolean.TRUE); channelHandler.addHandlerFactory(new TransactionalProtocolOperationHandler(controller, channelHandler, responseAttachmentSupport)); ok = true; } finally { if(!ok) { connection.close(); } } }