Class ClientDataEncoderImpl
- java.lang.Object
-
- org.apache.tapestry5.internal.services.ClientDataEncoderImpl
-
- All Implemented Interfaces:
ClientDataEncoder
public class ClientDataEncoderImpl extends java.lang.Object implements ClientDataEncoder
-
-
Constructor Summary
Constructors Constructor Description ClientDataEncoderImpl(URLEncoder urlEncoder, java.lang.String passphrase, org.slf4j.Logger logger, java.lang.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.java.io.ObjectInputStream
decodeClientData(java.lang.String clientData)
Decodes data previously obtained fromClientDataSink.getClientData()
.java.io.ObjectInputStream
decodeEncodedClientData(java.lang.String clientData)
Decodes client data obtained viaClientDataSink.getEncodedClientData()
.
-
-
-
Constructor Detail
-
ClientDataEncoderImpl
public ClientDataEncoderImpl(URLEncoder urlEncoder, @Symbol("tapestry.hmac-passphrase") java.lang.String passphrase, org.slf4j.Logger logger, @Symbol("tapestry.app-package") java.lang.String applicationPackageName, AlertManager alertManager) throws java.io.UnsupportedEncodingException
- Throws:
java.io.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 interfaceClientDataEncoder
- Returns:
- a new sink
-
decodeClientData
public java.io.ObjectInputStream decodeClientData(java.lang.String clientData)
Description copied from interface:ClientDataEncoder
Decodes data previously obtained fromClientDataSink.getClientData()
.- Specified by:
decodeClientData
in interfaceClientDataEncoder
- Parameters:
clientData
- encoded client data- Returns:
- stream of decoded data
-
decodeEncodedClientData
public java.io.ObjectInputStream decodeEncodedClientData(java.lang.String clientData) throws java.io.IOException
Description copied from interface:ClientDataEncoder
Decodes client data obtained viaClientDataSink.getEncodedClientData()
.- Specified by:
decodeEncodedClientData
in interfaceClientDataEncoder
- Parameters:
clientData
- URLEncoded client data- Returns:
- stream of objects
- Throws:
java.io.IOException
- if the client data has been corrupted (verified via the HMAC)
-
-