|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logicalcobwebs.proxool.admin.jmx.ConnectionPoolMBean
JMX DynamicMBean adapter for a Proxool connection pool.
See the configuration documentation to learn
how to activate a pool for JMX. No programming is necessary to do this.
Attributes
Operations
Notifications
Field Summary | |
private boolean |
active
|
private static java.util.ResourceBundle |
ATTRIBUTE_DESCRIPTIONS_RESOURCE
|
private static java.lang.String |
CLASS_NAME
|
private long |
definitionUpdatedSequence
|
private static java.util.ResourceBundle |
JMX_RESOURCE
|
private static Log |
LOG
|
private MBeanInfo |
mBeanInfo
|
private static MBeanNotificationInfo[] |
NOTIFICATION_INFOS
|
static java.lang.String |
NOTIFICATION_TYPE_DEFINITION_UPDATED
Notification type emitted when the pool definition is updated. |
private NotificationBroadcasterSupport |
notificationHelper
|
private static java.lang.String |
OPERATION_NAME_SHUTDOWN
|
private ConnectionPoolDefinitionIF |
poolDefinition
|
private java.util.Properties |
poolProperties
|
private static java.lang.String |
RECOURCE_NAME_MBEAN_NOTIFICATION_DEF_UPDATED
|
private static java.lang.String |
RECOURCE_NAME_MBEAN_NOTIFICATION_DESCRIPTION
|
private static java.lang.String |
RECOURCE_NAME_MBEAN_POOL_DESCRIPTION
|
Constructor Summary | |
ConnectionPoolMBean(java.lang.String alias,
java.util.Properties poolProperties)
|
Method Summary | |
void |
addNotificationListener(NotificationListener notificationListener,
NotificationFilter notificationFilter,
java.lang.Object handBack)
|
private void |
checkAssignable(java.lang.String name,
java.lang.Class clazz,
java.lang.Object value)
|
private static java.util.ResourceBundle |
createAttributeDescriptionsResource()
|
private static java.util.ResourceBundle |
createJMXResource()
|
private static MBeanAttributeInfo |
createProxoolAttribute(java.lang.String attributeName,
java.lang.Class type)
|
private static MBeanAttributeInfo |
createProxoolAttribute(java.lang.String attributeName,
java.lang.Class type,
boolean writable)
|
void |
definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition,
java.util.Properties completeInfo,
java.util.Properties changedInfo)
Update the attributes of this MBean and emit a NOTIFICATION_TYPE_DEFINITION_UPDATED event. |
private boolean |
equalsProperty(java.lang.String beanAttribute,
java.lang.String proxoolProperty)
|
java.lang.Object |
getAttribute(java.lang.String attributeName)
|
private static java.lang.String |
getAttributeDescription(java.lang.String attributeName)
|
AttributeList |
getAttributes(java.lang.String[] attributeNames)
|
private java.lang.String |
getDelegatePropertiesAsString(java.util.Properties properties)
|
private MBeanInfo |
getDynamicMBeanInfo(java.lang.String alias)
|
private static java.lang.String |
getJMXText(java.lang.String key)
|
MBeanInfo |
getMBeanInfo()
|
MBeanNotificationInfo[] |
getNotificationInfo()
|
private static MBeanNotificationInfo[] |
getNotificationInfos()
|
private java.lang.String |
getValueOrEmpty(java.lang.String property)
|
java.lang.Object |
invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
|
private boolean |
isEqualProperties(java.lang.String property1,
java.lang.String property2)
|
private boolean |
notEmpty(java.lang.Object object)
|
private boolean |
notEmptyOrZero(java.lang.Integer integer)
|
void |
onRegistration(ConnectionPoolDefinitionIF connectionPoolDefinition,
java.util.Properties completeInfo)
Not used. |
void |
onShutdown(java.lang.String alias)
If the given alias equals this pools alias: Unregister this JMX bean. |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean success)
|
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer mBeanServer,
ObjectName objectName)
|
void |
removeNotificationListener(NotificationListener notificationListener)
|
void |
setAttribute(Attribute attribute)
|
AttributeList |
setAttributes(AttributeList attributes)
|
private void |
setDelegateProperties(java.util.Properties properties,
java.lang.String propertyString)
|
private void |
setIntegerAttribute(java.lang.String attributeName,
java.lang.String propertyName,
java.lang.Object value,
int defaultValue,
java.util.Properties properties,
AttributeList resultList)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NOTIFICATION_TYPE_DEFINITION_UPDATED
private static final Log LOG
private static final java.lang.String CLASS_NAME
private static final java.lang.String RECOURCE_NAME_MBEAN_POOL_DESCRIPTION
private static final java.lang.String RECOURCE_NAME_MBEAN_NOTIFICATION_DESCRIPTION
private static final java.lang.String RECOURCE_NAME_MBEAN_NOTIFICATION_DEF_UPDATED
private static final java.lang.String OPERATION_NAME_SHUTDOWN
private static final java.util.ResourceBundle ATTRIBUTE_DESCRIPTIONS_RESOURCE
private static final java.util.ResourceBundle JMX_RESOURCE
private static final MBeanNotificationInfo[] NOTIFICATION_INFOS
private MBeanInfo mBeanInfo
private ConnectionPoolDefinitionIF poolDefinition
private java.util.Properties poolProperties
private long definitionUpdatedSequence
private NotificationBroadcasterSupport notificationHelper
private boolean active
Constructor Detail |
public ConnectionPoolMBean(java.lang.String alias, java.util.Properties poolProperties) throws ProxoolException
Method Detail |
public java.lang.Object getAttribute(java.lang.String attributeName) throws AttributeNotFoundException, MBeanException, ReflectionException
AttributeNotFoundException
MBeanException
ReflectionException
javax.management.DynamicMBean#getAttribute(java.lang.String)
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
javax.management.DynamicMBean#setAttribute(javax.management.Attribute)
public AttributeList getAttributes(java.lang.String[] attributeNames)
javax.management.DynamicMBean#getAttributes(java.lang.String[])
public AttributeList setAttributes(AttributeList attributes)
javax.management.DynamicMBean#setAttributes(javax.management.AttributeList)
public java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature) throws MBeanException, ReflectionException
MBeanException
ReflectionException
javax.management.DynamicMBean#invoke(java.lang.String, java.lang.Object[], java.lang.String[])
public MBeanInfo getMBeanInfo()
javax.management.DynamicMBean#getMBeanInfo()
private MBeanInfo getDynamicMBeanInfo(java.lang.String alias)
private static java.lang.String getAttributeDescription(java.lang.String attributeName)
private static java.lang.String getJMXText(java.lang.String key)
private static java.util.ResourceBundle createAttributeDescriptionsResource()
private static java.util.ResourceBundle createJMXResource()
private static MBeanAttributeInfo createProxoolAttribute(java.lang.String attributeName, java.lang.Class type)
private static MBeanAttributeInfo createProxoolAttribute(java.lang.String attributeName, java.lang.Class type, boolean writable)
private void checkAssignable(java.lang.String name, java.lang.Class clazz, java.lang.Object value) throws InvalidAttributeValueException
InvalidAttributeValueException
private boolean equalsProperty(java.lang.String beanAttribute, java.lang.String proxoolProperty)
private void setDelegateProperties(java.util.Properties properties, java.lang.String propertyString) throws InvalidAttributeValueException
InvalidAttributeValueException
private java.lang.String getDelegatePropertiesAsString(java.util.Properties properties)
private boolean notEmpty(java.lang.Object object)
private boolean notEmptyOrZero(java.lang.Integer integer)
private java.lang.String getValueOrEmpty(java.lang.String property)
private void setIntegerAttribute(java.lang.String attributeName, java.lang.String propertyName, java.lang.Object value, int defaultValue, java.util.Properties properties, AttributeList resultList) throws InvalidAttributeValueException
InvalidAttributeValueException
private boolean isEqualProperties(java.lang.String property1, java.lang.String property2)
private static MBeanNotificationInfo[] getNotificationInfos()
public void onRegistration(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo)
onRegistration
in interface ProxoolListenerIF
connectionPoolDefinition
- the new definition.completeInfo
- the properties that could be used to create this definition.ProxoolListenerIF.onRegistration(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF, java.util.Properties)
public void onShutdown(java.lang.String alias)
onShutdown
in interface ProxoolListenerIF
alias
- the alias of the pool about to be shut down.ProxoolListenerIF.onShutdown(java.lang.String)
public void definitionUpdated(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo, java.util.Properties changedInfo)
NOTIFICATION_TYPE_DEFINITION_UPDATED
event.
definitionUpdated
in interface ConfigurationListenerIF
connectionPoolDefinition
- the new definitioncompleteInfo
- the properties that could be used to create this definitionchangedInfo
- only the properties that have changed since the pool was
registered, or this method was las called.ConfigurationListenerIF.definitionUpdated(org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF, java.util.Properties, java.util.Properties)
public void addNotificationListener(NotificationListener notificationListener, NotificationFilter notificationFilter, java.lang.Object handBack) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
javax.management.NotificationBroadcaster#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
public void removeNotificationListener(NotificationListener notificationListener) throws ListenerNotFoundException
ListenerNotFoundException
javax.management.NotificationBroadcaster#removeNotificationListener(javax.management.NotificationListener)
public MBeanNotificationInfo[] getNotificationInfo()
javax.management.NotificationBroadcaster#getNotificationInfo()
public ObjectName preRegister(MBeanServer mBeanServer, ObjectName objectName) throws java.lang.Exception
java.lang.Exception
javax.management.MBeanRegistration#preRegister(javax.management.MBeanServer, javax.management.ObjectName)
public void postRegister(java.lang.Boolean success)
javax.management.MBeanRegistration#postRegister(java.lang.Boolean)
public void preDeregister() throws java.lang.Exception
java.lang.Exception
javax.management.MBeanRegistration#preDeregister()
public void postDeregister()
javax.management.MBeanRegistration#postDeregister()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |