Package com.adaptris.core
Class HeartbeatEvent
- java.lang.Object
-
- com.adaptris.core.Event
-
- com.adaptris.core.AdapterLifecycleEvent
-
- com.adaptris.core.HeartbeatEvent
-
- All Implemented Interfaces:
LoggableEvent
,java.io.Serializable
public class HeartbeatEvent extends AdapterLifecycleEvent implements LoggableEvent
Standard
Adapter
heartbeat event. This class may be sub-classed to meet solution-specific heartbeat information requirements.In the adapter configuration file this class is aliased as heartbeat-event which is the preferred alternative to the fully qualified classname when building your configuration.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HeartbeatEvent()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
extractState(Adapter adapter)
Extracts a report on theAdapter
's current state.AdapterStateSummary
getAdapterStateSummary()
Return theAdapterStateSummary
.long
getHeartbeatTime()
Returns the time this event was sent.void
logEvent(org.slf4j.Logger logger)
void
setAdapterStateSummary(AdapterStateSummary a)
Sets theAdapterStateSummary
.void
setHeartbeatTime(long l)
Sets the time this event was sent.-
Methods inherited from class com.adaptris.core.AdapterLifecycleEvent
getAdapterUniqueId, getNameSpace, getWasSuccessful, setAdapterUniqueId, setWasSuccessful
-
Methods inherited from class com.adaptris.core.Event
createNameSpace, getCreationTime, getDestinationId, getSourceId, getUniqueId, setCreationTime, setDestinationId, setSourceId, setUniqueId
-
-
-
-
Method Detail
-
getHeartbeatTime
public long getHeartbeatTime()
Returns the time this event was sent.
- Returns:
- a
long
representing the time this event was sent
-
setHeartbeatTime
public void setHeartbeatTime(long l)
Sets the time this event was sent.
- Parameters:
l
- along
representing the time this event was sent
-
extractState
public void extractState(Adapter adapter)
Extracts a report on the
Adapter
's current state.- Parameters:
adapter
- theAdapter
to extract state from
-
getAdapterStateSummary
public AdapterStateSummary getAdapterStateSummary()
Return the
AdapterStateSummary
.- Returns:
- the
AdapterStateSummary
-
setAdapterStateSummary
public void setAdapterStateSummary(AdapterStateSummary a)
Sets the
AdapterStateSummary
.- Parameters:
a
- theAdapterStateSummary
-
logEvent
public void logEvent(org.slf4j.Logger logger)
- Specified by:
logEvent
in interfaceLoggableEvent
-
-