org.fusesource.hawtdispatch.transport
Class UdpTransportServer

java.lang.Object
  extended by org.fusesource.hawtdispatch.transport.ServiceBase
      extended by org.fusesource.hawtdispatch.transport.UdpTransportServer
All Implemented Interfaces:
TransportServer

public class UdpTransportServer
extends ServiceBase
implements TransportServer

Author:
Hiram Chirino

Nested Class Summary
 
Nested classes/interfaces inherited from class org.fusesource.hawtdispatch.transport.ServiceBase
ServiceBase.STARTING, ServiceBase.State, ServiceBase.STOPPING
 
Field Summary
 
Fields inherited from class org.fusesource.hawtdispatch.transport.ServiceBase
_serviceState, CREATED, STARTED, STOPPED
 
Constructor Summary
UdpTransportServer(URI location)
           
 
Method Summary
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()
           
 
Methods inherited from class org.fusesource.hawtdispatch.transport.ServiceBase
getServiceState, start, start, stop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.fusesource.hawtdispatch.transport.TransportServer
start, start, stop, stop
 

Constructor Detail

UdpTransportServer

public UdpTransportServer(URI location)
                   throws UnknownHostException
Throws:
UnknownHostException
Method Detail

setTransportServerListener

public void setTransportServerListener(TransportServerListener listener)
Description copied from interface: TransportServer
Registers an TransportAcceptListener which is notified of accepted channels.

Specified by:
setTransportServerListener in interface TransportServer

getSocketAddress

public InetSocketAddress getSocketAddress()
Specified by:
getSocketAddress in interface TransportServer
Returns:
The socket address that this transport is accepting connections on or null if this does not or is not currently accepting connections on a socket.

getDispatchQueue

public DispatchQueue getDispatchQueue()
Description copied from interface: TransportServer
Returns the dispatch queue used by the transport

Specified by:
getDispatchQueue in interface TransportServer
Specified by:
getDispatchQueue in class ServiceBase
Returns:

setDispatchQueue

public void setDispatchQueue(DispatchQueue dispatchQueue)
Description copied from interface: TransportServer
Sets the dispatch queue used by the transport

Specified by:
setDispatchQueue in interface TransportServer

_start

protected void _start(Task onCompleted)
Specified by:
_start in class ServiceBase

createTransport

protected UdpTransport createTransport()

_stop

protected void _stop(Task onCompleted)
Specified by:
_stop in class ServiceBase

suspend

public void suspend()
Description copied from interface: TransportServer
suspend accepting new transports

Specified by:
suspend in interface TransportServer

resume

public void resume()
Description copied from interface: TransportServer
resume accepting new transports

Specified by:
resume in interface TransportServer

getBoundAddress

public String getBoundAddress()
Specified by:
getBoundAddress in interface TransportServer

toString

public String toString()
Overrides:
toString in class Object
Returns:
pretty print of this

getBlockingExecutor

public Executor getBlockingExecutor()
Specified by:
getBlockingExecutor in interface TransportServer

setBlockingExecutor

public void setBlockingExecutor(Executor blockingExecutor)
Specified by:
setBlockingExecutor in interface TransportServer


Copyright © 2010-2014 FuseSource, Corp.. All Rights Reserved.