blob: f05d238dee27d184a6bb984d325113a8fe76fd1e [file] [log] [blame]
alshabib55a55d92014-09-16 11:59:31 -07001package org.onlab.onos.net.flow.instructions;
tom8bb16062014-09-12 14:47:46 -07002
3/**
4 * Abstraction of a single traffic treatment step.
5 */
alshabib030111e2014-09-15 15:56:42 -07006public interface Instruction {
tom8bb16062014-09-12 14:47:46 -07007
8 /**
9 * Represents the type of traffic treatment.
10 */
11 public enum Type {
12 /**
13 * Signifies that the traffic should be dropped.
14 */
15 DROP,
16
17 /**
18 * Signifies that the traffic should be output to a port.
19 */
20 OUTPUT,
21
22 /**
23 * Signifies that.... (do we need this?)
24 */
25 GROUP,
26
27 /**
alshabib35edb1a2014-09-16 17:44:44 -070028 * Signifies that the traffic should be modified in L2 way.
tom8bb16062014-09-12 14:47:46 -070029 */
alshabib35edb1a2014-09-16 17:44:44 -070030 L2MODIFICATION,
31
32 /**
33 * Signifies that the traffic should be modified in L3 way.
34 */
35 L3MODIFICATION
tom8bb16062014-09-12 14:47:46 -070036 }
37
38 // TODO: Create factory class 'Instructions' that will have various factory
39 // to create specific instructions.
40
alshabib1d4cace2014-09-13 19:16:26 -070041 /**
alshabib89e43ef2014-09-16 10:36:34 -070042 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070043 * @return type of instruction
44 */
45 public Type type();
46
tom8bb16062014-09-12 14:47:46 -070047}