APIdia Launch Partner
Top Description Fields Constructors Methods
sun.rmi.transport.tcp

pack-priv Class ConnectionAcceptor

Located in compilation unit of sun.rmi.transport.tcp.TCPChannel.

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

ConnectionAcceptor manages accepting new connections and giving them to TCPTransport's message handler on new threads. Since this object only needs to know which transport to give new connections to, it doesn't need to be per-channel as currently implemented.

Field Summary

Modifier and TypeField and Description
private List<Connection>
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

Constructor Summary

AccessConstructor and Description
public
ConnectionAcceptor(TCPTransport transport)

Create a new ConnectionAcceptor that will give connections to the specified transport on a new thread.

Method Summary

Modifier and TypeMethod and Description
public void
accept(Connection conn)

Add connection to queue of connections to be accepted.

public void
run()

Implements java.lang.Runnable.run.

Give transport next accepted connection, when available.

public void
startNewAcceptor()

Start a new thread to accept connections.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

queueback to summary
private List<Connection> queue

queue of connections to be accepted

threadNumback to summary
private static int threadNum

thread ID counter

transportback to summary
private TCPTransport transport

transport that will handle message on accepted connections

Constructor Detail

ConnectionAcceptorback to summary
public ConnectionAcceptor(TCPTransport transport)

Create a new ConnectionAcceptor that will give connections to the specified transport on a new thread.

Method Detail

acceptback to summary
public void accept(Connection conn)

Add connection to queue of connections to be accepted.

runback to summary
public void run()

Implements java.lang.Runnable.run.

Give transport next accepted connection, when available.

startNewAcceptorback to summary
public void startNewAcceptor()

Start a new thread to accept connections.