Package com.gurock.smartinspect
Class FilterEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.gurock.smartinspect.FilterEvent
-
- All Implemented Interfaces:
Serializable
public class FilterEvent extends EventObject
This class is used by the SmartInspectListener.onFilter event of the SmartInspect class.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.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description FilterEvent(Object source, Packet packet)Creates and initializes a FilterEvent instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCancel()Indicates if processing of the current packet should be cancelled or not.PacketgetPacket()Returns the packet which caused the event.voidsetCancel(boolean cancel)This method can be used to cancel the processing of certain packets during the SmartInspectListener.onFilter event of the SmartInspect class.-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Method Detail
-
getPacket
public Packet getPacket()
Returns the packet which caused the event.- Returns:
- The packet which caused the event.
-
getCancel
public boolean getCancel()
Indicates if processing of the current packet should be cancelled or not.For more information, please refer to the documentation of the setCancel method or the SmartInspectListener.onFilter event of the SmartInspect class.
- Returns:
- True if processing of the current packet should be cancelled and false otherwise.
-
setCancel
public 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. For more information on how to use this method, please refer to the SmartInspectListener.onFilter event documentation.- Parameters:
cancel- Specifies if processing of the current packet should be cancelled or not.
-
-