Package groovy.jmx.builder
Class JmxEventEmitter
- java.lang.Object
- 
- javax.management.NotificationBroadcasterSupport
- 
- groovy.jmx.builder.JmxEventEmitter
 
 
- 
- All Implemented Interfaces:
- JmxEventEmitterMBean,- NotificationBroadcaster,- NotificationEmitter
 
 public class JmxEventEmitter extends 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 SummaryConstructors Constructor Description JmxEventEmitter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEvent()Event type getterStringgetMessage()Event message getterlongsend(Object data)Called to broadcast message on MBeanServer event bus.voidsetEvent(String event)Event type settervoidsetMessage(String message)Event message setter.- 
Methods inherited from class javax.management.NotificationBroadcasterSupportaddNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
- 
 
- 
- 
- 
Method Detail- 
getEventpublic String getEvent() Event type getter- Specified by:
- getEventin interface- JmxEventEmitterMBean
- Returns:
- - returns event type string thrown by this emitter
 
 - 
setEventpublic void setEvent(String event) Event type setter- Specified by:
- setEventin interface- JmxEventEmitterMBean
- Parameters:
- event- - event type set for this emitter.
 
 - 
getMessagepublic String getMessage() Event message getter- Returns:
- - message that is associated with event.
 
 - 
setMessagepublic void setMessage(String message) Event message setter.- Parameters:
- message- - message that is associated with event emitted.
 
 - 
sendpublic long send(Object data) Called to broadcast message on MBeanServer event bus. Internally, it calls NotificationBroadCasterSupport.sendNotification() method to dispatch the event.- Specified by:
- sendin interface- JmxEventEmitterMBean
- Parameters:
- data- - a data object sent as part of the event parameter.
- Returns:
- a sequence number associated with the emitted event.
 
 
- 
 
-