org.objectweb.joram.client.jms.local
Class LocalConnections

java.lang.Object
  extended by org.objectweb.joram.client.jms.local.LocalConnections
All Implemented Interfaces:
LocalConnectionsMBean, ConnectionManagerMBean

public class LocalConnections
extends java.lang.Object
implements LocalConnectionsMBean

Class used to check off local connections.


Field Summary
private  boolean activated
          If true, creation of new connections is available.
private  java.util.List connections
          Lists the opened local connections.
private static LocalConnections currentInstance
          Unique LocalConnections instance.
private  int failedLoginCount
          Number of failed login attempts.
private  int initiatedConnectionCount
          Number of local connections initiated since agent server start.
private static java.lang.String MBEAN_NAME
           
 
Constructor Summary
LocalConnections()
           
 
Method Summary
 void activate()
          Activates the connection manager.
 void addLocalConnection(LocalRequestChannel localRequestChannel)
           
 void closeAllConnections()
          Closes all opened connections.
 void deactivate()
          Deactivates the connection manager.
static LocalConnections getCurrentInstance()
           
 int getFailedLoginCount()
          Gets the number of connections rejected due to a failed authentication.
 int getInitiatedConnectionCount()
          Gets the number of initiated connections since server start.
 java.lang.String getMBeanName()
          Gets the name of the MBean.
 int getRunningConnectionsCount()
          Gets the number of living connections.
 void increaseFailedLoginCount()
           
 void increaseInitiatedConnectionCount()
           
 boolean isActivated()
          Tells if the ConnectionManager is active.
 void removeLocalConnection(LocalRequestChannel localRequestChannel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_NAME

private static final java.lang.String MBEAN_NAME
See Also:
Constant Field Values

currentInstance

private static LocalConnections currentInstance
Unique LocalConnections instance.


connections

private java.util.List connections
Lists the opened local connections.


activated

private boolean activated
If true, creation of new connections is available.


failedLoginCount

private int failedLoginCount
Number of failed login attempts.


initiatedConnectionCount

private int initiatedConnectionCount
Number of local connections initiated since agent server start.

Constructor Detail

LocalConnections

public LocalConnections()
Method Detail

activate

public void activate()
Description copied from interface: ConnectionManagerMBean
Activates the connection manager. Creation of new connections will be allowed.

Specified by:
activate in interface ConnectionManagerMBean

closeAllConnections

public void closeAllConnections()
Description copied from interface: ConnectionManagerMBean
Closes all opened connections.

Specified by:
closeAllConnections in interface ConnectionManagerMBean

deactivate

public void deactivate()
Description copied from interface: ConnectionManagerMBean
Deactivates the connection manager. No new connection will be opened.

Specified by:
deactivate in interface ConnectionManagerMBean

getRunningConnectionsCount

public int getRunningConnectionsCount()
Description copied from interface: ConnectionManagerMBean
Gets the number of living connections.

Specified by:
getRunningConnectionsCount in interface ConnectionManagerMBean
Returns:
the number of living connections.

isActivated

public boolean isActivated()
Description copied from interface: ConnectionManagerMBean
Tells if the ConnectionManager is active.

Specified by:
isActivated in interface ConnectionManagerMBean
Returns:
ConnectionManager's active state.

addLocalConnection

public void addLocalConnection(LocalRequestChannel localRequestChannel)

removeLocalConnection

public void removeLocalConnection(LocalRequestChannel localRequestChannel)

getCurrentInstance

public static LocalConnections getCurrentInstance()

getMBeanName

public java.lang.String getMBeanName()
Description copied from interface: ConnectionManagerMBean
Gets the name of the MBean.

Specified by:
getMBeanName in interface ConnectionManagerMBean

getFailedLoginCount

public int getFailedLoginCount()
Description copied from interface: ConnectionManagerMBean
Gets the number of connections rejected due to a failed authentication.

Specified by:
getFailedLoginCount in interface ConnectionManagerMBean
Returns:
the number of connections rejected due to a failed authentication.

increaseFailedLoginCount

public void increaseFailedLoginCount()

getInitiatedConnectionCount

public int getInitiatedConnectionCount()
Description copied from interface: ConnectionManagerMBean
Gets the number of initiated connections since server start.

Specified by:
getInitiatedConnectionCount in interface ConnectionManagerMBean
Returns:
the number of initiated connection.

increaseInitiatedConnectionCount

public void increaseInitiatedConnectionCount()


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.