blob: 0888d9b352c775644286ee5c23c3ebb366b4de98 [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 /**
38 * Returns the type of instruction not to be confused
39 * with the instruction's java type.
40 * @return type of instruction
41 */
42 public Type type();
43
tom8bb16062014-09-12 14:47:46 -070044}