Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.flowmanager; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
Ray Milkey | 42ae1b5 | 2014-08-15 16:37:06 -0700 | [diff] [blame^] | 5 | import net.onrc.onos.core.matchaction.MatchActionOperations; |
Toshio Koide | d8b077a | 2014-08-13 10:47:21 -0700 | [diff] [blame] | 6 | import net.onrc.onos.core.matchaction.action.Action; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 7 | import net.onrc.onos.core.matchaction.match.PacketMatch; |
| 8 | import net.onrc.onos.core.util.PortNumber; |
| 9 | |
| 10 | /** |
| 11 | * IFlow object representing a packet path. |
| 12 | * <p> |
| 13 | * TODO: Think this: Do we need a bandwidth constraint? |
| 14 | */ |
| 15 | public class PacketPathFlow extends PathFlow { |
| 16 | private int hardTimeout; |
| 17 | private int idleTimeout; |
| 18 | |
| 19 | /** |
| 20 | * Constructor. |
| 21 | * |
| 22 | * @param id ID for this new IFlow object. |
| 23 | * @param match Match object at the source node of the path. |
| 24 | * @param inPort Ingress port number at the ingress edge node. |
| 25 | * @param path Path between ingress and egress edge node. |
Toshio Koide | d8b077a | 2014-08-13 10:47:21 -0700 | [diff] [blame] | 26 | * @param edgeActions The list of Action objects at the egress edge node. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 27 | * @param hardTimeout hard-timeout value. |
| 28 | * @param idleTimeout idle-timeout value. |
| 29 | */ |
| 30 | public PacketPathFlow(String id, |
Toshio Koide | d8b077a | 2014-08-13 10:47:21 -0700 | [diff] [blame] | 31 | PacketMatch match, PortNumber inPort, Path path, List<Action> edgeActions, |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 32 | int hardTimeout, int idleTimeout) { |
| 33 | super(id, match, inPort, path, edgeActions); |
| 34 | this.hardTimeout = hardTimeout; |
| 35 | this.idleTimeout = idleTimeout; |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Gets idle-timeout value. |
| 40 | * |
| 41 | * @return Idle-timeout value (seconds) |
| 42 | */ |
| 43 | public int getIdleTimeout() { |
| 44 | return idleTimeout; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Gets hard-timeout value. |
| 49 | * |
| 50 | * @return Hard-timeout value (seconds) |
| 51 | */ |
| 52 | public int getHardTimeout() { |
| 53 | return hardTimeout; |
| 54 | } |
| 55 | |
| 56 | @Override |
Ray Milkey | 42ae1b5 | 2014-08-15 16:37:06 -0700 | [diff] [blame^] | 57 | public MatchActionOperations compile() { |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 58 | // TODO Auto-generated method stub |
| 59 | return super.compile(); |
| 60 | } |
| 61 | } |