|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmythapi.impl.AData<E> org.jmythapi.protocol.response.impl.AMythResponse<E> org.jmythapi.protocol.events.impl.AMythEvent<IUpdateProgInfo.Props> org.jmythapi.protocol.events.impl.UpdateProgInfo
public class UpdateProgInfo
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jmythapi.protocol.events.IUpdateProgInfo |
---|
IUpdateProgInfo.Props |
Field Summary |
---|
Fields inherited from class org.jmythapi.impl.AData |
---|
logger, propsClass, protoVersion, respArgs |
Constructor Summary | |
---|---|
UpdateProgInfo(IMythPacket packet)
|
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 UpdateProgInfo(IMythPacket packet)
Method Detail |
---|
protected void checkSize(List<String> responseArgs) throws IllegalArgumentException
AMythResponse
A 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<IUpdateProgInfo.Props>
responseArgs
- the response-argument-list
IllegalArgumentException
- if expected arguments are missing.public IProgramInfo getProgramInfo()
IUpdateProgInfo
getProgramInfo
in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
getProgramInfo
in interface IUpdateProgInfo
public Integer getChannelID()
IUpdateProgInfo
getChannelID
in interface IRecordingEvent<IUpdateProgInfo.Props>
getChannelID
in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
getChannelID
in interface IUpdateProgInfo
public Date getRecordingStartTime()
IUpdateProgInfo
getRecordingStartTime
in interface IRecordingEvent<IUpdateProgInfo.Props>
getRecordingStartTime
in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
getRecordingStartTime
in interface IUpdateProgInfo
public String getUniqueRecordingID()
IUpdateProgInfo
getUniqueRecordingID
in interface IRecordingEvent<IUpdateProgInfo.Props>
getUniqueRecordingID
in interface IRecordingUpdateEvent<IUpdateProgInfo.Props>
getUniqueRecordingID
in interface IUpdateProgInfo
EncodingUtils.generateId(Integer, Date)
public EnumMap<IProgramInfo.Props,Object[]> getUpdatedProperties(IProgramInfo oldProgramInfo)
IUpdateProgInfo
This 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 IRecordingUpdateEvent<IUpdateProgInfo.Props>
getUpdatedProperties
in interface IUpdateProgInfo
oldProgramInfo
- a previous version of the recording
PropertyAwareUtils.compare(IPropertyAware, IPropertyAware)
public String toString()
AData
Returns 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<IUpdateProgInfo.Props>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |