Package groovy.jmx.builder
Class JmxEventEmitter
java.lang.Object
javax.management.NotificationBroadcasterSupport
groovy.jmx.builder.JmxEventEmitter
- All Implemented Interfaces:
JmxEventEmitterMBean
,javax.management.NotificationBroadcaster
,javax.management.NotificationEmitter
public class JmxEventEmitter extends javax.management.NotificationBroadcasterSupport implements JmxEventEmitterMBean
The JmxEventEmitter is a JMX Broadcaster class that is used to send generic events on the MBeanServer's
event bus. It is used by the Emitter node () to send event to registered listeners.
def jmx = JmxBuilder() jmx.emitter(name:"Object name"|ObjectName(), event:"event type") ... jmx.emitter.send(object)
- See Also:
JmxEmitterFactory
-
Constructor Summary
Constructors Constructor Description JmxEventEmitter()
-
Method Summary
Modifier and Type Method Description java.lang.String
getEvent()
Event type getterjava.lang.String
getMessage()
Event message getterlong
send(java.lang.Object data)
Called to broadcast message on MBeanServer event bus.void
setEvent(java.lang.String event)
Event type settervoid
setMessage(java.lang.String message)
Event message setter.Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
JmxEventEmitter
public JmxEventEmitter()
-
-
Method Details
-
getEvent
public java.lang.String getEvent()Event type getter- Specified by:
getEvent
in interfaceJmxEventEmitterMBean
- Returns:
- - returns event type string thrown by this emitter
-
setEvent
public void setEvent(java.lang.String event)Event type setter- Specified by:
setEvent
in interfaceJmxEventEmitterMBean
- Parameters:
event
- - event type set for this emitter.
-
getMessage
public java.lang.String getMessage()Event message getter- Returns:
- - message that is associated with event.
-
setMessage
public void setMessage(java.lang.String message)Event message setter.- Parameters:
message
- - message that is associated with event emitted.
-
send
public long send(java.lang.Object data)Called to broadcast message on MBeanServer event bus. Internally, it calls NotificationBroadCasterSupport.sendNotification() method to dispatch the event.- Specified by:
send
in interfaceJmxEventEmitterMBean
- Parameters:
data
- - a data object sent as part of the event parameter.- Returns:
- a sequence number associated with the emitted event.
-