tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net.flow; |
| 2 | |
| 3 | /** |
| 4 | * Abstraction of a single traffic treatment step. |
alshabib | 1d4cace | 2014-09-13 19:16:26 -0700 | [diff] [blame] | 5 | * @param <T> the type parameter for the instruction |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 6 | */ |
alshabib | 030111e | 2014-09-15 15:56:42 -0700 | [diff] [blame^] | 7 | public interface Instruction { |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 8 | |
| 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 | |
alshabib | 1d4cace | 2014-09-13 19:16:26 -0700 | [diff] [blame] | 37 | /** |
| 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 | |
tom | 8bb1606 | 2014-09-12 14:47:46 -0700 | [diff] [blame] | 44 | } |