|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmythapi.impl.AData<E>
org.jmythapi.protocol.response.impl.AMythResponse<E>
org.jmythapi.protocol.events.impl.AMythEvent<IRecordingListChangeUpdate.Props>
org.jmythapi.protocol.events.impl.RecordingListChangeUpdate
public class RecordingListChangeUpdate
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jmythapi.protocol.events.IRecordingListChangeUpdate |
|---|
IRecordingListChangeUpdate.Props |
| Field Summary |
|---|
| Fields inherited from class org.jmythapi.impl.AData |
|---|
logger, propsClass, protoVersion, respArgs |
| Constructor Summary | |
|---|---|
RecordingListChangeUpdate(IMythPacket packet)
|
|
RecordingListChangeUpdate(ProtocolVersion protoVersion,
List<String> eventArguments)
|
|
| Method Summary | |
|---|---|
protected void |
checkSize(List<String> responseArgs)
A function to check if the given response-argument-liste contains all expected arguments. |
Integer |
getChannelID()
Gets the channel ID of the recording. |
IProgramInfo |
getProgramInfo()
Gets the info object of the changed recording. |
Date |
getRecordingStartTime()
Gets the recording start time. |
String |
getUniqueRecordingID()
Gets the unique ID of the changed recording. |
EnumMap<IProgramInfo.Props,Object[]> |
getUpdatedProperties(IProgramInfo oldProgramInfo)
Compares a previous version of the recording with the changed version. |
String |
toString()
Returns the content of this data object as a formatted string. |
| Methods inherited from class org.jmythapi.protocol.events.impl.AMythEvent |
|---|
decodeProperty, encodeProperty, extractArgumentsList, extractEventName, getEventName, getPacket |
| Methods inherited from class org.jmythapi.protocol.response.impl.AMythResponse |
|---|
getExpectedSize, getProperties, getProperty, getPropertyIndex |
| Methods inherited from class org.jmythapi.impl.AData |
|---|
clone, equals, getPropertyClass, getPropertyCount, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValueObject, getPropertyValues, getVersionNr, hashCode, init, postProcessArguments, setPropertyValue, setPropertyValue, setPropertyValueObject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jmythapi.protocol.events.IMythEvent |
|---|
getEventName |
| Methods inherited from interface org.jmythapi.IPropertyAware |
|---|
getProperties, getProperty, getPropertyClass, getPropertyCount, getPropertyIndex, getPropertyMap, getPropertyValue, getPropertyValue, getPropertyValueObject, getPropertyValues, setPropertyValue, setPropertyValue, setPropertyValueObject |
| Methods inherited from interface org.jmythapi.IVersionable |
|---|
getVersionNr |
| Methods inherited from interface org.jmythapi.protocol.ISendable |
|---|
getPacket |
| Constructor Detail |
|---|
public RecordingListChangeUpdate(IMythPacket packet)
public RecordingListChangeUpdate(ProtocolVersion protoVersion,
List<String> eventArguments)
| Method Detail |
|---|
protected void checkSize(List<String> responseArgs)
throws IllegalArgumentException
AMythResponseA function to check if the given response-argument-liste contains all expected arguments.
The expected argument-list-size is calculated using#getExpectedSize(ArrayList).
checkSize in class AMythResponse<IRecordingListChangeUpdate.Props>responseArgs - the response-argument-list
IllegalArgumentException - if expected arguments are missing.public IProgramInfo getProgramInfo()
IRecordingListChangeUpdate
getProgramInfo in interface IRecordingListChangeUpdategetProgramInfo in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>public Integer getChannelID()
IRecordingListChangeUpdate
getChannelID in interface IRecordingEvent<IRecordingListChangeUpdate.Props>getChannelID in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>getChannelID in interface IRecordingListChangeUpdategetChannelID in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>public Date getRecordingStartTime()
IRecordingListChangeUpdate
getRecordingStartTime in interface IRecordingEvent<IRecordingListChangeUpdate.Props>getRecordingStartTime in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>getRecordingStartTime in interface IRecordingListChangeUpdategetRecordingStartTime in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>public String getUniqueRecordingID()
IRecordingListChangeUpdate
getUniqueRecordingID in interface IRecordingEvent<IRecordingListChangeUpdate.Props>getUniqueRecordingID in interface IRecordingListChangeSingle<IRecordingListChangeUpdate.Props>getUniqueRecordingID in interface IRecordingListChangeUpdategetUniqueRecordingID in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>EncodingUtils.generateId(Integer, Date)public EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
IRecordingListChangeUpdateThis function compares each property of the recordings and returns a map containing all changed properties
EnumMap<IProgramInfo.Props,Object[]> diffMap = ((IRecordingListChangeUpdate)event).getUpdatedProperties(oldRecording); // pring changes System.out.println(String.format( "%d properties of recording changed:", Integer.valueOf(diffMap.size()), recording.getBaseName() )); for(Entry<IProgramInfo.Props,Object[]> entry : diffMap.entrySet()) { IProgramInfo.Props property = entry.getKey(); Object[] values = entry.getValue(); System.out.println(String.format( "\r\n %s: %s -> %s", property, values[0],values[1] )); }
getUpdatedProperties in interface IRecordingListChangeUpdategetUpdatedProperties in interface IRecordingUpdateEvent<IRecordingListChangeUpdate.Props>oldProgramInfo - a previous version of the recording
PropertyAwareUtils.compare(IPropertyAware, IPropertyAware)public String toString()
ADataReturns the content of this data object as a formatted string.
E.g.<0>TOTAL_RAM_MB: 1002 | <1>FREE_RAM_MB: 474 | <2>TOTAL_VM_MB: 853 | <3>FREE_VM_MB: 853
toString in class AMythEvent<IRecordingListChangeUpdate.Props>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||