Class PayloadFilter
java.lang.Object
ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.SynchronousProcessor
netp.PayloadFilter
- All Implemented Interfaces:
ca.uqac.lif.cep.Contextualizable, ca.uqac.lif.cep.Duplicable, ca.uqac.lif.cep.DuplicableProcessor
public class PayloadFilter
extends ca.uqac.lif.cep.SynchronousProcessor
Discards packets from an input trace based on the content of its payload.
User can specify a byte[] or hex string as filter value, and only packets
containing that exact sequence of bytes pass through the filter.
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.uqac.lif.cep.SynchronousProcessor
ca.uqac.lif.cep.SynchronousProcessor.InputPushable, ca.uqac.lif.cep.SynchronousProcessor.OutputPullableNested classes/interfaces inherited from class ca.uqac.lif.cep.Processor
ca.uqac.lif.cep.Processor.InternalProcessorState -
Field Summary
Fields inherited from class ca.uqac.lif.cep.SynchronousProcessor
m_inputPushables, m_outputPullables, m_tempQueueFields inherited from class ca.uqac.lif.cep.Processor
m_context, m_hasBeenNotifiedOfEndOfTrace, m_inputArity, m_inputPullables, m_inputQueues, m_notifiedEndOfTraceDownstream, m_outputArity, m_outputPushables, m_outputQueues, MAX_PULL_RETRIES, s_versionString -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a default filter that allows all packets through -
Method Summary
Methods inherited from class ca.uqac.lif.cep.SynchronousProcessor
getPullableOutput, getPushableInputMethods inherited from class ca.uqac.lif.cep.Processor
allNotifiedEndOfTrace, allNull, copyInputQueue, copyOutputQueue, duplicate, duplicateInto, equals, getAt, getContext, getContext, getEmptyQueue, getId, getInputArity, getInputQueue, getInputType, getInputTypesFor, getOutputArity, getOutputQueue, getOutputType, getPullableInput, getPullableOutput, getPushableInput, getPushableOutput, hashCode, leftShift, newContext, onEndOfTrace, or, or, or, printState, readState, reset, rightShift, setContext, setContext, setPullableInput, setPushableOutput, start, startAll, stop, stopAll
-
Constructor Details
-
PayloadFilter
public PayloadFilter()Instantiates a default filter that allows all packets through
-
-
Method Details
-
setFilter
Sets the filter from a hex value in string form.- Parameters:
hex- Hex value of the filter (eg. "2D45")- Returns:
- true if string parsing was successful, false otherwise
-
setFilter
public boolean setFilter(byte[] filter) Sets the filter from a byte sequence.- Parameters:
filter- Byte sequence- Returns:
- true if the affectation was successful
-
compute
-
clone
-
duplicate
public ca.uqac.lif.cep.Processor duplicate(boolean with_state) - Specified by:
duplicatein interfaceca.uqac.lif.cep.Duplicable- Specified by:
duplicatein classca.uqac.lif.cep.Processor
-