blob: a86b4d0bb8faf3c6ed4f7c58806a54b5e221e1c2 [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.core.matchaction.action;
2
3import 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 Koide7894ca02014-08-15 14:30:13 -07009 * MatchAction, Flow or Intent class.
Toshio Koidea03915e2014-07-01 18:39:52 -070010 */
Toshio Koided8b077a2014-08-13 10:47:21 -070011public class OutputAction implements Action {
Toshio Koidea03915e2014-07-01 18:39:52 -070012 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}