org.apache.tomcat.util.net

Class NioEndpoint.Worker

protected class NioEndpoint.Worker extends Object implements Runnable

Server processor class.
Field Summary
protected booleanavailable
protected Objectsocket
protected SocketStatusstatus
protected Threadthread
Method Summary
protected voidassign(Object socket)
Process an incoming TCP/IP connection on the specified socket.
protected voidassign(Object socket, SocketStatus status)
protected Objectawait()
Await a newly assigned Socket from our Connector, or null if we are supposed to shut down.
voidrun()
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.
voidstart()
Start the background processing thread.

Field Detail

available

protected boolean available

socket

protected Object socket

status

protected SocketStatus status

thread

protected Thread thread

Method Detail

assign

protected void assign(Object socket)
Process an incoming TCP/IP connection on the specified socket. Any exception that occurs during processing must be logged and swallowed. NOTE: This method is called from our Connector's thread. We must assign it to our own thread so that multiple simultaneous requests can be handled.

Parameters: socket TCP socket to process

assign

protected void assign(Object socket, SocketStatus status)

await

protected Object await()
Await a newly assigned Socket from our Connector, or null if we are supposed to shut down.

run

public void run()
The background thread that listens for incoming TCP/IP connections and hands them off to an appropriate processor.

start

public void start()
Start the background processing thread.
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.