|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.remoting.detection.AbstractDetector
AbstractDetector
Field Summary | |
protected Logger (src) |
log
|
protected MBeanServer (src) |
mbeanserver
|
protected ObjectName (src) |
objectName
|
protected ObjectName (src) |
registryObjectName
|
Constructor Summary | |
AbstractDetector()
|
Method Summary | |
protected boolean |
checkInvokerServer(Detection (src) detection,
java.lang.ClassLoader cl)
|
protected void |
detect(Detection (src) detection)
called when a remote detection from a peer is received by a detector |
org.w3c.dom.Element |
getConfiguration()
The getConfiguration method |
long |
getDefaultTimeDelay()
|
protected long |
getHeartbeatDelay()
return the initial delay in milliseconds before the initial heartbeat is fired. |
protected long |
getHeartbeatPeriod()
return the period in milliseconds between subsequent heartbeats. |
long |
getHeartbeatTimeDelay()
The amount of time to wait between sending (and sometimes receiving) detection messages. |
protected long |
getPingerDelay()
return the delay in milliseconds between when the timer is created to when the first pinger thread runs. |
protected long |
getPingerPeriod()
return the period in milliseconds between checking lost servers against the last detection timestamp. |
protected abstract void |
heartbeat()
subclasses must implement to provide the specific heartbeat protocol for this server to send out to other servers on the network |
protected boolean |
isRemoteDetection(Detection (src) detection)
|
void |
postDeregister()
This method is called by the MBeanServer after deregistration takes place. |
void |
postRegister(java.lang.Boolean aBoolean)
This method is called by the MBeanServer after registration takes place or when registration fails. |
void |
preDeregister()
This method is called by the MBeanServer before deregistration takes place. |
ObjectName (src) |
preRegister(MBeanServer (src) mBeanServer,
ObjectName (src) objectName)
This method is called by the MBeanServer before registration takes place. |
void |
setConfiguration(org.w3c.dom.Element xml)
set the configuration for the domains to be recognized by detector |
void |
setDefaultTimeDelay(long defaultTimeDelay)
The amount of time which can elapse without receiving a detection event before a server will be suspected as being dead and peroforming an explicit invocation on it to verify it is alive. |
void |
setHeartbeatTimeDelay(long heartbeatTimeDelay)
The amount of time to wait between sending (and sometimes receiving) detection messages. |
void |
start()
called by MBeanServer to start the mbean lifecycle |
protected void |
startHeartbeat(long delay,
long period)
start heartbeating |
protected void |
startPinger(long delay,
long period)
start the pinger timer thread |
void |
stop()
called by the MBeanServer to stop the mbean lifecycle |
protected void |
stopHeartbeat()
stop heartbeating |
protected void |
stopPinger()
stop the pinger timer thread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final Logger (src) log
protected MBeanServer (src) mbeanserver
protected ObjectName (src) objectName
protected ObjectName (src) registryObjectName
Constructor Detail |
public AbstractDetector()
Method Detail |
public void setHeartbeatTimeDelay(long heartbeatTimeDelay) throws ConfigurationException (src)
setHeartbeatTimeDelay
in interface AbstractDetectorMBean (src)
heartbeatTimeDelay
-
ConfigurationException (src)
public long getHeartbeatTimeDelay()
getHeartbeatTimeDelay
in interface AbstractDetectorMBean (src)
public void setDefaultTimeDelay(long defaultTimeDelay) throws ConfigurationException (src)
setDefaultTimeDelay
in interface AbstractDetectorMBean (src)
defaultTimeDelay
- time in milliseconds
ConfigurationException (src)
public long getDefaultTimeDelay()
getDefaultTimeDelay
in interface AbstractDetectorMBean (src)
public void start() throws java.lang.Exception
start
in interface Detector (src)
java.lang.Exception
protected long getPingerDelay()
protected long getPingerPeriod()
protected void startPinger(long delay, long period)
delay
- period
- protected void stopPinger()
public void stop() throws java.lang.Exception
stop
in interface Detector (src)
java.lang.Exception
public void postDeregister()
MBeanRegistration (src)
postDeregister
in interface MBeanRegistration (src)
public void postRegister(java.lang.Boolean aBoolean)
MBeanRegistration (src)
postRegister
in interface MBeanRegistration (src)
aBoolean
- the MBeanServer passes true when the
MBean was registered, false otherwise.public void preDeregister() throws java.lang.Exception
MBeanRegistration (src)
The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preDeregister
in interface MBeanRegistration (src)
java.lang.Exception
public ObjectName (src) preRegister(MBeanServer (src) mBeanServer, ObjectName (src) objectName) throws java.lang.Exception
MBeanRegistration (src)
The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preRegister
in interface MBeanRegistration (src)
java.lang.Exception
- for any error, the MBean is not registered.public void setConfiguration(org.w3c.dom.Element xml) throws java.lang.Exception
setConfiguration
in interface AbstractDetectorMBean (src)
xml
-
java.lang.Exception
public org.w3c.dom.Element getConfiguration()
getConfiguration
method
getConfiguration
in interface AbstractDetectorMBean (src)
Element
valueprotected void startHeartbeat(long delay, long period)
delay
- period
- protected void stopHeartbeat()
protected long getHeartbeatDelay()
protected long getHeartbeatPeriod()
protected abstract void heartbeat()
protected void detect(Detection (src) detection)
detection
- protected boolean isRemoteDetection(Detection (src) detection)
protected boolean checkInvokerServer(Detection (src) detection, java.lang.ClassLoader cl)
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |