public class PipeTransportServer extends java.lang.Object implements TransportServer
| Modifier and Type | Field and Description |
|---|---|
private CustomDispatchSource<PipeTransport,java.util.LinkedList<PipeTransport>> |
acceptSource |
protected java.util.concurrent.atomic.AtomicInteger |
connectionCounter |
protected java.lang.String |
connectURI |
(package private) DispatchQueue |
dispatchQueue |
protected TransportServerListener |
listener |
protected boolean |
marshal |
protected java.lang.String |
name |
| Constructor and Description |
|---|
PipeTransportServer() |
| Modifier and Type | Method and Description |
|---|---|
PipeTransport |
connect() |
protected PipeTransport |
createClientTransport() |
protected PipeTransport |
createServerTransport() |
java.util.concurrent.Executor |
getBlockingExecutor() |
java.lang.String |
getBoundAddress() |
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport
|
java.lang.String |
getName() |
java.net.InetSocketAddress |
getSocketAddress() |
boolean |
isMarshal() |
void |
resume()
resume accepting new transports
|
void |
setBlockingExecutor(java.util.concurrent.Executor blockingExecutor) |
void |
setConnectURI(java.lang.String connectURI) |
void |
setDispatchQueue(DispatchQueue queue)
Sets the dispatch queue used by the transport
|
void |
setMarshal(boolean marshal) |
void |
setName(java.lang.String name) |
void |
setTransportServerListener(TransportServerListener listener)
Registers an
TransportAcceptListener which is notified of accepted
channels. |
void |
start(java.lang.Runnable onCompleted)
Deprecated.
|
void |
start(Task onCompleted)
Starts the service.
|
void |
stop(java.lang.Runnable onCompleted)
Deprecated.
|
void |
stop(Task onCompleted)
Stops the service.
|
void |
suspend()
suspend accepting new transports
|
protected java.lang.String connectURI
protected TransportServerListener listener
protected java.lang.String name
protected boolean marshal
protected final java.util.concurrent.atomic.AtomicInteger connectionCounter
DispatchQueue dispatchQueue
private CustomDispatchSource<PipeTransport,java.util.LinkedList<PipeTransport>> acceptSource
public java.lang.String getBoundAddress()
getBoundAddress in interface TransportServerpublic java.net.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(java.lang.Runnable onCompleted)
throws java.lang.Exception
start in interface TransportServerjava.lang.Exception@Deprecated
public void stop(java.lang.Runnable onCompleted)
throws java.lang.Exception
stop in interface TransportServerjava.lang.Exceptionpublic void start(Task onCompleted) throws java.lang.Exception
TransportServerstart in interface TransportServeronCompleted - my be set to null if not interested in a callback.java.lang.Exceptionpublic void stop(Task onCompleted) throws java.lang.Exception
TransportServerstop in interface TransportServeronCompleted - my be set to null if not interested in a callback.java.lang.Exceptionpublic void setConnectURI(java.lang.String connectURI)
public void setName(java.lang.String name)
public java.lang.String getName()
public PipeTransport connect()
protected PipeTransport createClientTransport()
protected PipeTransport createServerTransport()
public boolean isMarshal()
public void setMarshal(boolean marshal)
public java.util.concurrent.Executor getBlockingExecutor()
getBlockingExecutor in interface TransportServerpublic void setBlockingExecutor(java.util.concurrent.Executor blockingExecutor)
setBlockingExecutor in interface TransportServer