public void close() throws IOException { log.debugf("close called on connection to %s", getPeerAddress()); if(http2Delegate != null) { http2Delegate.close(); } if (anyAreSet(state, CLOSED)) { return; } state |= CLOSED | CLOSE_REQ; ConnectionUtils.cleanClose(connection); }
public void handleEvent(StreamConnection channel) { log.debugf("connection to %s closed", getPeerAddress()); HttpClientConnection.this.state |= CLOSED; ChannelListeners.invokeChannelListener(HttpClientConnection.this, closeSetter.get()); try { if (pooledBuffer != null) { pooledBuffer.close(); } } catch (Throwable ignored){} for(ChannelListener<ClientConnection> listener : closeListeners) { listener.handleEvent(HttpClientConnection.this); } HttpClientExchange pending = pendingQueue.poll(); while (pending != null) { pending.setFailed(new ClosedChannelException()); pending = pendingQueue.poll(); } if(currentRequest != null) { currentRequest.setFailed(new ClosedChannelException()); currentRequest = null; pendingResponse = null; } } });
public StreamConnection performUpgrade() throws IOException { log.debugf("connection to %s is being upgraded", getPeerAddress()); // Upgrade the connection // Set the upgraded flag already to prevent new requests after this one if (allAreSet(state, UPGRADED | CLOSE_REQ | CLOSED)) { throw new IOException(UndertowClientMessages.MESSAGES.connectionClosed()); } state |= UPGRADED; connection.getSinkChannel().setConduit(originalSinkConduit); connection.getSourceChannel().setConduit(pushBackStreamSourceConduit); return connection; }
void terminateResponse() { if(anyAreSet(state, RESPONSE_TERMINATED)) { return; } log.debugf("response terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= RESPONSE_TERMINATED; if (anyAreSet(state, REQUEST_TERMINATED)) { clientConnection.exchangeDone(); } }
void terminateRequest() { if(anyAreSet(state, REQUEST_TERMINATED)) { return; } log.debugf("request terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= REQUEST_TERMINATED; clientConnection.requestDataSent(); if (anyAreSet(state, RESPONSE_TERMINATED)) { clientConnection.exchangeDone(); } }
log.debugf("exchange complete in connection to %s", getPeerAddress());
public void close() throws IOException { log.debugf("close called on connection to %s", getPeerAddress()); if(http2Delegate != null) { http2Delegate.close(); } if (anyAreSet(state, CLOSED)) { return; } state |= CLOSED | CLOSE_REQ; ConnectionUtils.cleanClose(connection); }
public void close() throws IOException { log.debugf("close called on connection to %s", getPeerAddress()); if(http2Delegate != null) { http2Delegate.close(); } if (anyAreSet(state, CLOSED)) { return; } state |= CLOSED | CLOSE_REQ; ConnectionUtils.cleanClose(connection); }
public void handleEvent(StreamConnection channel) { log.debugf("connection to %s closed", getPeerAddress()); HttpClientConnection.this.state |= CLOSED; ChannelListeners.invokeChannelListener(HttpClientConnection.this, closeSetter.get()); try { if (pooledBuffer != null) { pooledBuffer.close(); } } catch (Throwable ignored){} for(ChannelListener<ClientConnection> listener : closeListeners) { listener.handleEvent(HttpClientConnection.this); } HttpClientExchange pending = pendingQueue.poll(); while (pending != null) { pending.setFailed(new ClosedChannelException()); pending = pendingQueue.poll(); } if(currentRequest != null) { currentRequest.setFailed(new ClosedChannelException()); currentRequest = null; pendingResponse = null; } } });
public void handleEvent(StreamConnection channel) { log.debugf("connection to %s closed", getPeerAddress()); HttpClientConnection.this.state |= CLOSED; ChannelListeners.invokeChannelListener(HttpClientConnection.this, closeSetter.get()); try { if (pooledBuffer != null) { pooledBuffer.close(); } } catch (Throwable ignored){} for(ChannelListener<ClientConnection> listener : closeListeners) { listener.handleEvent(HttpClientConnection.this); } HttpClientExchange pending = pendingQueue.poll(); while (pending != null) { pending.setFailed(new ClosedChannelException()); pending = pendingQueue.poll(); } if(currentRequest != null) { currentRequest.setFailed(new ClosedChannelException()); currentRequest = null; pendingResponse = null; } } });
public StreamConnection performUpgrade() throws IOException { log.debugf("connection to %s is being upgraded", getPeerAddress()); // Upgrade the connection // Set the upgraded flag already to prevent new requests after this one if (allAreSet(state, UPGRADED | CLOSE_REQ | CLOSED)) { throw new IOException(UndertowClientMessages.MESSAGES.connectionClosed()); } state |= UPGRADED; connection.getSinkChannel().setConduit(originalSinkConduit); connection.getSourceChannel().setConduit(pushBackStreamSourceConduit); return connection; }
public StreamConnection performUpgrade() throws IOException { log.debugf("connection to %s is being upgraded", getPeerAddress()); // Upgrade the connection // Set the upgraded flag already to prevent new requests after this one if (allAreSet(state, UPGRADED | CLOSE_REQ | CLOSED)) { throw new IOException(UndertowClientMessages.MESSAGES.connectionClosed()); } state |= UPGRADED; connection.getSinkChannel().setConduit(originalSinkConduit); connection.getSourceChannel().setConduit(pushBackStreamSourceConduit); return connection; }
void terminateResponse() { if(anyAreSet(state, RESPONSE_TERMINATED)) { return; } log.debugf("response terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= RESPONSE_TERMINATED; if (anyAreSet(state, REQUEST_TERMINATED)) { clientConnection.exchangeDone(); } }
void terminateResponse() { if(anyAreSet(state, RESPONSE_TERMINATED)) { return; } log.debugf("response terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= RESPONSE_TERMINATED; if (anyAreSet(state, REQUEST_TERMINATED)) { clientConnection.exchangeDone(); } }
void terminateRequest() { if(anyAreSet(state, REQUEST_TERMINATED)) { return; } log.debugf("request terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= REQUEST_TERMINATED; clientConnection.requestDataSent(); if (anyAreSet(state, RESPONSE_TERMINATED)) { clientConnection.exchangeDone(); } }
void terminateRequest() { if(anyAreSet(state, REQUEST_TERMINATED)) { return; } log.debugf("request terminated for request to %s %s", clientConnection.getPeerAddress(), getRequest().getPath()); state |= REQUEST_TERMINATED; clientConnection.requestDataSent(); if (anyAreSet(state, RESPONSE_TERMINATED)) { clientConnection.exchangeDone(); } }
log.debugf("exchange complete in connection to %s", getPeerAddress());
log.debugf("exchange complete in connection to %s", getPeerAddress());