public class PipeTransportServer extends Object implements TransportServer
| Modifier and Type | Field and Description |
|---|---|
protected AtomicInteger |
connectionCounter |
protected String |
connectURI |
protected TransportServerListener |
listener |
protected boolean |
marshal |
protected String |
name |
| Constructor and Description |
|---|
PipeTransportServer() |
| Modifier and Type | Method and Description |
|---|---|
PipeTransport |
connect() |
protected PipeTransport |
createClientTransport() |
protected PipeTransport |
createServerTransport() |
Executor |
getBlockingExecutor() |
String |
getBoundAddress() |
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport
|
String |
getName() |
InetSocketAddress |
getSocketAddress() |
boolean |
isMarshal() |
void |
resume()
resume accepting new transports
|
void |
setBlockingExecutor(Executor blockingExecutor) |
void |
setConnectURI(String connectURI) |
void |
setDispatchQueue(DispatchQueue queue)
Sets the dispatch queue used by the transport
|
void |
setMarshal(boolean marshal) |
void |
setName(String name) |
void |
setTransportServerListener(TransportServerListener listener)
Registers an
TransportAcceptListener which is notified of accepted
channels. |
void |
start(Runnable onCompleted)
Deprecated.
|
void |
start(Task onCompleted)
Starts the service.
|
void |
stop(Runnable onCompleted)
Deprecated.
|
void |
stop(Task onCompleted)
Stops the service.
|
void |
suspend()
suspend accepting new transports
|
protected String connectURI
protected TransportServerListener listener
protected boolean marshal
protected final AtomicInteger connectionCounter
public PipeTransportServer()
public String getBoundAddress()
getBoundAddress in interface TransportServerpublic InetSocketAddress getSocketAddress()
getSocketAddress in interface TransportServerpublic DispatchQueue getDispatchQueue()
TransportServergetDispatchQueue in interface TransportServerpublic void setDispatchQueue(DispatchQueue queue)
TransportServersetDispatchQueue in interface TransportServerpublic void suspend()
TransportServersuspend in interface TransportServerpublic void resume()
TransportServerresume in interface TransportServerpublic void setTransportServerListener(TransportServerListener listener)
TransportServerTransportAcceptListener which is notified of accepted
channels.setTransportServerListener in interface TransportServer@Deprecated public void start(Runnable onCompleted) throws Exception
start in interface TransportServerException@Deprecated public void stop(Runnable onCompleted) throws Exception
stop in interface TransportServerExceptionpublic void start(Task onCompleted) throws Exception
TransportServerstart in interface TransportServeronCompleted - my be set to null if not interested in a callback.Exceptionpublic void stop(Task onCompleted) throws Exception
TransportServerstop in interface TransportServeronCompleted - my be set to null if not interested in a callback.Exceptionpublic void setConnectURI(String connectURI)
public PipeTransport connect()
protected PipeTransport createClientTransport()
protected PipeTransport createServerTransport()
public boolean isMarshal()
public void setMarshal(boolean marshal)
public Executor getBlockingExecutor()
getBlockingExecutor in interface TransportServerpublic void setBlockingExecutor(Executor blockingExecutor)
setBlockingExecutor in interface TransportServerCopyright © 2010-2013 FuseSource, Corp.. All Rights Reserved.