more of internal flow mode stats
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / statistics / ofpspecific / MessageSpy.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.api.openflow.statistics.ofpspecific;
10
11 /**
12  * Created by Martin Bobak <mbobak@cisco.com> on 20.4.2015.
13  */
14 public interface MessageSpy<M> extends Runnable {
15
16     /**
17      * statistic groups overall in OFPlugin
18      */
19     enum STATISTIC_GROUP {
20         /**
21          * message from switch
22          */
23         FROM_SWITCH,
24         /**
25          * message from switch translated successfully - source
26          */
27         FROM_SWITCH_TRANSLATE_IN_SUCCESS,
28         /**
29          * message from switch translated successfully - target
30          */
31         FROM_SWITCH_TRANSLATE_OUT_SUCCESS,
32         /**
33          * message from switch where translation failed - source
34          */
35         FROM_SWITCH_TRANSLATE_SRC_FAILURE,
36         /**
37          * message from switch finally published into MD-SAL
38          */
39         FROM_SWITCH_PUBLISHED_SUCCESS,
40         /**
41          * message from switch - publishing into MD-SAL failed
42          */
43         FROM_SWITCH_PUBLISHED_FAILURE,
44
45         /**
46          * message from MD-SAL entered service - first point of encounter
47          */
48         TO_SWITCH_ENTERED,
49         /**
50          * message from MD-SAL was disregarded (e.g. outstanding requests limit reached).
51          */
52         TO_SWITCH_DISREGARDED,
53         /**
54          * message from MD-SAL to switch - ready to sent to OFJava (might be one-to-multiple ration between entered and sent)
55          */
56         TO_SWITCH_READY_FOR_SUBMIT,
57         /**
58          * message from MD-SAL to switch - sent to OFJava successfully
59          */
60         TO_SWITCH_SUBMIT_SUCCESS,
61         /**
62          * message from MD-SAL to switch - sent to OFJava successfully, no response expected
63          */
64         TO_SWITCH_SUBMIT_SUCCESS_NO_RESPONSE,
65         /**
66          * message from MD-SAL to switch - sent to OFJava but failed
67          */
68         TO_SWITCH_SUBMIT_FAILURE,
69         /**
70          * message from MD-SAL to switch - sent to OFJava but failed with exception
71          */
72         TO_SWITCH_SUBMIT_ERROR
73     }
74
75     /**
76      * @param message   from switch or to switch - depends on statGroup
77      * @param statGroup
78      */
79     void spyMessage(M message, STATISTIC_GROUP statGroup);
80 }