Located in compilation unit of sun.
| Modifier and Type | Field and Description |
|---|---|
| private List | queue
queue of connections to be accepted |
| private static int | threadNum
thread ID counter |
| private TCPTransport | transport
transport that will handle message on accepted connections |
| Access | Constructor and Description |
|---|---|
| public | ConnectionAcceptor(TCPTransport transport)
Create a new ConnectionAcceptor that will give connections to the specified transport on a new thread. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void |
| queue | back to summary |
|---|---|
| private List<Connection> queue queue of connections to be accepted | |
| threadNum | back to summary |
|---|---|
| private static int threadNum thread ID counter | |
| transport | back to summary |
|---|---|
| private TCPTransport transport transport that will handle message on accepted connections | |
| ConnectionAcceptor | back to summary |
|---|---|
| public ConnectionAcceptor(TCPTransport transport) Create a new ConnectionAcceptor that will give connections to the specified transport on a new thread. | |
| accept | back to summary |
|---|---|
| public void accept(Connection conn) Add connection to queue of connections to be accepted. | |
| run | back to summary |
|---|---|
| public void run() Implements java. Give transport next accepted connection, when available. | |
| startNewAcceptor | back to summary |
|---|---|
| public void startNewAcceptor() Start a new thread to accept connections. | |