public class AdapterStateSummary
extends java.lang.Object
In the adapter configuration file this class is aliased as adapter-state-summary which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
AdapterStateSummary() |
AdapterStateSummary(Adapter adapter)
Utility constructor that summarises the current state of the passed
Adapter . |
Modifier and Type | Method and Description |
---|---|
void |
addChannelState(KeyValuePair state)
Adds the state of a
Channel to the internal store. |
void |
addChannelState(java.lang.String uniqueId,
ComponentState state)
Adds the state of a
Channel to the internal store. |
KeyValuePair |
getAdapterState()
Returns the state of the
Adapter . |
KeyValuePairSet |
getChannelStates() |
java.lang.String |
getLastStartTime() |
java.lang.String |
getLastStopTime() |
void |
setAdapterState(KeyValuePair state)
Sets the state of the
Adapter . |
void |
setAdapterState(java.lang.String uniqueId,
ComponentState state)
Sets the state of the
Adapter . |
void |
setChannelStates(KeyValuePairSet states) |
void |
setLastStartTime(java.lang.String lastStartTime) |
void |
setLastStopTime(java.lang.String lastStopTime) |
public AdapterStateSummary()
public AdapterStateSummary(Adapter adapter)
Utility constructor that summarises the current state of the passed Adapter
.
adapter
- the Adapter
to report the state ofpublic void setAdapterState(java.lang.String uniqueId, ComponentState state)
Sets the state of the Adapter
.
uniqueId
- the unique ID, may not be null or emptystate
- the state, may not be null or emptypublic void setAdapterState(KeyValuePair state)
Sets the state of the Adapter
.
state
- a KeyValuePair
of state against unique IDpublic KeyValuePair getAdapterState()
Returns the state of the Adapter
.
Adapter
public void addChannelState(java.lang.String uniqueId, ComponentState state)
Adds the state of a Channel
to the internal store. If state for the passed unique ID has already been stored it
will be over-written. Non-uniquely identified Channel
s are ignored.
uniqueId
- the unique ID of the Channel
state
- the state may not be nullpublic void addChannelState(KeyValuePair state)
Adds the state of a Channel
to the internal store.
state
- the state of the Channel
to addpublic KeyValuePairSet getChannelStates()
public void setChannelStates(KeyValuePairSet states)
public java.lang.String getLastStartTime()
public void setLastStartTime(java.lang.String lastStartTime)
public java.lang.String getLastStopTime()
public void setLastStopTime(java.lang.String lastStopTime)