InboundHTTP.java
public void run() {
		try {

			// Log session start
			System.out.println("\n\n====\n"+this+" ["+sessionId+"]: new thread started...");

			try {
				// Use the ServerState object to process the Request and Responce objects
				request = new RequestHTTP( socket, sessionId );
				response = new ResponseHTTP( socket, sessionId );
				server.state().respond( this );
				response.transmit();
			} catch (Exception e) {
				System.out.println(this+" ["+sessionId+"] ERROR: Exception while processing client.");
				System.out.println(e);
				e.printStackTrace();
			}

			// Close the socket
			socket.close();

			// Log session end
			System.out.println(this+" ["+sessionId+"]: socket closed.\n====\n\n");

		} catch (Exception e) {
			System.out.println(this+" ["+sessionId+"] ERROR: Exception in thread.");
			System.out.println(e);
			e.printStackTrace();
		}
	}
// Read the HTTP request, respond, and close the connection
Read the HTTP request, respond, and close the connection
Read the HTTP request respond and close the connection
public void run() {
		try {
			System.out.println("\n\n====\n"+this+" ["+sessionId+"]: new thread started...");
			try {
				request = new RequestHTTP( socket, sessionId );
				response = new ResponseHTTP( socket, sessionId );
				server.state().respond( this );
				response.transmit();
			} catch (Exception e) {
				System.out.println(this+" ["+sessionId+"] ERROR: Exception while processing client.");
				System.out.println(e);
				e.printStackTrace();
			}
			socket.close();
			System.out.println(this+" ["+sessionId+"]: socket closed.\n====\n\n");
		} catch (Exception e) {
			System.out.println(this+" ["+sessionId+"] ERROR: Exception in thread.");
			System.out.println(e);
			e.printStackTrace();
		}
	}
public void run ( ) { try { System . out . println ( "\n\n====\n" + this + " [" + sessionId + "]: new thread started..." ) ; try { request = new RequestHTTP ( socket , sessionId ) ; response = new ResponseHTTP ( socket , sessionId ) ; server . state ( ) . respond ( this ) ; response . transmit ( ) ; } catch ( Exception e ) { System . out . println ( this + " [" + sessionId + "] ERROR: Exception while processing client." ) ; System . out . println ( e ) ; e . printStackTrace ( ) ; } socket . close ( ) ; System . out . println ( this + " [" + sessionId + "]: socket closed.\n====\n\n" ) ; } catch ( Exception e ) { System . out . println ( this + " [" + sessionId + "] ERROR: Exception in thread." ) ; System . out . println ( e ) ; e . printStackTrace ( ) ; } }
Read the HTTP request, respond, and close the connection
Read the HTTP request respond and close the connection
// Log session start // Use the ServerState object to process the Request and Responce objects // Close the socket // Log session end