blob: 5d34fc2647d5b375c9865c8810e9085bffedade3 [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 /**
28 * Signifies that the traffic should be modified in some way.
29 */
30 MODIFICATION
31 }
32
33 // TODO: Create factory class 'Instructions' that will have various factory
34 // to create specific instructions.
35
alshabib1d4cace2014-09-13 19:16:26 -070036 /**
alshabib89e43ef2014-09-16 10:36:34 -070037 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070038 * @return type of instruction
39 */
40 public Type type();
41
tom8bb16062014-09-12 14:47:46 -070042}