Class 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 Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • transportListener

        protected org.apache.activemq.transport.TransportListener transportListener
      • marshal

        protected boolean marshal
      • async

        protected boolean async
      • asyncQueueDepth

        protected int asyncQueueDepth
      • location

        protected final URI location
      • id

        protected final long id
    • Constructor Detail

      • VMTransport

        public VMTransport​(URI location)
    • Method Detail

      • oneway

        public void oneway​(Object command)
                    throws IOException
        Specified by:
        oneway in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • doDispatch

        public void doDispatch​(VMTransport transport,
                               org.apache.activemq.transport.TransportListener transportListener,
                               Object command)
      • start

        public void start()
                   throws Exception
        Specified by:
        start in interface org.apache.activemq.Service
        Throws:
        Exception
      • stop

        public void stop()
                  throws Exception
        Specified by:
        stop in interface org.apache.activemq.Service
        Throws:
        Exception
      • wakeup

        protected void wakeup()
      • iterate

        public boolean iterate()
        Specified by:
        iterate in interface org.apache.activemq.thread.Task
        See Also:
        Task.iterate()
      • setTransportListener

        public void setTransportListener​(org.apache.activemq.transport.TransportListener commandListener)
        Specified by:
        setTransportListener in interface org.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:
        asyncRequest in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • request

        public Object request​(Object command,
                              int timeout)
                       throws IOException
        Specified by:
        request in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • getTransportListener

        public org.apache.activemq.transport.TransportListener getTransportListener()
        Specified by:
        getTransportListener in interface org.apache.activemq.transport.Transport
      • narrow

        public <T> T narrow​(Class<T> target)
        Specified by:
        narrow in interface org.apache.activemq.transport.Transport
      • isMarshal

        public boolean isMarshal()
      • setMarshal

        public void setMarshal​(boolean marshal)
      • getRemoteAddress

        public String getRemoteAddress()
        Specified by:
        getRemoteAddress in interface org.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:
        isFaultTolerant in interface org.apache.activemq.transport.Transport
      • isDisposed

        public boolean isDisposed()
        Specified by:
        isDisposed in interface org.apache.activemq.transport.Transport
      • isConnected

        public boolean isConnected()
        Specified by:
        isConnected in interface org.apache.activemq.transport.Transport
      • reconnect

        public void reconnect​(URI uri)
                       throws IOException
        Specified by:
        reconnect in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • isReconnectSupported

        public boolean isReconnectSupported()
        Specified by:
        isReconnectSupported in interface org.apache.activemq.transport.Transport
      • isUpdateURIsSupported

        public boolean isUpdateURIsSupported()
        Specified by:
        isUpdateURIsSupported in interface org.apache.activemq.transport.Transport
      • updateURIs

        public void updateURIs​(boolean reblance,
                               URI[] uris)
                        throws IOException
        Specified by:
        updateURIs in interface org.apache.activemq.transport.Transport
        Throws:
        IOException
      • getReceiveCounter

        public int getReceiveCounter()
        Specified by:
        getReceiveCounter in interface org.apache.activemq.transport.Transport
      • getPeerCertificates

        public X509Certificate[] getPeerCertificates()
        Specified by:
        getPeerCertificates in interface org.apache.activemq.transport.Transport
      • setPeerCertificates

        public void setPeerCertificates​(X509Certificate[] certificates)
        Specified by:
        setPeerCertificates in interface org.apache.activemq.transport.Transport
      • getWireFormat

        public org.apache.activemq.wireformat.WireFormat getWireFormat()
        Specified by:
        getWireFormat in interface org.apache.activemq.transport.Transport