org.apache.activemq.transport.vm
Class VMTransport
java.lang.Object
org.apache.activemq.transport.vm.VMTransport
- All Implemented Interfaces:
- Service, Task, Transport
public class VMTransport
- extends Object
- implements Transport, Task
A Transport implementation that uses direct method invocations.
peer
protected VMTransport peer
transportListener
protected TransportListener transportListener
marshal
protected boolean marshal
network
protected boolean network
async
protected boolean async
asyncQueueDepth
protected int asyncQueueDepth
location
protected final URI location
id
protected final long id
started
protected final AtomicBoolean started
disposed
protected final AtomicBoolean disposed
VMTransport
public VMTransport(URI location)
setPeer
public void setPeer(VMTransport peer)
oneway
public void oneway(Object command)
throws IOException
- Specified by:
oneway in interface Transport
- Throws:
IOException
dispatch
public void dispatch(VMTransport transport,
BlockingQueue<Object> pending,
Object command)
doDispatch
public void doDispatch(VMTransport transport,
TransportListener transportListener,
Object command)
start
public void start()
throws Exception
- Specified by:
start in interface Service
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop in interface Service
- Throws:
Exception
wakeup
protected void wakeup()
iterate
public boolean iterate()
- Specified by:
iterate in interface Task
- See Also:
Task.iterate()
setTransportListener
public void setTransportListener(TransportListener commandListener)
- Specified by:
setTransportListener in interface Transport
setMessageQueue
public void setMessageQueue(LinkedBlockingQueue<Object> asyncQueue)
getMessageQueue
public LinkedBlockingQueue<Object> getMessageQueue()
throws TransportDisposedIOException
- Throws:
TransportDisposedIOException
getTaskRunner
protected TaskRunner getTaskRunner()
throws TransportDisposedIOException
- Throws:
TransportDisposedIOException
asyncRequest
public FutureResponse asyncRequest(Object command,
ResponseCallback responseCallback)
throws IOException
- Specified by:
asyncRequest in interface Transport
- Throws:
IOException
request
public Object request(Object command)
throws IOException
- Specified by:
request in interface Transport
- Throws:
IOException
request
public Object request(Object command,
int timeout)
throws IOException
- Specified by:
request in interface Transport
- Throws:
IOException
getTransportListener
public TransportListener getTransportListener()
- Specified by:
getTransportListener in interface Transport
narrow
public <T> T narrow(Class<T> target)
- Specified by:
narrow in interface Transport
isMarshal
public boolean isMarshal()
setMarshal
public void setMarshal(boolean marshal)
isNetwork
public boolean isNetwork()
setNetwork
public void setNetwork(boolean network)
toString
public String toString()
- Overrides:
toString in class Object
getRemoteAddress
public String getRemoteAddress()
- Specified by:
getRemoteAddress in interface Transport
isAsync
public boolean isAsync()
- Returns:
- the async
setAsync
public void setAsync(boolean async)
- Parameters:
async - the async to set
getAsyncQueueDepth
public int getAsyncQueueDepth()
- Returns:
- the asyncQueueDepth
setAsyncQueueDepth
public void setAsyncQueueDepth(int asyncQueueDepth)
- Parameters:
asyncQueueDepth - the asyncQueueDepth to set
isFaultTolerant
public boolean isFaultTolerant()
- Specified by:
isFaultTolerant in interface Transport
isDisposed
public boolean isDisposed()
- Specified by:
isDisposed in interface Transport
isConnected
public boolean isConnected()
- Specified by:
isConnected in interface Transport
reconnect
public void reconnect(URI uri)
throws IOException
- Specified by:
reconnect in interface Transport
- Throws:
IOException
isReconnectSupported
public boolean isReconnectSupported()
- Specified by:
isReconnectSupported in interface Transport
isUpdateURIsSupported
public boolean isUpdateURIsSupported()
- Specified by:
isUpdateURIsSupported in interface Transport
updateURIs
public void updateURIs(boolean reblance,
URI[] uris)
throws IOException
- Specified by:
updateURIs in interface Transport
- Throws:
IOException
getReceiveCounter
public int getReceiveCounter()
- Specified by:
getReceiveCounter in interface Transport
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.