blob: 0eb5299fc49fe6774a8037b76d886f220a608924 [file] [log] [blame]
tom8bb16062014-09-12 14:47:46 -07001package org.onlab.onos.net.flow;
2
3import java.util.List;
4
5/**
6 * Abstraction of network traffic treatment.
7 */
8public interface TrafficTreatment {
9
10 /**
11 * Returns list of instructions on how to treat traffic.
12 *
13 * @return list of treatment instructions
14 */
15 List<Instruction> instructions();
16
17 /**
18 * Builder of traffic treatment entities.
19 */
20 public interface Builder {
21
22 /**
23 * Adds a traffic treatment instruction. If a same type instruction has
24 * already been added, it will be replaced by this one.
25 *
26 * @param instruction new instruction
27 */
28 void add(Instruction instruction);
29
30 /**
31 * Builds an immutable traffic treatment descriptor.
32 *
33 * @return traffic treatment
34 */
35 TrafficTreatment build();
36 }
37
38}