9775d01afaab0279c020bfa1cbe5af5614efa397
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / match / MatchReactor.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.openflow.md.core.sal.convertor.match;
10
11 import java.util.Map;
12
13 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertReactor;
14 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.Convertor;
15 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.InjectionKey;
16 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ResultInjector;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.Match;
18
19 /**
20  *
21  */
22 public class MatchReactor extends ConvertReactor<Match> {
23
24     private static final MatchReactor INSTANCE = new MatchReactor();
25
26     private MatchReactor() {
27         //NOOP
28     }
29
30     /**
31      * @return singleton
32      */
33     public static MatchReactor getInstance() {
34         return INSTANCE;
35     }
36
37     @Override
38     protected void initMappings(final Map<Short, Convertor<Match,?>> conversions,
39             final Map<InjectionKey, ResultInjector<?,?>> injections) {
40         MatchReactorMappingFactory.addMatchConvertors(conversions);
41         MatchReactorMappingFactory.addMatchIjectors(injections);
42     }
43 }