org.apache.activemq.broker.jmx
Class ConnectionView

java.lang.Object
  extended by org.apache.activemq.broker.jmx.ConnectionView
All Implemented Interfaces:
ConnectionViewMBean, Service

public class ConnectionView
extends Object
implements ConnectionViewMBean


Constructor Summary
ConnectionView(Connection connection)
           
ConnectionView(Connection connection, ManagementContext managementContext)
           
 
Method Summary
 String getClientId()
          Returns the client identifier for this connection
 String getConnectionId()
           
 ObjectName[] getConsumers()
          Returns the ObjectNames of all the Consumers created by this Connection.
 int getDispatchQueueSize()
          Returns the number of messages to be dispatched to this connection
 ObjectName[] getProducers()
          Returns the ObjectNames of all the Producers created by this Connection.
 String getRemoteAddress()
          Returns the source address for this connection
 String getUserName()
          Returns the User Name used to authorize creation of this Connection.
 boolean isActive()
           
 boolean isBlocked()
           
 boolean isConnected()
           
 boolean isSlow()
           
 void resetStatistics()
          Resets the statistics
 void setUserName(String userName)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionView

public ConnectionView(Connection connection)

ConnectionView

public ConnectionView(Connection connection,
                      ManagementContext managementContext)
Method Detail

start

public void start()
           throws Exception
Specified by:
start in interface Service
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Service
Throws:
Exception

isSlow

public boolean isSlow()
Specified by:
isSlow in interface ConnectionViewMBean
Returns:
true if the Connection is slow

isBlocked

public boolean isBlocked()
Specified by:
isBlocked in interface ConnectionViewMBean
Returns:
if after being marked, the Connection is still writing

isConnected

public boolean isConnected()
Specified by:
isConnected in interface ConnectionViewMBean
Returns:
true if the Connection is connected

isActive

public boolean isActive()
Specified by:
isActive in interface ConnectionViewMBean
Returns:
true if the Connection is active

getDispatchQueueSize

public int getDispatchQueueSize()
Description copied from interface: ConnectionViewMBean
Returns the number of messages to be dispatched to this connection

Specified by:
getDispatchQueueSize in interface ConnectionViewMBean
Returns:
the number of messages pending dispatch

resetStatistics

public void resetStatistics()
Resets the statistics

Specified by:
resetStatistics in interface ConnectionViewMBean

getRemoteAddress

public String getRemoteAddress()
Description copied from interface: ConnectionViewMBean
Returns the source address for this connection

Specified by:
getRemoteAddress in interface ConnectionViewMBean
Returns:
the source address for this connection

getClientId

public String getClientId()
Description copied from interface: ConnectionViewMBean
Returns the client identifier for this connection

Specified by:
getClientId in interface ConnectionViewMBean
Returns:
the the client identifier for this connection

getConnectionId

public String getConnectionId()

getUserName

public String getUserName()
Description copied from interface: ConnectionViewMBean
Returns the User Name used to authorize creation of this Connection. This value can be null if display of user name information is disabled.

Specified by:
getUserName in interface ConnectionViewMBean
Returns:
the name of the user that created this Connection

setUserName

public void setUserName(String userName)

getConsumers

public ObjectName[] getConsumers()
Description copied from interface: ConnectionViewMBean
Returns the ObjectNames of all the Consumers created by this Connection.

Specified by:
getConsumers in interface ConnectionViewMBean
Returns:
the ObjectNames of all Consumers created by this Connection.

getProducers

public ObjectName[] getProducers()
Description copied from interface: ConnectionViewMBean
Returns the ObjectNames of all the Producers created by this Connection.

Specified by:
getProducers in interface ConnectionViewMBean
Returns:
the ObjectNames of all Producers created by this Connection.


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.