public class ConnectionPoolMBean extends java.lang.Object implements javax.management.DynamicMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, ProxoolListenerIF, ConfigurationListenerIF
Attributes
Operations
Notifications
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NOTIFICATION_TYPE_DEFINITION_UPDATED
Notification type emitted when the pool definition is updated.
|
| Constructor and Description |
|---|
ConnectionPoolMBean(java.lang.String alias,
java.util.Properties poolProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(javax.management.NotificationListener notificationListener,
javax.management.NotificationFilter notificationFilter,
java.lang.Object handBack) |
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. |
java.lang.Object |
getAttribute(java.lang.String attributeName) |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributeNames) |
javax.management.MBeanInfo |
getMBeanInfo() |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo() |
java.lang.Object |
invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature) |
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() |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer mBeanServer,
javax.management.ObjectName objectName) |
void |
removeNotificationListener(javax.management.NotificationListener notificationListener) |
void |
setAttribute(javax.management.Attribute attribute) |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes) |
public static final java.lang.String NOTIFICATION_TYPE_DEFINITION_UPDATED
public ConnectionPoolMBean(java.lang.String alias,
java.util.Properties poolProperties)
throws ProxoolException
ProxoolExceptionpublic java.lang.Object getAttribute(java.lang.String attributeName)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.getAttribute(java.lang.String)public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.setAttribute(javax.management.Attribute)public javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
getAttributes in interface javax.management.DynamicMBeanDynamicMBean.getAttributes(java.lang.String[])public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes in interface javax.management.DynamicMBeanDynamicMBean.setAttributes(javax.management.AttributeList)public java.lang.Object invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
invoke in interface javax.management.DynamicMBeanjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBeanDynamicMBean.getMBeanInfo()public void onRegistration(ConnectionPoolDefinitionIF connectionPoolDefinition, java.util.Properties completeInfo)
onRegistration in interface ProxoolListenerIFconnectionPoolDefinition - 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 ProxoolListenerIFalias - 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 ConfigurationListenerIFconnectionPoolDefinition - 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(javax.management.NotificationListener notificationListener,
javax.management.NotificationFilter notificationFilter,
java.lang.Object handBack)
throws java.lang.IllegalArgumentException
addNotificationListener in interface javax.management.NotificationBroadcasterjava.lang.IllegalArgumentExceptionNotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)public void removeNotificationListener(javax.management.NotificationListener notificationListener)
throws javax.management.ListenerNotFoundException
removeNotificationListener in interface javax.management.NotificationBroadcasterjavax.management.ListenerNotFoundExceptionNotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface javax.management.NotificationBroadcasterNotificationBroadcaster.getNotificationInfo()public javax.management.ObjectName preRegister(javax.management.MBeanServer mBeanServer,
javax.management.ObjectName objectName)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.ExceptionMBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)public void postRegister(java.lang.Boolean success)
postRegister in interface javax.management.MBeanRegistrationMBeanRegistration.postRegister(java.lang.Boolean)public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.ExceptionMBeanRegistration.preDeregister()public void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationMBeanRegistration.postDeregister()