This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<publisher name="StatsExample"> | |
<class>com.acme.JMXStatsExample</class> | |
<property name="top">20</property> | |
</publisher> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import java.lang.management.ManagementFactory; | |
import javax.management.MBeanServer; | |
import javax.management.ObjectName; | |
import com.pushtechnology.diffusion.api.APIException; | |
import com.pushtechnology.diffusion.api.publisher.Publisher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TopicStatsMBean.java | |
package com.acme; | |
import java.util.Set; | |
import com.pushtechnology.diffusion.api.publisher.Publisher; | |
import com.pushtechnology.diffusion.api.publisher.Publishers; | |
import com.pushtechnology.diffusion.api.topic.Topic; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
public interface TopicStatsMBean | |
{ | |
public long getUniqueSubscriptions(); | |
public long getTotalSubscriptions(); | |
public int getTotalTopics(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.TreeMap; | |
import com.pushtechnology.diffusion.api.publisher.Client; | |
import com.pushtechnology.diffusion.api.publisher.Publisher; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
public interface ClientStatsMBean | |
{ | |
public String getClientsByConnectionType(); | |
public String getTopByAge(); | |
public String getTopBySubscriptions(); | |
public String getTopByMessagesSent(); | |
public String getTopByMessagesReceived(); | |
public int getTopClientCount(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.management.InstanceAlreadyExistsException; | |
import javax.management.MBeanRegistrationException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
/** | |
* DiskspaceMBean | |
*<P> | |
* Diskspace Management Bean. | |
* | |
* @author mcowie - created 24 Oct 2011 | |
*/ | |
public interface DiskspaceMBean | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
import java.net.InetAddress; | |
import java.net.NetworkInterface; | |
import java.net.SocketException; | |
import java.util.Enumeration; | |
import java.util.Set; | |
import javax.management.MBeanServer; | |
import javax.management.ObjectInstance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.acme; | |
/** | |
* JMX interface to a Network Interface Card | |
* | |
* @author martincowie - created Mar 12, 2012 | |
*/ | |
public interface NICMBean { | |
public abstract String getDisplayName(); | |
public abstract String getHardwareAddress(); |
NewerOlder