/** * Initializes a specific {@link ContentEncoder} implementation based on the * properties of the given {@link HttpMessage}. * * @param message the HTTP message. * @throws HttpException in case of an HTTP protocol violation. */ protected void prepareEncoder(final HttpMessage message) throws HttpException { final long len = this.outgoingContentStrategy.determineLength(message); this.contentEncoder = createContentEncoder( len, this.session.channel(), this.outbuf, this.outTransportMetrics); }
/** * Binds the connection to a different {@link IOSession}. This may be necessary * when the underlying I/O session gets upgraded with SSL/TLS encryption. * * @since 4.2 */ protected void bind(final IOSession session) { Args.notNull(session, "I/O session"); setSession(session); }
@Override public void closed(final NHttpServerConnection conn) { NHttpConnectionBase conn2 = (NHttpConnectionBase) conn; log.info("closed: {} {}<-> {} context={} socketTimeout={}", HttpsServer.this.getBoundSocketAddresses(), conn2.getLocalAddress(), conn2.getRemoteAddress(), conn2.getContext(), conn2.getSocketTimeout()); HttpsServerConnection conn3 = connMap.remove(conn); connections.removeConnection( conn3 ); super.closed(conn); }
this.constraints = MessageConstraints.DEFAULT; this.incomingContentStrategy = createIncomingContentStrategy(); this.outgoingContentStrategy = createOutgoingContentStrategy(); this.inTransportMetrics = createTransportMetrics(); this.outTransportMetrics = createTransportMetrics(); this.connMetrics = createConnectionMetrics( this.inTransportMetrics, this.outTransportMetrics); setSession(session); this.status = ACTIVE;
final BasicHttpEntity entity = new BasicHttpEntity(); final long len = this.incomingContentStrategy.determineLength(message); this.contentDecoder = createContentDecoder( len, this.session.channel(),
this.constraints = MessageConstraints.DEFAULT; this.incomingContentStrategy = createIncomingContentStrategy(); this.outgoingContentStrategy = createOutgoingContentStrategy(); this.inTransportMetrics = createTransportMetrics(); this.outTransportMetrics = createTransportMetrics(); this.connMetrics = createConnectionMetrics( this.inTransportMetrics, this.outTransportMetrics); setSession(session); this.status = ACTIVE;
final BasicHttpEntity entity = new BasicHttpEntity(); final long len = this.incomingContentStrategy.determineLength(message); this.contentDecoder = createContentDecoder( len, this.session.channel(),
@Override public void connected(final NHttpServerConnection conn) { NHttpConnectionBase conn2 = (NHttpConnectionBase) conn; log.info("connected: {} {}<-> {} context={} socketTimeout={}", HttpsServer.this.getBoundSocketAddresses(), conn2.getLocalAddress(), conn2.getRemoteAddress(), conn2.getContext(), conn2.getSocketTimeout()); HttpsServerConnection httpsConnection = new HttpsServerConnection(HttpsServer.this, conn); connMap.put(conn, httpsConnection); connections.addConnection( httpsConnection ); super.connected(conn); }
/** * Binds the connection to a different {@link IOSession}. This may be necessary * when the underlying I/O session gets upgraded with SSL/TLS encryption. * * @since 4.2 */ protected void bind(final IOSession session) { Args.notNull(session, "I/O session"); setSession(session); }
/** * Initializes a specific {@link ContentEncoder} implementation based on the * properties of the given {@link HttpMessage}. * * @param message the HTTP message. * @throws HttpException in case of an HTTP protocol violation. */ protected void prepareEncoder(final HttpMessage message) throws HttpException { final long len = this.outgoingContentStrategy.determineLength(message); this.contentEncoder = createContentEncoder( len, this.session.channel(), this.outbuf, this.outTransportMetrics); }
StrictContentLengthStrategy.INSTANCE; setSession(session); this.status = ACTIVE;
StrictContentLengthStrategy.INSTANCE; setSession(session); this.status = ACTIVE;