Class OpenWireConnection

  • All Implemented Interfaces:
    org.apache.activemq.artemis.core.security.SecurityAuth, org.apache.activemq.artemis.core.server.TempQueueObserver, org.apache.activemq.artemis.spi.core.protocol.RemotingConnection, org.apache.activemq.artemis.spi.core.remoting.BufferHandler

    public class OpenWireConnection
    extends org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
    implements org.apache.activemq.artemis.core.security.SecurityAuth, org.apache.activemq.artemis.core.server.TempQueueObserver
    Represents an activemq connection.
    • Field Summary

      • Fields inherited from class org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection

        closeListeners, creationTime, dataReceived, executor, failureListeners, transportConnection
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenWireConnection​(org.apache.activemq.artemis.spi.core.remoting.Connection connection, org.apache.activemq.artemis.core.server.ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, java.util.concurrent.Executor executor)  
      OpenWireConnection​(org.apache.activemq.artemis.spi.core.remoting.Connection connection, org.apache.activemq.artemis.core.server.ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, java.util.concurrent.Executor executor, int actorThresholdBytes)  
    • Constructor Detail

      • OpenWireConnection

        public OpenWireConnection​(org.apache.activemq.artemis.spi.core.remoting.Connection connection,
                                  org.apache.activemq.artemis.core.server.ActiveMQServer server,
                                  OpenWireProtocolManager openWireProtocolManager,
                                  org.apache.activemq.openwire.OpenWireFormat wf,
                                  java.util.concurrent.Executor executor)
      • OpenWireConnection

        public OpenWireConnection​(org.apache.activemq.artemis.spi.core.remoting.Connection connection,
                                  org.apache.activemq.artemis.core.server.ActiveMQServer server,
                                  OpenWireProtocolManager openWireProtocolManager,
                                  org.apache.activemq.openwire.OpenWireFormat wf,
                                  java.util.concurrent.Executor executor,
                                  int actorThresholdBytes)
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
        Specified by:
        getUsername in interface org.apache.activemq.artemis.core.security.SecurityAuth
      • getOperationContext

        public org.apache.activemq.artemis.core.persistence.OperationContext getOperationContext()
      • getRemotingConnection

        public OpenWireConnection getRemotingConnection()
        Specified by:
        getRemotingConnection in interface org.apache.activemq.artemis.core.security.SecurityAuth
      • getSecurityDomain

        public java.lang.String getSecurityDomain()
        Specified by:
        getSecurityDomain in interface org.apache.activemq.artemis.core.security.SecurityAuth
      • getPassword

        public java.lang.String getPassword()
        Specified by:
        getPassword in interface org.apache.activemq.artemis.core.security.SecurityAuth
      • bufferReceived

        public void bufferReceived​(java.lang.Object connectionID,
                                   org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)
        Specified by:
        bufferReceived in interface org.apache.activemq.artemis.spi.core.remoting.BufferHandler
        Overrides:
        bufferReceived in class org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
      • restoreAutoRead

        public void restoreAutoRead()
      • blockConnection

        public void blockConnection()
      • flushedActor

        protected void flushedActor()
      • sendException

        public void sendException​(java.lang.Exception e)
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • isClient

        public boolean isClient()
        Specified by:
        isClient in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • isDestroyed

        public boolean isDestroyed()
        Specified by:
        isDestroyed in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • disconnect

        public void disconnect​(boolean criticalError)
        Specified by:
        disconnect in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • flush

        public void flush()
        Specified by:
        flush in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • sendHandshake

        public void sendHandshake()
      • getState

        public org.apache.activemq.state.ConnectionState getState()
      • physicalSend

        public void physicalSend​(org.apache.activemq.command.Command command)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • dispatchAsync

        public void dispatchAsync​(org.apache.activemq.command.Command message)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • dispatchSync

        public void dispatchSync​(org.apache.activemq.command.Command message)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • serviceException

        public void serviceException​(java.lang.Throwable e)
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • dispatch

        public void dispatch​(org.apache.activemq.command.Command command)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • processDispatch

        protected void processDispatch​(org.apache.activemq.command.Command command)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • deliverMessage

        public void deliverMessage​(org.apache.activemq.command.MessageDispatch dispatch)
      • wireFormat

        public org.apache.activemq.openwire.OpenWireFormat wireFormat()
      • disconnect

        public void disconnect​(java.lang.String reason,
                               boolean fail)
        Specified by:
        disconnect in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • fail

        public void fail​(org.apache.activemq.artemis.api.core.ActiveMQException me,
                         java.lang.String message)
        Specified by:
        fail in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • updateClient

        public void updateClient​(org.apache.activemq.command.ConnectionControl control)
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • initContext

        public AMQConnectionContext initContext​(org.apache.activemq.command.ConnectionInfo info)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • reconnect

        public void reconnect​(AMQConnectionContext existingContext,
                              org.apache.activemq.command.ConnectionInfo info)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • sendCommand

        public boolean sendCommand​(org.apache.activemq.command.Command command)
        This will answer with commands to the client
      • addDestination

        public void addDestination​(org.apache.activemq.command.DestinationInfo info)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateConsumer

        public void updateConsumer​(org.apache.activemq.command.ConsumerControl consumerControl)
      • addConsumer

        public void addConsumer​(org.apache.activemq.command.ConsumerInfo info)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setConnectionEntry

        public void setConnectionEntry​(org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry connectionEntry)
      • checkDataReceived

        public boolean checkDataReceived()
        Specified by:
        checkDataReceived in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
        Overrides:
        checkDataReceived in class org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
      • setUpTtl

        public void setUpTtl​(long inactivityDuration,
                             long inactivityDurationInitialDelay,
                             boolean useKeepAlive)
      • addKnownDestination

        public void addKnownDestination​(org.apache.activemq.artemis.api.core.SimpleString address)
      • containsKnownDestination

        public boolean containsKnownDestination​(org.apache.activemq.artemis.api.core.SimpleString address)
      • tempQueueDeleted

        public void tempQueueDeleted​(org.apache.activemq.artemis.api.core.SimpleString bindingName)
        Specified by:
        tempQueueDeleted in interface org.apache.activemq.artemis.core.server.TempQueueObserver
      • disableTtl

        public void disableTtl()
      • enableTtl

        public void enableTtl()
      • isNoLocal

        public boolean isNoLocal()
      • setNoLocal

        public void setNoLocal​(boolean noLocal)
      • getTemporaryDestinations

        public java.util.List<org.apache.activemq.command.DestinationInfo> getTemporaryDestinations()
      • isSuppressInternalManagementObjects

        public boolean isSuppressInternalManagementObjects()
      • isSuppportAdvisory

        public boolean isSuppportAdvisory()
      • getValidatedUser

        public java.lang.String getValidatedUser()
      • setValidatedUser

        public void setValidatedUser​(java.lang.String validatedUser)
      • addSessions

        public void addSessions​(java.util.Set<org.apache.activemq.command.SessionId> sessionSet)
      • addSession

        public AMQSession addSession​(org.apache.activemq.command.SessionInfo ss)
      • removeSession

        public void removeSession​(AMQConnectionContext context,
                                  org.apache.activemq.command.SessionInfo info)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getSession

        public AMQSession getSession​(org.apache.activemq.command.SessionId sessionId)
      • removeDestination

        public void removeDestination​(org.apache.activemq.command.ActiveMQDestination dest)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • newXAException

        public static javax.transaction.xa.XAException newXAException​(java.lang.String s,
                                                                      int errorCode)
      • killMessage

        public void killMessage​(org.apache.activemq.artemis.api.core.SimpleString nodeID)
        Specified by:
        killMessage in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • getProtocolName

        public java.lang.String getProtocolName()
        Specified by:
        getProtocolName in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • getClientID

        public java.lang.String getClientID()
        Specified by:
        getClientID in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
        Overrides:
        getClientID in class org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
      • getTransportLocalAddress

        public java.lang.String getTransportLocalAddress()
        Specified by:
        getTransportLocalAddress in interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
      • getCoreMessageObjectPools

        public org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools getCoreMessageObjectPools()