org.ocap.shared.dvr
Class RecordingChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.ocap.shared.dvr.RecordingChangedEvent
All Implemented Interfaces:
java.io.Serializable

public class RecordingChangedEvent
extends java.util.EventObject

Event used to notify listeners of changes in the list of recording requests maintained by the RecordingManager. This event is not generated for changes other than those for which constants are defined in this class.

See Also:
Serialized Form

Field Summary
static int ENTRY_ADDED
          A new RecordingRequest was added.
static int ENTRY_DELETED
          A RecordingRequest was deleted.
static int ENTRY_STATE_CHANGED
          The state of a RecordingRequest changed
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
RecordingChangedEvent(RecordingRequest source, int newState, int oldState)
          Constructs the event.
RecordingChangedEvent(RecordingRequest source, int newState, int oldState, int type)
          Constructs the event.
 
Method Summary
 int getChange()
          Returns the change to the RecordingRequest.
 int getOldState()
          Returns the old state for the RecordingRequest.
 RecordingRequest getRecordingRequest()
          Returns the RecordingRequest that caused the event.
 int getState()
          Returns the new state for the RecordingRequest.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENTRY_ADDED

public static final int ENTRY_ADDED
A new RecordingRequest was added.

See Also:
Constant Field Values

ENTRY_DELETED

public static final int ENTRY_DELETED
A RecordingRequest was deleted.

See Also:
Constant Field Values

ENTRY_STATE_CHANGED

public static final int ENTRY_STATE_CHANGED
The state of a RecordingRequest changed

See Also:
Constant Field Values
Constructor Detail

RecordingChangedEvent

public RecordingChangedEvent(RecordingRequest source,
                             int newState,
                             int oldState)
Constructs the event. Events constructed with this constructor shall have a type of ENTRY_STATE_CHANGED.

Parameters:
source - The RecordingRequest that caused the event.
newState - the state the RecordingRequest is now in.
oldState - the state the RecordingRequest was in before the state change.

RecordingChangedEvent

public RecordingChangedEvent(RecordingRequest source,
                             int newState,
                             int oldState,
                             int type)
Constructs the event.

Parameters:
source - The RecordingRequest that caused the event.
newState - the state the RecordingRequest is now in.
oldState - the state the RecordingRequest was in before the state change.
type - the type of change which caused this event to be generated
Method Detail

getRecordingRequest

public RecordingRequest getRecordingRequest()
Returns the RecordingRequest that caused the event.

Returns:
The RecordingRequest that caused the event.

getChange

public int getChange()
Returns the change to the RecordingRequest.

Returns:
the type of the change which caused the event

getState

public int getState()
Returns the new state for the RecordingRequest.

Returns:
The new state.

getOldState

public int getOldState()
Returns the old state for the RecordingRequest.

Returns:
The old state.