org.apache.activemq.transport
Interface Transport

All Superinterfaces:
Service
All Known Subinterfaces:
CompositeTransport
All Known Implementing Classes:
BlockingQueueTransport, CommandJoiner, DiscoveryTransport, FailoverTransport, FanoutTransport, HttpClientTransport, HttpsTransport, HttpTransport, HttpTransportSupport, InactivityMonitor, MarshallingTransportFilter, MockTransport, MulticastTransport, MutexTransport, ReliableTransport, ResponseCorrelator, ResponseRedirectInterceptor, SslTransport, StompTransportFilter, TcpTransport, TransportFilter, TransportLogger, TransportSupport, TransportThreadSupport, UdpTransport, VMTransport, WireFormatNegotiator, XmppTransport

public interface Transport
extends Service

Represents the client side of a transport allowing messages to be sent synchronously, asynchronously and consumed.

Version:
$Revision: 1.5 $

Method Summary
 FutureResponse asyncRequest(java.lang.Object command, ResponseCallback responseCallback)
          An asynchronous request response where the Receipt will be returned in the future.
 java.lang.String getRemoteAddress()
           
 TransportListener getTransportListener()
          Returns the current transport listener
 java.lang.Object narrow(java.lang.Class target)
           
 void oneway(java.lang.Object command)
          A one way asynchronous send
 java.lang.Object request(java.lang.Object command)
          A synchronous request response
 java.lang.Object request(java.lang.Object command, int timeout)
          A synchronous request response
 void setTransportListener(TransportListener commandListener)
          Registers an inbound command listener
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

oneway

void oneway(java.lang.Object command)
            throws java.io.IOException
A one way asynchronous send

Parameters:
command -
Throws:
java.io.IOException

asyncRequest

FutureResponse asyncRequest(java.lang.Object command,
                            ResponseCallback responseCallback)
                            throws java.io.IOException
An asynchronous request response where the Receipt will be returned in the future. If responseCallback is not null, then it will be called when the response has been completed.

Parameters:
command -
responseCallback - TODO
Returns:
the FutureResponse
Throws:
java.io.IOException

request

java.lang.Object request(java.lang.Object command)
                         throws java.io.IOException
A synchronous request response

Parameters:
command -
Returns:
the response
Throws:
java.io.IOException

request

java.lang.Object request(java.lang.Object command,
                         int timeout)
                         throws java.io.IOException
A synchronous request response

Parameters:
command -
timeout -
Returns:
the repsonse or null if timeout
Throws:
java.io.IOException

getTransportListener

TransportListener getTransportListener()
Returns the current transport listener

Returns:

setTransportListener

void setTransportListener(TransportListener commandListener)
Registers an inbound command listener

Parameters:
commandListener -

narrow

java.lang.Object narrow(java.lang.Class target)
Parameters:
target -
Returns:
the target

getRemoteAddress

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


Copyright © 2011 Apache Software Foundation. All Rights Reserved.