org.apache.james.postage.jmx
Class JVMResourceSampler

java.lang.Object
  extended by org.apache.james.postage.jmx.JVMResourceSampler
All Implemented Interfaces:
Sampler

public class JVMResourceSampler
extends java.lang.Object
implements Sampler

wraps JVMResourceSamplerWorker to allow J2SE 1.4 compatibility
does not access this class through direct reference, only through reflection
in the case this compatibility is removed, simply inline the Worker class

See Also:
for how to configure James to be JVM-JMX agnostic

Constructor Summary
JVMResourceSampler(java.lang.String host, int port, PostageRunnerResult results)
           
 
Method Summary
 void connectRemoteJamesJMXServer()
           
 void doSample()
           
static boolean isJMXAvailable()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JVMResourceSampler

public JVMResourceSampler(java.lang.String host,
                          int port,
                          PostageRunnerResult results)
Method Detail

isJMXAvailable

public static boolean isJMXAvailable()

connectRemoteJamesJMXServer

public void connectRemoteJamesJMXServer()
                                 throws SamplingException
Throws:
SamplingException

doSample

public void doSample()
              throws SamplingException
Specified by:
doSample in interface Sampler
Throws:
SamplingException


Copyright © 2006-2007 The Apache Software Foundation. All Rights Reserved.