blob: 3c6bd6d3dbfd0271d653526935fc21794740f8ee [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.api.flowmanager;
2
3import java.util.List;
4
Ray Milkey42ae1b52014-08-15 16:37:06 -07005import net.onrc.onos.core.matchaction.MatchActionOperations;
Toshio Koided8b077a2014-08-13 10:47:21 -07006import net.onrc.onos.core.matchaction.action.Action;
Toshio Koidea03915e2014-07-01 18:39:52 -07007import net.onrc.onos.core.matchaction.match.PacketMatch;
8import 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 */
15public 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 Koided8b077a2014-08-13 10:47:21 -070026 * @param edgeActions The list of Action objects at the egress edge node.
Toshio Koidea03915e2014-07-01 18:39:52 -070027 * @param hardTimeout hard-timeout value.
28 * @param idleTimeout idle-timeout value.
29 */
30 public PacketPathFlow(String id,
Toshio Koided8b077a2014-08-13 10:47:21 -070031 PacketMatch match, PortNumber inPort, Path path, List<Action> edgeActions,
Toshio Koidea03915e2014-07-01 18:39:52 -070032 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 Milkey42ae1b52014-08-15 16:37:06 -070057 public MatchActionOperations compile() {
Toshio Koidea03915e2014-07-01 18:39:52 -070058 // TODO Auto-generated method stub
59 return super.compile();
60 }
61}