|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.transport.tcp.TcpTransport
public class TcpTransport
Implementation of a TCP Transport.
The constructor supports the following
properties:
"com.sun.sgs.impl.transport.tcp.listen.address"
"com.sun.sgs.impl.transport.tcp.listen.port"
"com.sun.sgs.impl.transport.tcp.acceptor.backlog"
AsynchronousServerSocketChannel.bind method.
| Field Summary | |
|---|---|
(package private) IoFuture<?,?> |
acceptFuture
The currently-active accept operation, or null if none. |
(package private) AsynchronousServerSocketChannel |
acceptor
The acceptor for listening for new connections. |
static String |
ACCEPTOR_BACKLOG_PROPERTY
The name of the acceptor backlog property. |
static int |
DEFAULT_PORT
The default port: 62964. |
static String |
LISTEN_HOST_PROPERTY
The server listen address property. |
static String |
LISTEN_PORT_PROPERTY
The name of the server port property. |
(package private) InetSocketAddress |
listenAddress
The listen address. |
| Constructor Summary | |
|---|---|
TcpTransport(Properties properties)
Constructs an instance of this class with the specified properties. |
|
| Method Summary | |
|---|---|
void |
accept(ConnectionHandler handler)
Start accepting connections. |
Delivery |
getDelivery()
Returns the delivery guarantee for the transport. |
TransportDescriptor |
getDescriptor()
Returns the descriptor for this transport. |
void |
shutdown()
Shutdown the transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String LISTEN_HOST_PROPERTY
public static final String LISTEN_PORT_PROPERTY
public static final int DEFAULT_PORT
final InetSocketAddress listenAddress
public static final String ACCEPTOR_BACKLOG_PROPERTY
volatile AsynchronousServerSocketChannel acceptor
volatile IoFuture<?,?> acceptFuture
null if none.
| Constructor Detail |
|---|
public TcpTransport(Properties properties)
properties - transport properties| Method Detail |
|---|
public TransportDescriptor getDescriptor()
getDescriptor in interface Transportpublic Delivery getDelivery()
getDelivery in interface Transportpublic void accept(ConnectionHandler handler)
handler's newConnection
method when a connection is received. Once accept has
been called, subsequent invocations will throw an
IllegalStateException. If
Transport.shutdown() has been called this method will throw an
IllegalStateException.
accept in interface Transporthandler - the connection handlerpublic void shutdown()
shutdown will have no affect.
shutdown in interface Transport
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||