org.fusesource.fabric.dosgi.io
Interface Transport

All Superinterfaces:
Dispatched, Service
All Known Implementing Classes:
TcpTransport

public interface Transport
extends Service, Dispatched

Represents an abstract connection. It can be a client side or server side connection.

Author:
Hiram Chirino

Method Summary
 boolean full()
           
 ProtocolCodec getProtocolCodec()
           
 java.lang.String getRemoteAddress()
           
 TransportListener getTransportListener()
          Returns the current transport listener
 boolean isConnected()
           
 boolean isDisposed()
           
 boolean offer(java.lang.Object command)
          A one way asynchronous send of a command.
 void resumeRead()
          resume delivery of commands.
 void setDispatchQueue(org.fusesource.hawtdispatch.DispatchQueue queue)
          Sets the dispatch queue used by the transport
 void setProtocolCodec(ProtocolCodec protocolCodec)
          Sets the protocol codec for the transport
 void setTransportListener(TransportListener commandListener)
          Registers an inbound command listener
 void suspendRead()
          suspend delivery of commands.
 
Methods inherited from interface org.fusesource.fabric.dosgi.io.Service
start, start, stop, stop
 
Methods inherited from interface org.fusesource.fabric.dosgi.api.Dispatched
queue
 

Method Detail

full

boolean full()

offer

boolean offer(java.lang.Object command)
A one way asynchronous send of a command. Only sent if the the transport is not full.

Parameters:
command -
Returns:
true if the command was accepted.

getTransportListener

TransportListener getTransportListener()
Returns the current transport listener

Returns:

setTransportListener

void setTransportListener(TransportListener commandListener)
Registers an inbound command listener

Parameters:
commandListener -

setDispatchQueue

void setDispatchQueue(org.fusesource.hawtdispatch.DispatchQueue queue)
Sets the dispatch queue used by the transport

Parameters:
queue -

suspendRead

void suspendRead()
suspend delivery of commands.


resumeRead

void resumeRead()
resume delivery of commands.


getRemoteAddress

java.lang.String getRemoteAddress()
Returns:
the remote address for this connection

isDisposed

boolean isDisposed()
Returns:
true if the transport is disposed

isConnected

boolean isConnected()
Returns:
true if the transport is connected

getProtocolCodec

ProtocolCodec getProtocolCodec()
Returns:
The protocol codec for the transport.

setProtocolCodec

void setProtocolCodec(ProtocolCodec protocolCodec)
Sets the protocol codec for the transport

Parameters:
protocolCodec -


Copyright © 2013 Red Hat. All Rights Reserved.