Class OpenWireConnection
- java.lang.Object
-
- org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
-
- org.apache.activemq.artemis.core.protocol.openwire.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.TempQueueObserverRepresents an activemq connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOpenWireConnection.CommandProcessor
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddConsumer(org.apache.activemq.command.ConsumerInfo info)voidaddDestination(org.apache.activemq.command.DestinationInfo info)voidaddKnownDestination(org.apache.activemq.artemis.api.core.SimpleString address)AMQSessionaddSession(org.apache.activemq.command.SessionInfo ss)voidaddSessions(java.util.Set<org.apache.activemq.command.SessionId> sessionSet)voidblockConnection()voidbufferReceived(java.lang.Object connectionID, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)booleancheckDataReceived()booleancontainsKnownDestination(org.apache.activemq.artemis.api.core.SimpleString address)voiddeliverMessage(org.apache.activemq.command.MessageDispatch dispatch)voiddestroy()voiddisableTtl()voiddisconnect(boolean criticalError)voiddisconnect(java.lang.String reason, boolean fail)voiddispatch(org.apache.activemq.command.Command command)voiddispatchAsync(org.apache.activemq.command.Command message)voiddispatchSync(org.apache.activemq.command.Command message)voidenableTtl()voidfail(org.apache.activemq.artemis.api.core.ActiveMQException me, java.lang.String message)voidflush()protected voidflushedActor()java.lang.StringgetClientID()AMQConnectionContextgetContext()org.apache.activemq.artemis.core.persistence.CoreMessageObjectPoolsgetCoreMessageObjectPools()org.apache.activemq.artemis.core.persistence.OperationContextgetOperationContext()java.lang.StringgetPassword()java.lang.StringgetProtocolName()OpenWireConnectiongetRemotingConnection()java.lang.StringgetSecurityDomain()AMQSessiongetSession(org.apache.activemq.command.SessionId sessionId)org.apache.activemq.state.ConnectionStategetState()java.util.List<org.apache.activemq.command.DestinationInfo>getTemporaryDestinations()java.lang.StringgetTransportLocalAddress()java.lang.StringgetUsername()java.lang.StringgetValidatedUser()AMQConnectionContextinitContext(org.apache.activemq.command.ConnectionInfo info)booleanisClient()booleanisDestroyed()booleanisNoLocal()booleanisSuppportAdvisory()booleanisSuppressInternalManagementObjects()voidkillMessage(org.apache.activemq.artemis.api.core.SimpleString nodeID)static javax.transaction.xa.XAExceptionnewXAException(java.lang.String s, int errorCode)voidphysicalSend(org.apache.activemq.command.Command command)protected voidprocessDispatch(org.apache.activemq.command.Command command)voidreconnect(AMQConnectionContext existingContext, org.apache.activemq.command.ConnectionInfo info)voidremoveDestination(org.apache.activemq.command.ActiveMQDestination dest)voidremoveSession(AMQConnectionContext context, org.apache.activemq.command.SessionInfo info)voidrestoreAutoRead()booleansendCommand(org.apache.activemq.command.Command command)This will answer with commands to the clientvoidsendException(java.lang.Exception e)voidsendHandshake()voidserviceException(java.lang.Throwable e)voidsetConnectionEntry(org.apache.activemq.artemis.spi.core.protocol.ConnectionEntry connectionEntry)voidsetNoLocal(boolean noLocal)voidsetUpTtl(long inactivityDuration, long inactivityDurationInitialDelay, boolean useKeepAlive)voidsetValidatedUser(java.lang.String validatedUser)voidtempQueueDeleted(org.apache.activemq.artemis.api.core.SimpleString bindingName)voidupdateClient(org.apache.activemq.command.ConnectionControl control)voidupdateConsumer(org.apache.activemq.command.ConsumerControl consumerControl)org.apache.activemq.openwire.OpenWireFormatwireFormat()-
Methods inherited from class org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
addCloseListener, addFailureListener, asyncFail, callClosingListeners, callFailureListeners, createTransportBuffer, fail, getAuditSubject, getCreationTime, getFailureListeners, getID, getLocalAddress, getRemoteAddress, getSubject, getTransportConnection, isSupportReconnect, isSupportsFlowControl, isWritable, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, scheduledFlush, setAuditSubject, setClientID, setCloseListeners, setFailureListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
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:
getUsernamein interfaceorg.apache.activemq.artemis.core.security.SecurityAuth
-
getOperationContext
public org.apache.activemq.artemis.core.persistence.OperationContext getOperationContext()
-
getRemotingConnection
public OpenWireConnection getRemotingConnection()
- Specified by:
getRemotingConnectionin interfaceorg.apache.activemq.artemis.core.security.SecurityAuth
-
getSecurityDomain
public java.lang.String getSecurityDomain()
- Specified by:
getSecurityDomainin interfaceorg.apache.activemq.artemis.core.security.SecurityAuth
-
getPassword
public java.lang.String getPassword()
- Specified by:
getPasswordin interfaceorg.apache.activemq.artemis.core.security.SecurityAuth
-
bufferReceived
public void bufferReceived(java.lang.Object connectionID, org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)- Specified by:
bufferReceivedin interfaceorg.apache.activemq.artemis.spi.core.remoting.BufferHandler- Overrides:
bufferReceivedin classorg.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:
destroyin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isClient
public boolean isClient()
- Specified by:
isClientin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
disconnect
public void disconnect(boolean criticalError)
- Specified by:
disconnectin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
flush
public void flush()
- Specified by:
flushin interfaceorg.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:
disconnectin interfaceorg.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:
failin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getContext
public AMQConnectionContext getContext()
-
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:
checkDataReceivedin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection- Overrides:
checkDataReceivedin classorg.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:
tempQueueDeletedin interfaceorg.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:
killMessagein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getProtocolName
public java.lang.String getProtocolName()
- Specified by:
getProtocolNamein interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getClientID
public java.lang.String getClientID()
- Specified by:
getClientIDin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection- Overrides:
getClientIDin classorg.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
-
getTransportLocalAddress
public java.lang.String getTransportLocalAddress()
- Specified by:
getTransportLocalAddressin interfaceorg.apache.activemq.artemis.spi.core.protocol.RemotingConnection
-
getCoreMessageObjectPools
public org.apache.activemq.artemis.core.persistence.CoreMessageObjectPools getCoreMessageObjectPools()
-
-