Adding skipped packets analysis.
[pingpong.git] / Code / Projects / PacketLevelSignatureExtractor / src / main / java / edu / uci / iotproject / detection / ClusterMatcherObserver.java
1 package edu.uci.iotproject.detection;
2
3 import org.pcap4j.core.PcapPacket;
4
5 import java.util.List;
6
7 /**
8  * Interface used by client code to register for receiving a notification whenever an {@link AbstractClusterMatcher}
9  * detects traffic that matches an element of its associated cluster.
10  *
11  * @author Janus Varmarken {@literal <jvarmark@uci.edu>}
12  * @author Rahmadi Trimananda {@literal <rtrimana@uci.edu>}
13  */
14 public interface ClusterMatcherObserver {
15
16     /**
17      * Callback that is invoked by an {@link AbstractClusterMatcher} whenever it detects traffic that matches an element
18      * of its associated cluster.
19      *
20      * @param clusterMatcher The {@link AbstractClusterMatcher} that detected a match (i.e., classified traffic as
21      *                       pertaining to its associated cluster).
22      * @param match The traffic that was deemed to match the cluster associated with {@code clusterMatcher}.
23      * @param maxSkippedPackets Maximum number of skipped packets.
24      */
25     void onMatch(AbstractClusterMatcher clusterMatcher, List<PcapPacket> match, int maxSkippedPackets);
26
27 }