Class OpenWireConnection
- java.lang.Object
-
- org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection
-
- org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection
-
- All Implemented Interfaces:
SecurityAuth,TempQueueObserver,RemotingConnection,BufferHandler
public class OpenWireConnection extends AbstractRemotingConnection implements SecurityAuth, TempQueueObserver
Represents an activemq connection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classOpenWireConnection.CommandProcessor
-
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(Connection connection, ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, Executor executor)OpenWireConnection(Connection connection, ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, 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(SimpleString address)AMQSessionaddSession(org.apache.activemq.command.SessionInfo ss)voidaddSessions(Set<org.apache.activemq.command.SessionId> sessionSet)voidblockConnection()voidbufferReceived(Object connectionID, ActiveMQBuffer buffer)booleancheckDataReceived()booleancontainsKnownDestination(SimpleString address)voiddeliverMessage(org.apache.activemq.command.MessageDispatch dispatch)voiddestroy()voiddisableTtl()voiddisconnect(boolean criticalError)voiddisconnect(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(ActiveMQException me, String message)voidflush()protected voidflushedActor()StringgetClientID()AMQConnectionContextgetContext()CoreMessageObjectPoolsgetCoreMessageObjectPools()OperationContextgetOperationContext()StringgetPassword()StringgetProtocolName()OpenWireConnectiongetRemotingConnection()StringgetSecurityDomain()AMQSessiongetSession(org.apache.activemq.command.SessionId sessionId)org.apache.activemq.state.ConnectionStategetState()List<org.apache.activemq.command.DestinationInfo>getTemporaryDestinations()StringgetUsername()StringgetValidatedUser()AMQConnectionContextinitContext(org.apache.activemq.command.ConnectionInfo info)booleanisNoLocal()booleanisSupportsFlowControl()booleanisSuppportAdvisory()booleanisSuppressInternalManagementObjects()static XAExceptionnewXAException(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(Exception e)voidsendHandshake()voidserviceException(Throwable e)voidsetConnectionEntry(ConnectionEntry connectionEntry)voidsetNoLocal(boolean noLocal)voidsetUpTtl(long inactivityDuration, long inactivityDurationInitialDelay, boolean useKeepAlive)voidsetValidatedUser(String validatedUser)voidtempQueueDeleted(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, getCreationTime, getFailureListeners, getID, getLocalAddress, getRemoteAddress, getSubject, getTransportConnection, getTransportLocalAddress, isClient, isDestroyed, isSupportReconnect, isWritable, killMessage, removeCloseListener, removeCloseListeners, removeFailureListener, removeFailureListeners, scheduledFlush, setClientID, setCloseListeners, setFailureListeners, setSubject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.remoting.BufferHandler
endOfBatch
-
Methods inherited from interface org.apache.activemq.artemis.spi.core.protocol.RemotingConnection
disconnect, isSameTarget
-
-
-
-
Constructor Detail
-
OpenWireConnection
public OpenWireConnection(Connection connection, ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, Executor executor)
-
OpenWireConnection
public OpenWireConnection(Connection connection, ActiveMQServer server, OpenWireProtocolManager openWireProtocolManager, org.apache.activemq.openwire.OpenWireFormat wf, Executor executor, int actorThresholdBytes)
-
-
Method Detail
-
getUsername
public String getUsername()
- Specified by:
getUsernamein interfaceSecurityAuth
-
getOperationContext
public OperationContext getOperationContext()
-
getRemotingConnection
public OpenWireConnection getRemotingConnection()
- Specified by:
getRemotingConnectionin interfaceSecurityAuth
-
getSecurityDomain
public String getSecurityDomain()
- Specified by:
getSecurityDomainin interfaceSecurityAuth
-
getPassword
public String getPassword()
- Specified by:
getPasswordin interfaceSecurityAuth
-
bufferReceived
public void bufferReceived(Object connectionID, ActiveMQBuffer buffer)
- Specified by:
bufferReceivedin interfaceBufferHandler- Overrides:
bufferReceivedin classAbstractRemotingConnection
-
restoreAutoRead
public void restoreAutoRead()
-
blockConnection
public void blockConnection()
-
flushedActor
protected void flushedActor()
-
sendException
public void sendException(Exception e)
-
destroy
public void destroy()
- Specified by:
destroyin interfaceRemotingConnection
-
disconnect
public void disconnect(boolean criticalError)
- Specified by:
disconnectin interfaceRemotingConnection
-
flush
public void flush()
- Specified by:
flushin interfaceRemotingConnection- Overrides:
flushin classAbstractRemotingConnection
-
sendHandshake
public void sendHandshake()
-
getState
public org.apache.activemq.state.ConnectionState getState()
-
physicalSend
public void physicalSend(org.apache.activemq.command.Command command) throws IOException- Throws:
IOException
-
dispatchAsync
public void dispatchAsync(org.apache.activemq.command.Command message) throws Exception- Throws:
Exception
-
dispatchSync
public void dispatchSync(org.apache.activemq.command.Command message) throws Exception- Throws:
Exception
-
dispatch
public void dispatch(org.apache.activemq.command.Command command) throws IOException- Throws:
IOException
-
processDispatch
protected void processDispatch(org.apache.activemq.command.Command command) throws IOException- Throws:
IOException
-
deliverMessage
public void deliverMessage(org.apache.activemq.command.MessageDispatch dispatch)
-
wireFormat
public org.apache.activemq.openwire.OpenWireFormat wireFormat()
-
disconnect
public void disconnect(String reason, boolean fail)
- Specified by:
disconnectin interfaceRemotingConnection
-
fail
public void fail(ActiveMQException me, String message)
- Specified by:
failin interfaceRemotingConnection
-
getContext
public AMQConnectionContext getContext()
-
updateClient
public void updateClient(org.apache.activemq.command.ConnectionControl control) throws Exception- Throws:
Exception
-
initContext
public AMQConnectionContext initContext(org.apache.activemq.command.ConnectionInfo info) throws Exception
- Throws:
Exception
-
reconnect
public void reconnect(AMQConnectionContext existingContext, org.apache.activemq.command.ConnectionInfo info) throws Exception
- Throws:
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 Exception- Throws:
Exception
-
updateConsumer
public void updateConsumer(org.apache.activemq.command.ConsumerControl consumerControl)
-
addConsumer
public void addConsumer(org.apache.activemq.command.ConsumerInfo info) throws Exception- Throws:
Exception
-
setConnectionEntry
public void setConnectionEntry(ConnectionEntry connectionEntry)
-
checkDataReceived
public boolean checkDataReceived()
- Specified by:
checkDataReceivedin interfaceRemotingConnection- Overrides:
checkDataReceivedin classAbstractRemotingConnection
-
setUpTtl
public void setUpTtl(long inactivityDuration, long inactivityDurationInitialDelay, boolean useKeepAlive)
-
addKnownDestination
public void addKnownDestination(SimpleString address)
-
containsKnownDestination
public boolean containsKnownDestination(SimpleString address)
-
tempQueueDeleted
public void tempQueueDeleted(SimpleString bindingName)
- Specified by:
tempQueueDeletedin interfaceTempQueueObserver
-
disableTtl
public void disableTtl()
-
enableTtl
public void enableTtl()
-
isNoLocal
public boolean isNoLocal()
-
setNoLocal
public void setNoLocal(boolean noLocal)
-
getTemporaryDestinations
public List<org.apache.activemq.command.DestinationInfo> getTemporaryDestinations()
-
isSuppressInternalManagementObjects
public boolean isSuppressInternalManagementObjects()
-
isSuppportAdvisory
public boolean isSuppportAdvisory()
-
getValidatedUser
public String getValidatedUser()
-
setValidatedUser
public void setValidatedUser(String validatedUser)
-
addSessions
public void addSessions(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 Exception
- Throws:
Exception
-
getSession
public AMQSession getSession(org.apache.activemq.command.SessionId sessionId)
-
removeDestination
public void removeDestination(org.apache.activemq.command.ActiveMQDestination dest) throws Exception- Throws:
Exception
-
newXAException
public static XAException newXAException(String s, int errorCode)
-
isSupportsFlowControl
public boolean isSupportsFlowControl()
- Specified by:
isSupportsFlowControlin interfaceRemotingConnection- Overrides:
isSupportsFlowControlin classAbstractRemotingConnection
-
getProtocolName
public String getProtocolName()
- Specified by:
getProtocolNamein interfaceRemotingConnection
-
getClientID
public String getClientID()
- Specified by:
getClientIDin interfaceRemotingConnection- Overrides:
getClientIDin classAbstractRemotingConnection
-
getCoreMessageObjectPools
public CoreMessageObjectPools getCoreMessageObjectPools()
-
-