站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 varia API Documentation 英文版文档

AbstractMonitor (Various API) - JBoss 4.0.1 sp1 varia API Documentation 英文版文档


org.jboss.web.loadbalancer.monitor
Class AbstractMonitor

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.web.loadbalancer.monitor.AbstractMonitor
All Implemented Interfaces:
AbstractMonitorMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, Runnable, org.jboss.system.Service, org.jboss.system.ServiceMBean
Direct Known Subclasses:
ECVMonitorService, SimpleMonitorService

public abstract class AbstractMonitor
extends org.jboss.system.ServiceMBeanSupport
implements AbstractMonitorMBean, Runnable

A base class for loadbalancer-monitors.

Version:
$Revision: 1.3 $
Author:
Thomas Peuss

Field Summary
protected  long interval
           
protected  boolean keepRunning
           
protected  org.jboss.logging.Logger log
           
protected  Thread monitorThread
           
protected  String path
           
protected  AbstractSchedulerMBean scheduler
           
protected  javax.management.ObjectName schedulerObjectName
           
protected  int timeout
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.web.loadbalancer.monitor.AbstractMonitorMBean
OBJECT_NAME
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
AbstractMonitor()
           
 
Method Summary
protected  boolean checkHost(Host host)
          Check the given host.
protected abstract  boolean checkHostStatus(org.apache.commons.httpclient.HttpMethod method)
          Override this method to create new monitors.
protected  void destroyService()
           
 long getInterval()
           
 String getPath()
           
 javax.management.ObjectName getScheduler()
           
 int getTimeout()
           
 boolean isKeepRunning()
           
protected  void monitorHosts()
           
 void run()
           
 void setInterval(long interval)
           
 void setKeepRunning(boolean keepRunning)
           
 void setPath(String path)
           
 void setScheduler(javax.management.ObjectName schedulerObjectName)
           
 void setTimeout(int timeout)
           
protected  void startService()
           
protected  void stopService()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

keepRunning

protected boolean keepRunning

interval

protected long interval

scheduler

protected AbstractSchedulerMBean scheduler

log

protected org.jboss.logging.Logger log

schedulerObjectName

protected javax.management.ObjectName schedulerObjectName

timeout

protected int timeout

path

protected String path

monitorThread

protected Thread monitorThread
Constructor Detail

AbstractMonitor

public AbstractMonitor()
Method Detail

startService

protected void startService()
                     throws Exception
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Throws:
Exception

destroyService

protected void destroyService()
                       throws Exception
Throws:
Exception

checkHostStatus

protected abstract boolean checkHostStatus(org.apache.commons.httpclient.HttpMethod method)
Override this method to create new monitors.

Parameters:
method -
Returns:

monitorHosts

protected void monitorHosts()

checkHost

protected boolean checkHost(Host host)
Check the given host.

Returns:

run

public void run()
Specified by:
run in interface Runnable

isKeepRunning

public boolean isKeepRunning()

setKeepRunning

public void setKeepRunning(boolean keepRunning)

setPath

public void setPath(String path)
Specified by:
setPath in interface AbstractMonitorMBean

getPath

public String getPath()
Specified by:
getPath in interface AbstractMonitorMBean

setInterval

public void setInterval(long interval)
Specified by:
setInterval in interface AbstractMonitorMBean

getInterval

public long getInterval()
Specified by:
getInterval in interface AbstractMonitorMBean

getTimeout

public int getTimeout()
Specified by:
getTimeout in interface AbstractMonitorMBean

setTimeout

public void setTimeout(int timeout)
Specified by:
setTimeout in interface AbstractMonitorMBean

getScheduler

public javax.management.ObjectName getScheduler()
Specified by:
getScheduler in interface AbstractMonitorMBean

setScheduler

public void setScheduler(javax.management.ObjectName schedulerObjectName)
Specified by:
setScheduler in interface AbstractMonitorMBean


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.