|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fusesource.hawtdispatch.transport.TcpTransportServer
public class TcpTransportServer
A TCP based implementation of TransportServer
| Constructor Summary | |
|---|---|
TcpTransportServer(URI location)
|
|
| Method Summary | |
|---|---|
protected TcpTransport |
createTransport()
|
int |
getBacklog()
|
String |
getBoundAddress()
|
String |
getConnectAddress()
|
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport |
int |
getReceive_buffer_size()
|
InetSocketAddress |
getSocketAddress()
|
protected void |
handleSocket(SocketChannel socket)
|
protected String |
resolveHostName()
|
void |
resume()
resume accepting new transports |
void |
setBacklog(int backlog)
|
void |
setDispatchQueue(DispatchQueue dispatchQueue)
Sets the dispatch queue used by the transport |
void |
setReceive_buffer_size(int receive_buffer_size)
|
void |
setTransportServerListener(TransportServerListener listener)
Registers an TransportAcceptListener which is notified of accepted
channels. |
void |
start()
|
void |
start(Runnable onCompleted)
Starts the service. |
void |
stop()
|
void |
stop(Runnable onCompleted)
Stops the service. |
void |
suspend()
suspend accepting new transports |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TcpTransportServer(URI location)
throws UnknownHostException
UnknownHostException| Method Detail |
|---|
public void setTransportServerListener(TransportServerListener listener)
TransportServerTransportAcceptListener which is notified of accepted
channels.
setTransportServerListener in interface TransportServerpublic InetSocketAddress getSocketAddress()
getSocketAddress in interface TransportServerpublic DispatchQueue getDispatchQueue()
TransportServer
getDispatchQueue in interface TransportServerpublic void setDispatchQueue(DispatchQueue dispatchQueue)
TransportServer
setDispatchQueue in interface TransportServerpublic void suspend()
TransportServer
suspend in interface TransportServerpublic void resume()
TransportServer
resume in interface TransportServer
public void start()
throws Exception
Exception
public void start(Runnable onCompleted)
throws Exception
TransportServer
start in interface TransportServeronCompleted - my be set to null if not interested in a callback.
Exceptionpublic String getBoundAddress()
getBoundAddress in interface TransportServerpublic String getConnectAddress()
getConnectAddress in interface TransportServerprotected String resolveHostName()
public void stop()
throws Exception
Exception
public void stop(Runnable onCompleted)
throws Exception
TransportServer
stop in interface TransportServeronCompleted - my be set to null if not interested in a callback.
Exceptionpublic int getBacklog()
public void setBacklog(int backlog)
protected final void handleSocket(SocketChannel socket)
throws Exception
Exceptionprotected TcpTransport createTransport()
public String toString()
toString in class Objectpublic int getReceive_buffer_size()
public void setReceive_buffer_size(int receive_buffer_size)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||