Top Inners Fields Constructors Methods
net.sf.ehcache.hibernate.management.impl

public abstract Class BaseEmitterBean

extends StandardMBean
implements NotificationEmitter
Class Inheritance
All Implemented Interfaces
javax.management.NotificationEmitter, javax.management.NotificationBroadcaster
Known Direct Subclasses
net.sf.ehcache.hibernate.management.impl.EhcacheHibernate, net.sf.ehcache.hibernate.management.impl.EhcacheStatsImpl, net.sf.ehcache.hibernate.management.impl.HibernateStatsImpl, net.sf.ehcache.management.sampled.SampledCache, net.sf.ehcache.management.sampled.SampledCacheManager
Imports
java.util.List, java.util.concurrent.CopyOnWriteArrayList, java.util.concurrent.atomic.AtomicLong, javax.management.ListenerNotFoundException, .MBeanNotificationInfo, .NotCompliantMBeanException, .Notification, .NotificationBroadcasterSupport, .NotificationEmitter, .NotificationFilter, .NotificationListener, .StandardMBean

Author
gkeim

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
protected final BaseEmitterBean.Emitter
emitter

emitter

private final List<NotificationListener>
protected final AtomicLong
sequenceNumber

sequenceNumber

Constructor Summary

AccessConstructor and Description
protected <T>
BaseEmitterBean(Class<T> mbeanInterface)

BaseEmitterBean

Method Summary

Modifier and TypeMethod and Description
public void
addNotificationListener(NotificationListener
The listener object which will handle the notifications emitted by the broadcaster.
notif
,
NotificationFilter
The filter object. If filter is null, no filtering will be performed before handling notifications.
filter
,
Object
An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.
callBack
)

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Adds a listener to this MBean.
public final void
dispose()

Dispose of this SampledCacheManager and clean up held resources

protected abstract void
doDispose()

Dispose callback of subclasses

public abstract MBeanNotificationInfo[]
getNotificationInfo()

Redeclares javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

private void
removeAllNotificationListeners()

remove all added notification listeners

public void
removeNotificationListener(NotificationListener
A listener that was previously added to this MBean.
listener
)

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Removes a listener from this MBean.
public void
removeNotificationListener(NotificationListener
A listener that was previously added to this MBean.
notif
,
NotificationFilter
The filter that was specified when the listener was added.
filter
,
Object
The handback that was specified when the listener was added.
callBack
)

Implements javax.management.NotificationEmitter.removeNotificationListener.

Removes a listener from this MBean.

public void
sendNotification(String eventType)

sendNotification

public void
sendNotification(String eventType, Object data)

sendNotification

public void
sendNotification(String eventType, Object data, String msg)

sendNotification

Inherited from javax.management.StandardMBean:
cacheMBeanInfogetAttributegetAttributesgetCachedMBeanInfogetClassNamegetConstructorsgetDescriptiongetDescriptiongetDescriptiongetDescriptiongetDescriptiongetDescriptiongetDescriptiongetImpactgetImplementationgetImplementationClassgetMBeanInfogetMBeanInterfacegetParameterNamegetParameterNameinvokepostDeregisterpostRegisterpreDeregisterpreRegistersetAttributesetAttributessetImplementation

Field Detail

emitterback to summary
protected final BaseEmitterBean.Emitter emitter

emitter

notificationListenersback to summary
private final List<NotificationListener> notificationListeners
sequenceNumberback to summary
protected final AtomicLong sequenceNumber

sequenceNumber

Constructor Detail

BaseEmitterBeanback to summary
protected <T> BaseEmitterBean(Class<T> mbeanInterface) throws NotCompliantMBeanException

BaseEmitterBean

Method Detail

addNotificationListenerback to summary
public void addNotificationListener(NotificationListener notif, NotificationFilter filter, Object callBack)

Implements javax.management.NotificationBroadcaster.addNotificationListener.

Doc from javax.management.NotificationBroadcaster.addNotificationListener.

