mx4j.remote
Class AbstractHeartBeat
java.lang.Object
mx4j.remote.AbstractHeartBeat
- HeartBeat, Runnable
public abstract class AbstractHeartBeat
extends java.lang.Object
Base implementation for the HeartBeat interface.
AbstractHeartBeat
protected AbstractHeartBeat(ConnectionNotificationEmitter emitter,
Map environment)
Creates a new HeartBeat.
emitter
- The NotificationEmitter that sends connection failures notifications.environment
- The environment that may contain properties that specify heart beat's behavior
pulse
protected abstract void pulse()
throws IOException
Subclasses will implement this method using protocol specific connections.
Normally the method javax.management.MBeanServerConnection.getDefaultDomain
is used
to "ping" the server side.
sendConnectionNotificationFailed
protected void sendConnectionNotificationFailed()
Sends the connection failed notification using the emitter specified in
AbstractHeartBeat
start
public void start()
throws IOException
- start in interface HeartBeat
stop
public void stop()
throws IOException
- stop in interface HeartBeat
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.