org.apache.activemq.apollo.transport
Interface Transport

All Superinterfaces:
Service
All Known Implementing Classes:
PipeTransport, TransportFilter

public interface Transport
extends Service

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

Author:
Hiram Chirino

Method Summary
 boolean full()
           
 org.fusesource.hawtdispatch.DispatchQueue getDispatchQueue()
          Returns the dispatch queue used by the transport
 ProtocolCodec getProtocolCodec()
           
 java.lang.String getRemoteAddress()
           
 TransportListener getTransportListener()
          Returns the current transport listener
 java.lang.String getTypeId()
           
 boolean isConnected()
           
 boolean isDisposed()
           
 boolean isFaultTolerant()
          Indicates if the transport can handle faults
<T> T
narrow(java.lang.Class<T> target)
           
 boolean offer(java.lang.Object command)
          A one way asynchronous send of a command.
 void reconnect(java.net.URI uri)
          reconnect to another location
 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.apache.activemq.apollo.util.Service
start, start, stop, stop
 

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 -

getDispatchQueue

org.fusesource.hawtdispatch.DispatchQueue getDispatchQueue()
Returns the dispatch queue used by the transport

Returns:

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.


narrow

<T> T narrow(java.lang.Class<T> target)
Parameters:
target -
Returns:
the target

getRemoteAddress

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

isFaultTolerant

boolean isFaultTolerant()
Indicates if the transport can handle faults

Returns:
true if fault tolerant

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 -

reconnect

void reconnect(java.net.URI uri)
reconnect to another location

Parameters:
uri -
Throws:
java.io.IOException - on failure of if not supported

getTypeId

java.lang.String getTypeId()
Returns:
the identifier for the transport type. Example "tcp" for the tcp transport.


Copyright © 2005-2011 The Apache Software Foundation. All Rights Reserved.