/** * This method is used to stop the connector in such a way that it * will not accept and process any further messages. If there are * resources to clean up they may be cleaned up asynchronously * so that this method can return without blocking. */ public void stop() throws IOException { adapter.stop(); } }
/** * This is used to consume HTTP messages that arrive on the socket * and dispatch them to the internal container. Depending on whether * the socket contains an <code>SSLEngine</code> an SSL handshake may * be performed before any HTTP messages are consumed. This can be * called from multiple threads and does not block. * * @param socket this is the connected HTTP pipeline to process */ public void process(Socket socket) throws IOException { adapter.process(socket); }
@Override public void stop() throws IOException { delegate.stop(); } }
/** * This is used to consume HTTP messages that arrive on the socket * and dispatch them to the internal container. Depending on whether * the socket contains an <code>SSLEngine</code> an SSL handshake may * be performed before any HTTP messages are consumed. This can be * called from multiple threads and does not block. * * @param socket this is the connected HTTP pipeline to process */ public void process(Socket socket) throws IOException { adapter.process(socket); }
/** * This method is used to stop the connector in such a way that it * will not accept and process any further messages. If there are * resources to clean up they may be cleaned up asynchronously * so that this method can return without blocking. */ public void stop() throws IOException { adapter.stop(); } }
@Override public void process(Socket socket) throws IOException { socket.getEngine().setNeedClientAuth(true); delegate.process(socket); }
public void stop() { try { connection.close(); server.stop(); }catch(Exception e) { e.printStackTrace(); } }
/** * This method is used to dispatch the socket for processing. The * socket will be configured and connected to the client, this * will hand processing to the <code>Server</code> which will * create the pipeline instance used to wrap the socket object. * * @param channel this is the connected socket to be processed * @param trace this is the trace to associate with the socket * @param engine this is the SSL engine used for secure HTTPS */ private void process(SocketChannel channel, Trace trace, SSLEngine engine) throws IOException { Socket socket = new SocketWrapper(channel, trace, engine); try { trace.trace(ACCEPT); processor.process(socket); } catch(Exception cause) { trace.trace(ERROR, cause); channel.close(); } }
/** * This is used to close the connection and the server socket * used to accept connections. This will perform a close of all * connected server sockets that have been created from using * the <code>connect</code> method. The connection can be * reused after the existing server sockets have been closed. * * @throws IOException thrown if there is a problem closing */ public void close() throws IOException { if(!closed) { manager.close(); processor.stop(); } closed = true; } }
/** * This method is used to dispatch the socket for processing. The * socket will be configured and connected to the client, this * will hand processing to the <code>Server</code> which will * create the pipeline instance used to wrap the socket object. * * @param channel this is the connected socket to be processed * @param trace this is the trace to associate with the socket * @param engine this is the SSL engine used for secure HTTPS */ private void process(SocketChannel channel, Trace trace, SSLEngine engine) throws IOException { Socket socket = new SocketWrapper(channel, trace, engine); try { trace.trace(ACCEPT); processor.process(socket); } catch(Exception cause) { trace.trace(ERROR, cause); channel.close(); } }
/** * This is used to close the connection and the server socket * used to accept connections. This will perform a close of all * connected server sockets that have been created from using * the <code>connect</code> method. The connection can be * reused after the existing server sockets have been closed. * * @throws IOException thrown if there is a problem closing */ public void close() throws IOException { if(!closed) { manager.close(); processor.stop(); } closed = true; } }