blob: 084ffe467d42b5d32496f3f1f2b5958d3685c139 [file] [log] [blame]
Thomas Vachuska83e090e2014-10-22 14:25:35 -07001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
alshabib55a55d92014-09-16 11:59:31 -070019package org.onlab.onos.net.flow.instructions;
tom8bb16062014-09-12 14:47:46 -070020
21/**
22 * Abstraction of a single traffic treatment step.
23 */
alshabib030111e2014-09-15 15:56:42 -070024public interface Instruction {
tom8bb16062014-09-12 14:47:46 -070025
26 /**
27 * Represents the type of traffic treatment.
28 */
29 public enum Type {
30 /**
31 * Signifies that the traffic should be dropped.
32 */
33 DROP,
34
35 /**
36 * Signifies that the traffic should be output to a port.
37 */
38 OUTPUT,
39
40 /**
41 * Signifies that.... (do we need this?)
42 */
43 GROUP,
44
45 /**
alshabib35edb1a2014-09-16 17:44:44 -070046 * Signifies that the traffic should be modified in L2 way.
tom8bb16062014-09-12 14:47:46 -070047 */
alshabib35edb1a2014-09-16 17:44:44 -070048 L2MODIFICATION,
49
50 /**
51 * Signifies that the traffic should be modified in L3 way.
52 */
53 L3MODIFICATION
tom8bb16062014-09-12 14:47:46 -070054 }
55
56 // TODO: Create factory class 'Instructions' that will have various factory
57 // to create specific instructions.
58
alshabib1d4cace2014-09-13 19:16:26 -070059 /**
alshabib89e43ef2014-09-16 10:36:34 -070060 * Returns the type of instruction.
alshabib1d4cace2014-09-13 19:16:26 -070061 * @return type of instruction
62 */
63 public Type type();
64
tom8bb16062014-09-12 14:47:46 -070065}