Package org.apache.tapestry5.internal.services

## Class ClientDataEncoderImpl

- java.lang.Object
- - org.apache.tapestry5.internal.services.ClientDataEncoderImpl

- All Implemented Interfaces:
    `ClientDataEncoder`

      public class ClientDataEncoderImpl
      extends Object
      implements ClientDataEncoder

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClientDataEncoderImpl​(URLEncoder urlEncoder, String passphrase, org.slf4j.Logger logger, String applicationPackageName, AlertManager alertManager)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ClientDataSink` | `createSink()` | Creates a sink for client data.
    `ObjectInputStream` | `decodeClientData​(String clientData)` | Decodes data previously obtained from `ClientDataSink.getClientData()`.
    `ObjectInputStream` | `decodeEncodedClientData​(String clientData)` | Decodes client data obtained via `ClientDataSink.getEncodedClientData()`.

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

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

- - ### Constructor Detail

    - #### ClientDataEncoderImpl

          public ClientDataEncoderImpl​(URLEncoder urlEncoder,
                                       @Symbol("tapestry.hmac-passphrase")
                                       String passphrase,
                                       org.slf4j.Logger logger,
                                       @Symbol("tapestry.app-package")
                                       String applicationPackageName,
                                       AlertManager alertManager)
                                throws UnsupportedEncodingException

      Throws:
        `UnsupportedEncodingException`

  - ### Method Detail

    - #### createSink

          public ClientDataSink createSink()

      Description copied from interface: `ClientDataEncoder`
      Creates a sink for client data. The sink provides an output stream and ultimately, a string representation of the data sent to the stream.
      Specified by:
        `createSink` in interface `ClientDataEncoder`
      Returns:
        a new sink

    - #### decodeClientData

          public ObjectInputStream decodeClientData​(String clientData)

      Description copied from interface: `ClientDataEncoder`
      Decodes data previously obtained from `ClientDataSink.getClientData()`.
      Specified by:
        `decodeClientData` in interface `ClientDataEncoder`
      Parameters:
        `clientData` - encoded client data
      Returns:
        stream of decoded data

    - #### decodeEncodedClientData

          public ObjectInputStream decodeEncodedClientData​(String clientData)
                                                    throws IOException

      Description copied from interface: `ClientDataEncoder`
      Decodes client data obtained via `ClientDataSink.getEncodedClientData()`.
      Specified by:
        `decodeEncodedClientData` in interface `ClientDataEncoder`
      Parameters:
        `clientData` - URLEncoded client data
      Returns:
        stream of objects
      Throws:
        `IOException` - if the client data has been corrupted (verified via the HMAC)