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.openflow.md.queue;
13 * ticket spy - aimed on collecting intel about tickets
14 * @param <MSG_TYPE> type of watched message
16 public interface MessageSpy<MSG_TYPE> extends Runnable {
19 * @param message content of ticket
21 void spyIn(MSG_TYPE message);
24 * @param message content of ticket
26 void spyOut(MSG_TYPE message);
29 // TODO: temporary solution, should be refactored and moved to managed bean
32 * statistic groups overall in OFPlugin
34 enum STATISTIC_GROUP {
35 /** message from switch, enqueued for processing */
37 /** message from switch translated successfully - source */
38 FROM_SWITCH_TRANSLATE_IN_SUCCESS,
39 /** message from switch translated successfully - target */
40 FROM_SWITCH_TRANSLATE_OUT_SUCCESS,
41 /** message from switch where translation failed - source */
42 FROM_SWITCH_TRANSLATE_SRC_FAILURE,
43 /** message from switch finally published into MD-SAL */
44 FROM_SWITCH_PUBLISHED_SUCCESS,
45 /** message from switch - publishing into MD-SAL failed */
46 FROM_SWITCH_PUBLISHED_FAILURE,
48 /** message from MD-SAL to switch via RPC enqueued */
49 TO_SWITCH_ENQUEUED_SUCCESS,
50 /** message from MD-SAL to switch via RPC NOT enqueued */
51 TO_SWITCH_ENQUEUED_FAILED,
52 /** message from MD-SAL to switch - sent to OFJava successfully */
53 TO_SWITCH_SUBMITTED_SUCCESS,
54 /** message from MD-SAL to switch - sent to OFJava but failed*/
55 TO_SWITCH_SUBMITTED_FAILURE
59 * @param message from switch or to switch - depends on statGroup
62 void spyMessage(MSG_TYPE message, STATISTIC_GROUP statGroup);