* @param date when the state change occurred.
* @param state the new state of this channel.
*/
synchronized void stateChanged(Date date, ChannelState state)
{
final ChannelStateHistoryEntry historyEntry;
final ChannelState oldState = this.state;
if (oldState == state)
{
return;
}
// System.err.println(id + " state change: " + oldState + " => " + state
// + " (" + name + ")");
historyEntry = new ChannelStateHistoryEntry(date, state);
synchronized (stateHistory)
{
stateHistory.add(historyEntry);
}