/** * @see org.eclipse.jetty.io.bio.StreamEndPoint#setMaxIdleTime(int) */ @Override public void setMaxIdleTime(int timeMs) throws IOException { if (timeMs!=getMaxIdleTime()) _socket.setSoTimeout(timeMs>0?timeMs:0); super.setMaxIdleTime(timeMs); }
@Override protected void idleExpired() throws IOException { try { if (!isInputShutdown()) shutdownInput(); } catch(IOException e) { LOG.ignore(e); _socket.close(); } }
@Override public void shutdownInput() throws IOException { if (_socket instanceof SSLSocket) super.shutdownInput(); else shutdownSocketInput(); }
@Override public void close() throws IOException { if (_connection instanceof AbstractHttpConnection) ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel(); super.close(); }
@Override public int fill(Buffer buffer) throws IOException { int l = super.fill(buffer); if (l<0) { if (!isInputShutdown()) shutdownInput(); if (isOutputShutdown()) close(); } return l; }
/** * Allow the Listener a chance to customise the request. before the server does its stuff. <br> * This allows the required attributes to be set for SSL requests. <br> * The requirements of the Servlet specs are: * <ul> * <li> an attribute named "javax.servlet.request.ssl_id" of type String (since Spec 3.0).</li> * <li> an attribute named "javax.servlet.request.cipher_suite" of type String.</li> * <li> an attribute named "javax.servlet.request.key_size" of type Integer.</li> * <li> an attribute named "javax.servlet.request.X509Certificate" of type * java.security.cert.X509Certificate[]. This is an array of objects of type X509Certificate, * the order of this array is defined as being in ascending order of trust. The first * certificate in the chain is the one set by the client, the next is the one used to * authenticate the first, and so on. </li> * </ul> * * @param endpoint The Socket the request arrived on. * This should be a {@link SocketEndPoint} wrapping a {@link SSLSocket}. * @param request HttpRequest to be customised. */ @Override public void customize(EndPoint endpoint, Request request) throws IOException { super.customize(endpoint, request); request.setScheme(HttpSchemes.HTTPS); SocketEndPoint socket_end_point = (SocketEndPoint)endpoint; SSLSocket sslSocket = (SSLSocket)socket_end_point.getTransport(); SSLSession sslSession = sslSocket.getSession(); SslCertificates.customize(sslSession,endpoint,request); }
@Override public void shutdownOutput() throws IOException { if (_socket instanceof SSLSocket) super.shutdownOutput(); else shutdownSocketOutput(); }
@Override public void close() throws IOException { if (_connection instanceof AbstractHttpConnection) ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel(); super.close(); }
@Override public int fill(Buffer buffer) throws IOException { int l = super.fill(buffer); if (l<0) { if (!isInputShutdown()) shutdownInput(); if (isOutputShutdown()) close(); } return l; }
/** * Allow the Listener a chance to customise the request. before the server does its stuff. <br> * This allows the required attributes to be set for SSL requests. <br> * The requirements of the Servlet specs are: * <ul> * <li> an attribute named "javax.servlet.request.ssl_id" of type String (since Spec 3.0).</li> * <li> an attribute named "javax.servlet.request.cipher_suite" of type String.</li> * <li> an attribute named "javax.servlet.request.key_size" of type Integer.</li> * <li> an attribute named "javax.servlet.request.X509Certificate" of type * java.security.cert.X509Certificate[]. This is an array of objects of type X509Certificate, * the order of this array is defined as being in ascending order of trust. The first * certificate in the chain is the one set by the client, the next is the one used to * authenticate the first, and so on. </li> * </ul> * * @param endpoint The Socket the request arrived on. * This should be a {@link SocketEndPoint} wrapping a {@link SSLSocket}. * @param request HttpRequest to be customised. */ @Override public void customize(EndPoint endpoint, Request request) throws IOException { super.customize(endpoint, request); request.setScheme(HttpSchemes.HTTPS); SocketEndPoint socket_end_point = (SocketEndPoint)endpoint; SSLSocket sslSocket = (SSLSocket)socket_end_point.getTransport(); SSLSession sslSession = sslSocket.getSession(); SslCertificates.customize(sslSession,endpoint,request); }
@Override public void shutdownOutput() throws IOException { if (_socket instanceof SSLSocket) super.shutdownOutput(); else shutdownSocketOutput(); }
@Override protected void idleExpired() throws IOException { try { if (!isInputShutdown()) shutdownInput(); } catch(IOException e) { LOG.ignore(e); _socket.close(); } }
@Override public void close() throws IOException { if (_connection instanceof AbstractHttpConnection) ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel(); super.close(); }
@Override public int fill(Buffer buffer) throws IOException { int l = super.fill(buffer); if (l<0) { if (!isInputShutdown()) shutdownInput(); if (isOutputShutdown()) close(); } return l; }
/** * Allow the Listener a chance to customise the request. before the server does its stuff. <br> * This allows the required attributes to be set for SSL requests. <br> * The requirements of the Servlet specs are: * <ul> * <li> an attribute named "javax.servlet.request.ssl_id" of type String (since Spec 3.0).</li> * <li> an attribute named "javax.servlet.request.cipher_suite" of type String.</li> * <li> an attribute named "javax.servlet.request.key_size" of type Integer.</li> * <li> an attribute named "javax.servlet.request.X509Certificate" of type * java.security.cert.X509Certificate[]. This is an array of objects of type X509Certificate, * the order of this array is defined as being in ascending order of trust. The first * certificate in the chain is the one set by the client, the next is the one used to * authenticate the first, and so on. </li> * </ul> * * @param endpoint The Socket the request arrived on. * This should be a {@link SocketEndPoint} wrapping a {@link SSLSocket}. * @param request HttpRequest to be customised. */ @Override public void customize(EndPoint endpoint, Request request) throws IOException { super.customize(endpoint, request); request.setScheme(HttpSchemes.HTTPS); SocketEndPoint socket_end_point = (SocketEndPoint)endpoint; SSLSocket sslSocket = (SSLSocket)socket_end_point.getTransport(); SSLSession sslSession = sslSocket.getSession(); SslCertificates.customize(sslSession,endpoint,request); }
@Override public void shutdownOutput() throws IOException { if (_socket instanceof SSLSocket) super.shutdownOutput(); else shutdownSocketOutput(); }
/** * @see org.eclipse.jetty.io.bio.StreamEndPoint#setMaxIdleTime(int) */ @Override public void setMaxIdleTime(int timeMs) throws IOException { if (timeMs!=getMaxIdleTime()) _socket.setSoTimeout(timeMs>0?timeMs:0); super.setMaxIdleTime(timeMs); }
@Override public void shutdownInput() throws IOException { if (_socket instanceof SSLSocket) super.shutdownInput(); else shutdownSocketInput(); }
@Override protected void idleExpired() throws IOException { try { if (!isInputShutdown()) shutdownInput(); } catch(IOException e) { LOG.ignore(e); _socket.close(); } }
@Override public void close() throws IOException { if (_connection instanceof AbstractHttpConnection) ((AbstractHttpConnection)_connection).getRequest().getAsyncContinuation().cancel(); super.close(); }