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 fromClientDataSink.getClientData()
.ObjectInputStream
decodeEncodedClientData(String clientData)
Decodes client data obtained viaClientDataSink.getEncodedClientData()
.
-
-
-
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 interfaceClientDataEncoder
- Returns:
- a new sink
-
decodeClientData
public ObjectInputStream decodeClientData(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 ObjectInputStream decodeEncodedClientData(String clientData) throws 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:
IOException
- if the client data has been corrupted (verified via the HMAC)
-
-