org.fourthline.cling.transport.impl

## Class RecoveringGENAEventProcessorImpl

- java.lang.Object
- - org.fourthline.cling.transport.impl.GENAEventProcessorImpl
  - - org.fourthline.cling.transport.impl.PullGENAEventProcessorImpl
    - - org.fourthline.cling.transport.impl.RecoveringGENAEventProcessorImpl

- All Implemented Interfaces:
    GENAEventProcessor, ErrorHandler

      @Alternative
      public class RecoveringGENAEventProcessorImpl
      extends PullGENAEventProcessorImpl

  Implementation based on the Xml Pull Parser XML processing API.

  This processor extends `PullGENAEventProcessorImpl`, it will always first try to read messages regularly with the superclass' methods before trying to recover from a failure.

  When the superclass can't read the message, this processor will try to recover from broken XML by for example, detecting wrongly encoded XML entities, and working around other vendor-specific bugs caused by incompatible UPnP stacks in the wild.

  This processor will also return partial results, if at least a single state variable value could be recovered from the (broken) event XML.

  Author:
    Michael Pujos

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RecoveringGENAEventProcessorImpl()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected String` | `fixXMLEncodedLastChange(String xml)`
    `void` | `readBody(IncomingEventRequestMessage requestMessage)` Transforms an XML message body and adds to a collection of `StateVariableValue`s..

    - ### Methods inherited from class org.fourthline.cling.transport.impl.PullGENAEventProcessorImpl

      `readProperties, readProperty`

    - ### Methods inherited from class org.fourthline.cling.transport.impl.GENAEventProcessorImpl

      `createDocumentBuilderFactory, error, fatalError, getMessageBody, getUnprefixedNodeName, readProperties, readPropertysetElement, toString, warning, writeBody, writeProperties, writePropertysetElement`

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

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

- - ### Constructor Detail

    - #### RecoveringGENAEventProcessorImpl

          public RecoveringGENAEventProcessorImpl()

  - ### Method Detail

    - #### readBody

          public void readBody(IncomingEventRequestMessage requestMessage)
                        throws UnsupportedDataException

      Description copied from interface: `GENAEventProcessor`
      Transforms an XML message body and adds to a collection of `StateVariableValue`s..
      Specified by:
        `readBody` in interface `GENAEventProcessor`
      Overrides:
        `readBody` in class `PullGENAEventProcessorImpl`
      Parameters:
        `requestMessage` - The message to transform.
      Throws:
        `UnsupportedDataException`

    - #### fixXMLEncodedLastChange

          protected String fixXMLEncodedLastChange(String xml)

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