org.apache.activemq.transport
Class MutexTransport

java.lang.Object
  extended by org.apache.activemq.transport.TransportFilter
      extended by org.apache.activemq.transport.MutexTransport
All Implemented Interfaces:
Service, Transport, TransportListener

public class MutexTransport
extends TransportFilter

Thread safe Transport Filter that serializes calls to and from the Transport Stack.


Field Summary
 
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener
 
Constructor Summary
MutexTransport(Transport next)
           
MutexTransport(Transport next, boolean syncOnCommand)
           
 
Method Summary
 FutureResponse asyncRequest(Object command, ResponseCallback responseCallback)
          An asynchronous request response where the Receipt will be returned in the future.
 boolean isSyncOnCommand()
           
 void onCommand(Object command)
          called to process a command
 void oneway(Object command)
          A one way asynchronous send
 Object request(Object command)
          A synchronous request response
 Object request(Object command, int timeout)
          A synchronous request response
 void setSyncOnCommand(boolean syncOnCommand)
           
 String toString()
           
 
Methods inherited from class org.apache.activemq.transport.TransportFilter
getNext, getReceiveCounter, getRemoteAddress, getTransportListener, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, setTransportListener, start, stop, transportInterupted, transportResumed, updateURIs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MutexTransport

public MutexTransport(Transport next)

MutexTransport

public MutexTransport(Transport next,
                      boolean syncOnCommand)
Method Detail

onCommand

public void onCommand(Object command)
Description copied from interface: TransportListener
called to process a command

Specified by:
onCommand in interface TransportListener
Overrides:
onCommand in class TransportFilter

asyncRequest

public FutureResponse asyncRequest(Object command,
                                   ResponseCallback responseCallback)
                            throws IOException
Description copied from interface: Transport
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.

Specified by:
asyncRequest in interface Transport
Overrides:
asyncRequest in class TransportFilter
responseCallback - TODO
Returns:
the FutureResponse
Throws:
IOException

oneway

public void oneway(Object command)
            throws IOException
Description copied from interface: Transport
A one way asynchronous send

Specified by:
oneway in interface Transport
Overrides:
oneway in class TransportFilter
Throws:
IOException

request

public Object request(Object command)
               throws IOException
Description copied from interface: Transport
A synchronous request response

Specified by:
request in interface Transport
Overrides:
request in class TransportFilter
Returns:
the response
Throws:
IOException

request

public Object request(Object command,
                      int timeout)
               throws IOException
Description copied from interface: Transport
A synchronous request response

Specified by:
request in interface Transport
Overrides:
request in class TransportFilter
Returns:
the repsonse or null if timeout
Throws:
IOException

toString

public String toString()
Overrides:
toString in class TransportFilter

isSyncOnCommand

public boolean isSyncOnCommand()

setSyncOnCommand

public void setSyncOnCommand(boolean syncOnCommand)


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.