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 ) ; } this . state = state ; firePropertyChange ( PROPERTY_STATE , oldState , state ) ; }
Changes the state of this channel .