mx4j.remote

Class AbstractHeartBeat

public abstract class AbstractHeartBeat extends Object implements HeartBeat, Runnable

Base implementation for the HeartBeat interface.

Version: $Revision: 1.4 $

Constructor Summary
protected AbstractHeartBeat(ConnectionNotificationEmitter emitter, Map environment)
Creates a new HeartBeat.
Method Summary
intgetMaxRetries()
longgetPulsePeriod()
protected abstract voidpulse()
Subclasses will implement this method using protocol specific connections.
voidrun()
protected voidsendConnectionNotificationFailed()
Sends the connection failed notification using the emitter specified in
voidstart()
voidstop()

Constructor Detail

AbstractHeartBeat

protected AbstractHeartBeat(ConnectionNotificationEmitter emitter, Map environment)
Creates a new HeartBeat.

Parameters: emitter The NotificationEmitter that sends connection failures notifications. environment The environment that may contain properties that specify heart beat's behavior

See Also: AbstractHeartBeat CONNECTION_HEARTBEAT_PERIOD CONNECTION_HEARTBEAT_RETRIES

Method Detail

getMaxRetries

public int getMaxRetries()

getPulsePeriod

public long getPulsePeriod()

pulse

protected abstract void pulse()
Subclasses will implement this method using protocol specific connections. Normally the method javax.management.MBeanServerConnection#getDefaultDomain is used to "ping" the server side.

run

public void run()

sendConnectionNotificationFailed

protected void sendConnectionNotificationFailed()
Sends the connection failed notification using the emitter specified in AbstractHeartBeat

start

public void start()

stop

public void stop()
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.