2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.openflowplugin.api.openflow.statistics;
13 * ticket spy - aimed on collecting intel about tickets
14 * @param <M> type of watched message
17 public interface MessageSpy<M> extends Runnable {
20 * @param message content of ticket
22 void spyIn(M message);
25 * @param message content of ticket
27 void spyOut(M message);
30 // TODO: temporary solution, should be refactored and moved to managed bean
33 * statistic groups overall in OFPlugin
35 enum STATISTIC_GROUP {
36 /** message from switch, enqueued for processing */
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,
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
60 * @param message from switch or to switch - depends on statGroup
63 void spyMessage(M message, STATISTIC_GROUP statGroup);