Package org.flasby.net.heartbeat
Interface HeartbeatClient
public interface HeartbeatClient
a client of a service which responds to heartbeats.
Once the heartbeat is established the client will be informed if the service stops responding.
Once the heartbeat is established the client will be informed if the service stops responding.
- Author:
- steve
-
Method Summary
Modifier and TypeMethodDescriptionvoid
itsDeadJim
(ServiceInfo serviceInfo) called when the service appears to be dead.void
starting()
called just before the underlying transport initiates the calls.void
stopBeating
(String serviceId) the client isn't interested in knowing about any services anymore and says goodbye.
-
Method Details
-
stopBeating
the client isn't interested in knowing about any services anymore and says goodbye. No more heartbeat requests will be sent and the client will never be informed about heartbeat events once this call has returned. The service will be told that this client is dead. -
itsDeadJim
called when the service appears to be dead. That means the service hasn't responded to one or more heartbeats within some timeperiod. The service, which is now regarded as dead. is identified. Any resources associated with the service should now be cleaned up. There will never be another call to this method and the ServiceInfo instance will be marked as Status.DEAD. -
starting
void starting()called just before the underlying transport initiates the calls.
-