Adds a listener to this MBean.

Parameters
notif:NotificationListener

The listener object which will handle the notifications emitted by the broadcaster.

filter:NotificationFilter

The filter object. If filter is null, no filtering will be performed before handling notifications.

callBack:Object

An opaque object to be sent back to the listener when a notification is emitted. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.

See Also
javax.management.NotificationBroadcaster#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
disposeback to summary
public final void dispose()

Dispose of this SampledCacheManager and clean up held resources

doDisposeback to summary
protected abstract void doDispose()

Dispose callback of subclasses

getNotificationInfoback to summary
public abstract MBeanNotificationInfo[] getNotificationInfo()

Redeclares javax.management.NotificationBroadcaster.getNotificationInfo.

Doc from javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

Returns:MBeanNotificationInfo[]

the array of possible notifications.

See Also
javax.management.NotificationBroadcaster#getNotificationInfo()
removeAllNotificationListenersback to summary
private void removeAllNotificationListeners()

remove all added notification listeners

removeNotificationListenerback to summary
public void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException

Implements javax.management.NotificationBroadcaster.removeNotificationListener.

Doc from javax.management.NotificationBroadcaster.removeNotificationListener.

Removes a listener from this MBean. If the listener has been registered with different handback objects or notification filters, all entries corresponding to the listener will be removed.

Parameters
listener:NotificationListener

A listener that was previously added to this MBean.

Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean.
See Also
javax.management.NotificationBroadcaster#removeNotificationListener(javax.management.NotificationListener)
removeNotificationListenerback to summary
public void removeNotificationListener(NotificationListener notif, NotificationFilter filter, Object callBack) throws ListenerNotFoundException

Implements javax.management.NotificationEmitter.removeNotificationListener.

Doc from javax.management.NotificationEmitter.removeNotificationListener.

Removes a listener from this MBean. The MBean must have a listener that exactly matches the given listener, filter, and handback parameters. If there is more than one such listener, only one is removed.

The filter and handback parameters may be null if and only if they are null in a listener to be removed.

Parameters
notif:NotificationListener

A listener that was previously added to this MBean.

filter:NotificationFilter

The filter that was specified when the listener was added.

callBack:Object

The handback that was specified when the listener was added.

Exceptions
ListenerNotFoundException:
The listener is not registered with the MBean, or it is not registered with the given filter and handback.
See Also
javax.management.NotificationEmitter#removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
sendNotificationback to summary
public void sendNotification(String eventType)

sendNotification

sendNotificationback to summary
public void sendNotification(String eventType, Object data)

sendNotification

sendNotificationback to summary
public void sendNotification(String eventType, Object data, String msg)

sendNotification

net.sf.ehcache.hibernate.management.impl back to summary

private Class BaseEmitterBean.Emitter

extends NotificationBroadcasterSupport
Class Inheritance

Author
gkeim

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public MBeanNotificationInfo[]
getNotificationInfo()

Overrides javax.management.NotificationBroadcasterSupport.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

Inherited from javax.management.NotificationBroadcasterSupport:
addNotificationListenerhandleNotificationremoveNotificationListenerremoveNotificationListenersendNotification

Constructor Detail

Emitterback to summary
private Emitter()

Method Detail

getNotificationInfoback to summary
public MBeanNotificationInfo[] getNotificationInfo()

Overrides javax.management.NotificationBroadcasterSupport.getNotificationInfo.

Implements javax.management.NotificationBroadcaster.getNotificationInfo.

Doc from javax.management.NotificationBroadcaster.getNotificationInfo.

Returns an array indicating, for each notification this MBean may send, the name of the Java class of the notification and the notification type.

It is not illegal for the MBean to send notifications not described in this array. However, some clients of the MBean server may depend on the array being complete for their correct functioning.

Returns:MBeanNotificationInfo[]

the array of possible notifications.

Annotations
@Override
See Also
javax.management.NotificationBroadcasterSupport#getNotificationInfo()