public class FilterEvent extends EventObject
This class consists of only three class members. At first we have the getPacket method, which returns the packet which caused the event. Then there are the getCancel and setCancel methods which can be used to cancel the processing of certain packets. For more information, please refer to the SmartInspectListener.onFilter documentation.
This class is fully threadsafe.
source| Constructor and Description |
|---|
FilterEvent(Object source,
Packet packet)
Creates and initializes a FilterEvent instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCancel()
Indicates if processing of the current packet should be cancelled or not.
|
Packet |
getPacket()
Returns the packet which caused the event.
|
void |
setCancel(boolean cancel)
This method can be used to cancel the processing of certain
packets during the SmartInspectListener.onFilter event of the
SmartInspect class.
|
getSource, toStringpublic Packet getPacket()
public boolean getCancel()
For more information, please refer to the documentation of the setCancel method or the SmartInspectListener.onFilter event of the SmartInspect class.
public void setCancel(boolean cancel)
cancel - Specifies if processing of the current packet should be cancelled
or not.Copyright © 2023. All rights reserved.