public interface PacketFilterIfc
filter()
method for more details.
Created: Jun 8, 2009 1:29:49 PMModifier and Type | Method and Description |
---|---|
Packet |
filter(Packet packet)
This is the actual packet filtering method.
|
void |
getStatistics(StatisticsList list)
A filter may optionally return some processing statistics.
|
void |
init(String name,
QueueType qType)
The method initializes the filter.
|
void init(String name, QueueType qType)
name
- is a component name which loaded and initialized the filter. This is
the name of the component which uses the filter.qType
- is a packet queue type, differnt one for outgoing traffic and different
for incoming. A filter may want to treat the traffic differently depending on the
direction it flows.Packet filter(Packet packet)
Packet
as a result. It is normally recommended
not to modify the existing packet as it maybe processed simultanuously by other
components/threads at the same time. Modifying packet while it is being processed
may lead to unpredictable results. Therefore, if the filter wants to modify the
packet it should create a copy of the packet and return modified copy from
the method.
If the filter decided to block the packet it just has to return null. In most cases,
however the method returns the packet it received as a parameter to method call.packet
- for the filter processing.
Please note, the packet filtering may affect performance significantly therefore
this method should be carefully tested and optimized under a high load.void getStatistics(StatisticsList list)
list
- of statistics created by the master object. The packet instance should
add its statistics to the list.Copyright © 2017 "Tigase, Inc.". All rights reserved.