Package ca.uqac.lif.cep.serialization
Class SerializeEvents<T>
- java.lang.Object
-
- ca.uqac.lif.cep.functions.Function
-
- ca.uqac.lif.cep.serialization.SerializeEvents<T>
-
- Type Parameters:
T
- The type of the serialized objects
- All Implemented Interfaces:
ca.uqac.lif.azrael.Printable
,ca.uqac.lif.azrael.Readable
,ca.uqac.lif.cep.Duplicable
,ca.uqac.lif.cep.functions.DuplicableFunction
- Direct Known Subclasses:
JsonSerialize
,JsonSerializeString
public class SerializeEvents<T> extends ca.uqac.lif.cep.functions.Function
Function that applies a serializer to its input argument. AnApplyFunction
that applies a serialization function will be depicted graphically by this pictogram:The picture represents an event that is "packed" into a box with a barcode, representing its serialized form.
- Author:
- Sylvain Hallé
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<T>
m_outputType
A reference to the class of the serialized objects.protected ca.uqac.lif.azrael.ObjectPrinter<T>
m_serializer
The serializer
-
Constructor Summary
Constructors Constructor Description SerializeEvents(ca.uqac.lif.azrael.ObjectPrinter<T> s, java.lang.Class<T> output_type)
Creates a new instance of the function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializeEvents<T>
duplicate(boolean with_state)
void
evaluate(java.lang.Object[] inputs, java.lang.Object[] outputs, ca.uqac.lif.cep.Context context, ca.uqac.lif.cep.EventTracker tracker)
int
getInputArity()
void
getInputTypesFor(java.util.Set<java.lang.Class<?>> classes, int index)
int
getOutputArity()
java.lang.Class<?>
getOutputTypeFor(int index)
void
reset()
-
-
-
Field Detail
-
m_serializer
protected transient ca.uqac.lif.azrael.ObjectPrinter<T> m_serializer
The serializer
-
m_outputType
protected final transient java.lang.Class<T> m_outputType
A reference to the class of the serialized objects. This is used ingetOutputTypeFor(int)
to return the output type for this processor.
-
-
Method Detail
-
evaluate
public void evaluate(java.lang.Object[] inputs, java.lang.Object[] outputs, ca.uqac.lif.cep.Context context, ca.uqac.lif.cep.EventTracker tracker)
- Specified by:
evaluate
in classca.uqac.lif.cep.functions.Function
-
getInputArity
public int getInputArity()
- Specified by:
getInputArity
in classca.uqac.lif.cep.functions.Function
-
getOutputArity
public int getOutputArity()
- Specified by:
getOutputArity
in classca.uqac.lif.cep.functions.Function
-
reset
public void reset()
- Overrides:
reset
in classca.uqac.lif.cep.functions.Function
-
duplicate
public SerializeEvents<T> duplicate(boolean with_state)
- Specified by:
duplicate
in interfaceca.uqac.lif.cep.Duplicable
- Specified by:
duplicate
in classca.uqac.lif.cep.functions.Function
-
getInputTypesFor
public void getInputTypesFor(java.util.Set<java.lang.Class<?>> classes, int index)
- Specified by:
getInputTypesFor
in classca.uqac.lif.cep.functions.Function
-
getOutputTypeFor
public java.lang.Class<?> getOutputTypeFor(int index)
- Specified by:
getOutputTypeFor
in classca.uqac.lif.cep.functions.Function
-
-