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.core.sal.convertor.action;
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.InjectionResultTargetKey;
17 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ResultInjector;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetNwSrcActionCase;
23 public class ActionSetNwSrcReactor extends ConvertReactor<SetNwSrcActionCase> {
25 private static ActionSetNwSrcReactor INSTANCE = new ActionSetNwSrcReactor();
27 private ActionSetNwSrcReactor() {
34 public static ActionSetNwSrcReactor getInstance() {
39 protected void initMappings(final Map<Short, Convertor<SetNwSrcActionCase,?>> conversions,
40 final Map<InjectionKey, ResultInjector<?,?>> injections) {
41 ActionSetNwSrcReactorMappingFactory.addSetNwSrcConvertors(conversions);
42 ActionSetNwSrcReactorMappingFactory.addSetNwSrcInjectors(injections);
46 protected InjectionKey buildInjectionKey(final short version,
47 final Object convertedItem, final Object target) {
48 InjectionResultTargetKey key = null;
49 if (convertedItem != null) {
50 key = new InjectionResultTargetKey(version, target.getClass(), convertedItem.getClass());