This interface is the NioInspector interface, classes which implement this
interface are expected to provide several services when a packet is passed to
their inspect method.
Primarily they are expected to provide the Unique Identifier for this
connection. As they are performing stateful inspection of the packets, This
class is in the best position to decide on a unique identifier for the
object. This string should be unique as it will be used by other services to
identify this connection. It is expected that this ID can change, however it
should be done seldomly if possible (e.g. have an initial ID and then create
a new one once enough packets to identify the sender have been received)
It is also expected to provide timeout functionality through its Timeout
method. When this method returns true, the connection will be timed out and
closed. This should be based on the amount of time since the last packet was
received in the Inspector.
They are expected to provide authentication through the use of the
. When each packet comes in they are to
inspect it and based on their rules reject the packet with this exception
closing the connection.
They are expected to provide filtering of packets if needed. This means that
some packets will be captured by this interface (by returning null). This way
packets can be prevented from reaching the service level.
They are expected to provide the ability to mangle packets if needed. This
means that packets when they come in can be manipulated and modified (perhaps
adding new data or totally changing it) and returning the modified objects to
be sent to the service.
- Trent Houliston