/** * This is used to transfer the transport to the negotiator. This * will typically be executed asynchronously so that it does not * delay the thread that passes the <code>Pipeline</code> to the * transport processor, ensuring quicker processing. */ public void run() { try { negotiator.process(transport); }catch(Exception e) { cancel(); } }
/** * Used to process the <code>Pipeline</code> which is a full duplex * communication link that may contain several HTTP requests. This * will be used to read the requests from the <code>Pipeline</code> * and to pass these requests to a <code>Container</code> for * processing. * <p> * Typical usage of this method is to accept multiple pipeline * objects, each representing a unique HTTP channel to the client, * and process requests from those pipelines concurrently. * * @param socket this is the connected HTTP pipeline to process */ public void process(Socket socket) throws IOException { Operation task = factory.getInstance(socket); if(task != null) { negotiator.process(task); } }
/** * This method is invoked when the negotiation is done and the * next phase of the connection is to take place. This will * be invoked when the SSL handshake has completed and the new * secure transport is to be handed to the processor. */ private void dispatch() throws IOException { Transport secure = new SecureTransport(transport, state, output, input); if(negotiator != null) { trace.trace(HANDSHAKE_DONE); negotiator.process(secure); } }