org.fusesource.hawtdispatch.transport
Class PipeTransportServer

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

public class PipeTransportServer
extends Object
implements TransportServer

Author:
Hiram Chirino

Field Summary
protected  AtomicInteger connectionCounter
           
protected  String connectURI
           
protected  TransportServerListener listener
           
protected  boolean marshal
           
protected  String name
           
 
Constructor Summary
PipeTransportServer()
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectURI

protected String connectURI

listener

protected TransportServerListener listener

name

protected String name

marshal

protected boolean marshal

connectionCounter

protected final AtomicInteger connectionCounter
Constructor Detail

PipeTransportServer

public PipeTransportServer()
Method Detail

getBoundAddress

public String getBoundAddress()
Specified by:
getBoundAddress 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
Returns:

setDispatchQueue

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

Specified by:
setDispatchQueue in interface TransportServer

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

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

start

@Deprecated
public void start(Runnable onCompleted)
           throws Exception
Deprecated. 

Specified by:
start in interface TransportServer
Throws:
Exception

stop

@Deprecated
public void stop(Runnable onCompleted)
          throws Exception
Deprecated. 

Specified by:
stop in interface TransportServer
Throws:
Exception

start

public void start(Task onCompleted)
           throws Exception
Description copied from interface: TransportServer
Starts the service. Executes the onComplete runnable once the service has fully started up.

Specified by:
start in interface TransportServer
Parameters:
onCompleted - my be set to null if not interested in a callback.
Throws:
Exception

stop

public void stop(Task onCompleted)
          throws Exception
Description copied from interface: TransportServer
Stops the service. Executes the onComplete runnable once the service has fully stopped.

Specified by:
stop in interface TransportServer
Parameters:
onCompleted - my be set to null if not interested in a callback.
Throws:
Exception

setConnectURI

public void setConnectURI(String connectURI)

setName

public void setName(String name)

getName

public String getName()

connect

public PipeTransport connect()

createClientTransport

protected PipeTransport createClientTransport()

createServerTransport

protected PipeTransport createServerTransport()

isMarshal

public boolean isMarshal()

setMarshal

public void setMarshal(boolean marshal)

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.