Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.matchaction.action; |
| 2 | |
| 3 | import net.onrc.onos.core.util.PortNumber; |
| 4 | |
| 5 | /** |
| 6 | * An action object to output traffic to specified port. |
| 7 | * <p> |
| 8 | * This class does not have a switch ID. The switch ID is handled by |
Toshio Koide | 7894ca0 | 2014-08-15 14:30:13 -0700 | [diff] [blame] | 9 | * MatchAction, Flow or Intent class. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 10 | */ |
Toshio Koide | d8b077a | 2014-08-13 10:47:21 -0700 | [diff] [blame] | 11 | public class OutputAction implements Action { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 12 | protected PortNumber portNumber; |
| 13 | |
| 14 | /** |
| 15 | * Constructor. |
| 16 | * |
| 17 | * @param dstPort The port number of the target output port. |
| 18 | */ |
| 19 | public OutputAction(PortNumber dstPort) { |
| 20 | this.portNumber = dstPort; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Gets the port number of the target output port. |
| 25 | * |
| 26 | * @return The port number of the target output port. |
| 27 | */ |
| 28 | public PortNumber getPortNumber() { |
| 29 | return portNumber; |
| 30 | } |
| 31 | } |