blob: 86aeca5c47ae50c6accf20daf7717f51a609b9cf [file] [log] [blame]
tom8bb16062014-09-12 14:47:46 -07001package org.onlab.onos.net.flow;
2
3/**
4 * Abstraction of a single traffic treatment step.
alshabib1d4cace2014-09-13 19:16:26 -07005 * @param <T> the type parameter for the instruction
tom8bb16062014-09-12 14:47:46 -07006 */
alshabib030111e2014-09-15 15:56:42 -07007public interface Instruction {
tom8bb16062014-09-12 14:47:46 -07008
9 /**
10 * Represents the type of traffic treatment.
11 */
12 public enum Type {
13 /**
14 * Signifies that the traffic should be dropped.
15 */
16 DROP,
17
18 /**
19 * Signifies that the traffic should be output to a port.
20 */
21 OUTPUT,
22
23 /**
24 * Signifies that.... (do we need this?)
25 */
26 GROUP,
27
28 /**
29 * Signifies that the traffic should be modified in some way.
30 */
31 MODIFICATION
32 }
33
34 // TODO: Create factory class 'Instructions' that will have various factory
35 // to create specific instructions.
36
alshabib1d4cace2014-09-13 19:16:26 -070037 /**
alshabib89e43ef2014-09-16 10:36:34 -070038 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070039 * @return type of instruction
40 */
41 public Type type();
42
tom8bb16062014-09-12 14:47:46 -070043}