Package org.apache.activemq.transport.vm
Class VMTransport
java.lang.Object
org.apache.activemq.transport.vm.VMTransport
- All Implemented Interfaces:
org.apache.activemq.Service,org.apache.activemq.thread.Task,org.apache.activemq.transport.Transport
public class VMTransport
extends Object
implements org.apache.activemq.transport.Transport, org.apache.activemq.thread.Task
A Transport implementation that uses direct method invocations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected final AtomicBooleanprotected final longprotected final URIprotected static final org.slf4j.Loggerprotected booleanprotected VMTransportprotected final AtomicBooleanprotected org.apache.activemq.transport.TransportListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.activemq.transport.FutureResponseasyncRequest(Object command, org.apache.activemq.transport.ResponseCallback responseCallback) voiddispatch(VMTransport transport, BlockingQueue<Object> pending, Object command) voiddoDispatch(VMTransport transport, org.apache.activemq.transport.TransportListener transportListener, Object command) intintprotected org.apache.activemq.thread.TaskRunnerorg.apache.activemq.transport.TransportListenerorg.apache.activemq.wireformat.WireFormatbooleanisAsync()booleanbooleanbooleanbooleanbooleanbooleanbooleaniterate()<T> TvoidvoidvoidsetAsync(boolean async) voidsetAsyncQueueDepth(int asyncQueueDepth) voidsetMarshal(boolean marshal) voidsetPeer(VMTransport peer) voidsetPeerCertificates(X509Certificate[] certificates) voidsetTransportListener(org.apache.activemq.transport.TransportListener commandListener) voidstart()voidstop()toString()voidupdateURIs(boolean reblance, URI[] uris) protected voidwakeup()
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG -
peer
-
transportListener
protected org.apache.activemq.transport.TransportListener transportListener -
marshal
protected boolean marshal -
async
protected boolean async -
asyncQueueDepth
protected int asyncQueueDepth -
location
-
id
protected final long id -
started
-
disposed
-
-
Constructor Details
-
VMTransport
-
-
Method Details
-
setPeer
-
oneway
- Specified by:
onewayin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
dispatch
-
doDispatch
public void doDispatch(VMTransport transport, org.apache.activemq.transport.TransportListener transportListener, Object command) -
start
- Specified by:
startin interfaceorg.apache.activemq.Service- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.apache.activemq.Service- Throws:
Exception
-
wakeup
protected void wakeup() -
iterate
public boolean iterate()- Specified by:
iteratein interfaceorg.apache.activemq.thread.Task- See Also:
-
Task.iterate()
-
setTransportListener
public void setTransportListener(org.apache.activemq.transport.TransportListener commandListener) - Specified by:
setTransportListenerin interfaceorg.apache.activemq.transport.Transport
-
getMessageQueue
public LinkedBlockingQueue<Object> getMessageQueue() throws org.apache.activemq.transport.TransportDisposedIOException- Throws:
org.apache.activemq.transport.TransportDisposedIOException
-
getTaskRunner
protected org.apache.activemq.thread.TaskRunner getTaskRunner() throws org.apache.activemq.transport.TransportDisposedIOException- Throws:
org.apache.activemq.transport.TransportDisposedIOException
-
asyncRequest
public org.apache.activemq.transport.FutureResponse asyncRequest(Object command, org.apache.activemq.transport.ResponseCallback responseCallback) throws IOException - Specified by:
asyncRequestin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
request
- Specified by:
requestin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
request
- Specified by:
requestin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
getTransportListener
public org.apache.activemq.transport.TransportListener getTransportListener()- Specified by:
getTransportListenerin interfaceorg.apache.activemq.transport.Transport
-
narrow
- Specified by:
narrowin interfaceorg.apache.activemq.transport.Transport
-
isMarshal
public boolean isMarshal() -
setMarshal
public void setMarshal(boolean marshal) -
toString
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceorg.apache.activemq.transport.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:
isFaultTolerantin interfaceorg.apache.activemq.transport.Transport
-
isDisposed
public boolean isDisposed()- Specified by:
isDisposedin interfaceorg.apache.activemq.transport.Transport
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceorg.apache.activemq.transport.Transport
-
reconnect
- Specified by:
reconnectin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
isReconnectSupported
public boolean isReconnectSupported()- Specified by:
isReconnectSupportedin interfaceorg.apache.activemq.transport.Transport
-
isUpdateURIsSupported
public boolean isUpdateURIsSupported()- Specified by:
isUpdateURIsSupportedin interfaceorg.apache.activemq.transport.Transport
-
updateURIs
- Specified by:
updateURIsin interfaceorg.apache.activemq.transport.Transport- Throws:
IOException
-
getReceiveCounter
public int getReceiveCounter()- Specified by:
getReceiveCounterin interfaceorg.apache.activemq.transport.Transport
-
getPeerCertificates
- Specified by:
getPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-
setPeerCertificates
- Specified by:
setPeerCertificatesin interfaceorg.apache.activemq.transport.Transport
-
getWireFormat
public org.apache.activemq.wireformat.WireFormat getWireFormat()- Specified by:
getWireFormatin interfaceorg.apache.activemq.transport.Transport
-