List of usage examples for javax.management NotificationBroadcasterSupport NotificationBroadcasterSupport
public NotificationBroadcasterSupport()
From source file:co.paralleluniverse.common.monitoring.PeriodicMonitor.java
public PeriodicMonitor(Class mbeanInterface, String name) { super(mbeanInterface, true, new NotificationBroadcasterSupport()); this.name = name; this.lastCollectTime = System.currentTimeMillis(); this.monitored = null; }
From source file:net.sbbi.upnp.jmx.UPNPDiscovery.java
/** * Main constructor, will discover all devices types * @param discoveryTimeout devices discoverytimeout in MS, 0 for default timeout, * increase this value if devices are not responding * @param notifySSDPEvents boolean to indicate if the MBean should broadcast JMX UPNPDiscoveryNotifications when an matching * device is joining or leaving the network. * @param registerChildDevices when set to true, discovered device child devices services will also be exposed as * UPNPServiceMBean objects *///from w ww .j ava 2 s .c o m public UPNPDiscovery(int discoveryTimeout, boolean notifySSDPEvents, boolean registerChildDevices) { this.registerChildDevices = registerChildDevices; this.notifySSDPEvents = notifySSDPEvents; this.discoveryTimeout = discoveryTimeout; if (this.discoveryTimeout == 0) { this.discoveryTimeout = Discovery.DEFAULT_TIMEOUT; } notifier = new NotificationBroadcasterSupport(); registeredBeansPerUDN = new HashMap(); String[] types = new String[] { SSDP_ALIVE_NOTIFICATION, SSDP_BYEBYE_NOTIFICATION }; notifInfo = new MBeanNotificationInfo[] { new MBeanNotificationInfo(types, Notification.class.getName(), "SSDP UPNP events notifications") }; searchTargets = new HashSet(); searchTargets.add(Discovery.ROOT_DEVICES); }
From source file:com.sun.grizzly.http.jk.common.ChannelNioSocket.java
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { if (nSupport == null) { nSupport = new NotificationBroadcasterSupport(); }/*from w ww. java 2 s .com*/ nSupport.addNotificationListener(listener, filter, handback); }
From source file:org.apache.catalina.core.StandardContext.java
/** * Create a new StandardContext component with the default basic Valve. *///from ww w.j a va 2 s. com public StandardContext() { super(); pipeline.setBasic(new StandardContextValve()); namingResources.setContainer(this); broadcaster = new NotificationBroadcasterSupport(); }
From source file:org.apache.catalina.core.StandardWrapper.java
/** * Create a new StandardWrapper component with the default basic Valve. *//*from w w w . ja v a2 s . c o m*/ public StandardWrapper() { super(); swValve = new StandardWrapperValve(); pipeline.setBasic(swValve); broadcaster = new NotificationBroadcasterSupport(); }
From source file:org.apache.jk.common.ChannelSocket.java
public void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException { if (nSupport == null) nSupport = new NotificationBroadcasterSupport(); nSupport.addNotificationListener(listener, filter, handback); }