org.fourthline.cling.support.lastchange

## Class LastChange

- java.lang.Object
- - org.fourthline.cling.support.lastchange.LastChange

-     public class LastChange
      extends Object

  Collects all state changes per logical instance.

  This class is supposed to be used on a UPnP state variable field, on a RenderingControl or AVTransport service. The service then sets evented values whenever its state changes, and periodically (e.g. in a background loop) fires the "LastChange" XML content through its PropertyChangeSupport. (Where the ServiceManager picks it up and sends it to all subscribers.)

  The event subscriber can use this class to marshall the "LastChange" content, when the event XML is received.

  This class is thread-safe.

  Author:
    Christian Bauer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LastChange(LastChangeParser parser)`
    `LastChange(LastChangeParser parser, Event event)`
    `LastChange(LastChangeParser parser, String xml)`
    `LastChange(String s)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fire(PropertyChangeSupport propertyChangeSupport)`
    `<EV extends EventedValue> EV` | `getEventedValue(int instanceID, Class<EV> type)`
    `<EV extends EventedValue> EV` | `getEventedValue(UnsignedIntegerFourBytes id, Class<EV> type)`
    `UnsignedIntegerFourBytes[]` | `getInstanceIDs()`
    `void` | `reset()`
    `void` | `setEventedValue(int instanceID, EventedValue... ev)`
    `void` | `setEventedValue(UnsignedIntegerFourBytes instanceID, EventedValue... ev)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### LastChange

          public LastChange(String s)

    - #### LastChange

          public LastChange(LastChangeParser parser,
                    Event event)

    - #### LastChange

          public LastChange(LastChangeParser parser)

    - #### LastChange

          public LastChange(LastChangeParser parser,
                    String xml)
                     throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### reset

          public void reset()

    - #### setEventedValue

          public void setEventedValue(int instanceID,
                             EventedValue... ev)

    - #### setEventedValue

          public void setEventedValue(UnsignedIntegerFourBytes instanceID,
                             EventedValue... ev)

    - #### getInstanceIDs

          public UnsignedIntegerFourBytes[] getInstanceIDs()

    - #### getEventedValue

          public <EV extends EventedValue> EV getEventedValue(int instanceID,
                                                     Class<EV> type)

    - #### getEventedValue

          public <EV extends EventedValue> EV getEventedValue(UnsignedIntegerFourBytes id,
                                                     Class<EV> type)

    - #### fire

          public void fire(PropertyChangeSupport propertyChangeSupport)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.