Merge "Bug 7349 - Flow ID not updated in operational after removing and adding a...
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / statistics / MessageSpy.java
1 /**
2  * Copyright (c) 2013 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;
10
11
12 /**
13  * ticket spy - aimed on collecting intel about tickets 
14  * @param <M> type of watched message
15  */
16 @Deprecated
17 public interface MessageSpy<M> extends Runnable {
18
19     /**
20      * @param message content of ticket
21      */
22     void spyIn(M message);
23
24     /**
25      * @param message content of ticket
26      */
27     void spyOut(M message);
28     
29     
30     // TODO: temporary solution, should be refactored and moved to managed bean
31     
32     /**
33      * statistic groups overall in OFPlugin
34      */
35     enum STATISTIC_GROUP {
36         /** message from switch, enqueued for processing */
37         FROM_SWITCH_ENQUEUED,
38         /** message from switch translated successfully - source */
39         FROM_SWITCH_TRANSLATE_IN_SUCCESS,
40         /** message from switch translated successfully - target */
41         FROM_SWITCH_TRANSLATE_OUT_SUCCESS,
42         /** message from switch where translation failed - source */
43         FROM_SWITCH_TRANSLATE_SRC_FAILURE,
44         /** message from switch finally published into MD-SAL */
45         FROM_SWITCH_PUBLISHED_SUCCESS,
46         /** message from switch - publishing into MD-SAL failed */
47         FROM_SWITCH_PUBLISHED_FAILURE,
48         
49         /** message from MD-SAL to switch via RPC enqueued */
50         TO_SWITCH_ENQUEUED_SUCCESS,
51         /** message from MD-SAL to switch via RPC NOT enqueued */
52         TO_SWITCH_ENQUEUED_FAILED,
53         /** message from MD-SAL to switch - sent to OFJava successfully */
54         TO_SWITCH_SUBMITTED_SUCCESS,
55         /** message from MD-SAL to switch - sent to OFJava but failed*/
56         TO_SWITCH_SUBMITTED_FAILURE
57     }
58     
59     /**
60      * @param message from switch or to switch - depends on statGroup
61      * @param statGroup 
62      */
63     void spyMessage(M message, STATISTIC_GROUP statGroup);
64     }