public abstract class AbstractCommandHandlerStats extends StandardMBean implements CommandHandlerStatsMBean, Disposable
CommandHandler
via JMXConstructor and Description |
---|
AbstractCommandHandlerStats(Class<?> jmxClass,
String jmxName,
String handlerName,
String[] commands) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the object
|
long |
getAll()
Return the count of all processed transactions by the handler
|
String[] |
getCommands()
Return all implemented commands by this handler
|
long |
getDisconnect()
Return how often the Handler issued a disconnect
|
String |
getName()
Return the name of the handler
|
void |
increment(org.apache.james.protocols.api.Response response)
Increment stats based on the given response
|
protected abstract void |
incrementStats(org.apache.james.protocols.api.Response response)
Subclasses need to implement this to handle more precise stats
|
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
public AbstractCommandHandlerStats(Class<?> jmxClass, String jmxName, String handlerName, String[] commands) throws NotCompliantMBeanException, MalformedObjectNameException, NullPointerException, InstanceAlreadyExistsException, MBeanRegistrationException
public void increment(org.apache.james.protocols.api.Response response)
response
- protected abstract void incrementStats(org.apache.james.protocols.api.Response response)
response
- public long getAll()
HandlerStatsMBean
getAll
in interface HandlerStatsMBean
HandlerStatsMBean.getAll()
public String getName()
HandlerStatsMBean
getName
in interface HandlerStatsMBean
HandlerStatsMBean.getName()
public void dispose()
Disposable
dispose
in interface Disposable
Disposable.dispose()
public String[] getCommands()
CommandHandlerStatsMBean
getCommands
in interface CommandHandlerStatsMBean
CommandHandlerStatsMBean.getCommands()
public long getDisconnect()
HandlerStatsMBean
getDisconnect
in interface HandlerStatsMBean
HandlerStatsMBean.getDisconnect()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.