public class UdpTransportServer extends ServiceBase implements TransportServer
ServiceBase.STARTING, ServiceBase.State, ServiceBase.STOPPING
_serviceState, CREATED, STARTED, STOPPED
Constructor and Description |
---|
UdpTransportServer(URI location) |
Modifier and Type | Method and Description |
---|---|
protected void |
_start(Task onCompleted) |
protected void |
_stop(Task onCompleted) |
protected UdpTransport |
createTransport() |
Executor |
getBlockingExecutor() |
String |
getBoundAddress() |
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport
|
InetSocketAddress |
getSocketAddress() |
void |
resume()
resume accepting new transports
|
void |
setBlockingExecutor(Executor blockingExecutor) |
void |
setDispatchQueue(DispatchQueue dispatchQueue)
Sets the dispatch queue used by the transport
|
void |
setTransportServerListener(TransportServerListener listener)
Registers an
TransportAcceptListener which is notified of accepted
channels. |
void |
suspend()
suspend accepting new transports
|
String |
toString() |
getServiceState, start, start, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
start, start, stop, stop
public UdpTransportServer(URI location) throws UnknownHostException
UnknownHostException
public void setTransportServerListener(TransportServerListener listener)
TransportServer
TransportAcceptListener
which is notified of accepted
channels.setTransportServerListener
in interface TransportServer
public InetSocketAddress getSocketAddress()
getSocketAddress
in interface TransportServer
public DispatchQueue getDispatchQueue()
TransportServer
getDispatchQueue
in interface TransportServer
getDispatchQueue
in class ServiceBase
public void setDispatchQueue(DispatchQueue dispatchQueue)
TransportServer
setDispatchQueue
in interface TransportServer
protected void _start(Task onCompleted)
_start
in class ServiceBase
protected UdpTransport createTransport()
protected void _stop(Task onCompleted)
_stop
in class ServiceBase
public void suspend()
TransportServer
suspend
in interface TransportServer
public void resume()
TransportServer
resume
in interface TransportServer
public String getBoundAddress()
getBoundAddress
in interface TransportServer
public Executor getBlockingExecutor()
getBlockingExecutor
in interface TransportServer
public void setBlockingExecutor(Executor blockingExecutor)
setBlockingExecutor
in interface TransportServer
Copyright © 2010–2017 FuseSource, Corp.. All rights reserved.