Package org.gatein.pc.portlet.state
Interface StateConverter
-
- All Known Implementing Classes:
StateConverterV0
public interface StateConverter- Version:
- $Revision: 5873 $
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <S extends Serializable>
Smarshall(org.gatein.pc.api.PortletStateType<S> stateType, PortletState state)Marshall the producer state as a byte array.<S extends Serializable>
PortletStateunmarshall(org.gatein.pc.api.PortletStateType<S> stateType, S marshalledState)Unmarshall the producer state from a byte array.
-
-
-
Method Detail
-
marshall
<S extends Serializable> S marshall(org.gatein.pc.api.PortletStateType<S> stateType, PortletState state) throws StateConversionException, IllegalArgumentException
Marshall the producer state as a byte array.- Parameters:
stateType- the state typestate- the producer state- Returns:
- the marshalled state
- Throws:
StateConversionException- if marshalling cannot be performedIllegalArgumentException- if the state is null
-
unmarshall
<S extends Serializable> PortletState unmarshall(org.gatein.pc.api.PortletStateType<S> stateType, S marshalledState) throws StateConversionException, IllegalArgumentException
Unmarshall the producer state from a byte array.- Parameters:
stateType- the state typemarshalledState- the marshalled state- Returns:
- the producer state
- Throws:
StateConversionException- if unmarshalling cannot be performedIllegalArgumentException- if the argument is null
-
-