Merge "Refactoring: shortening of match methods"
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / translator / ExperimenterTranslator.java
1 /**
2  * Copyright (c) 2014 Ericsson India Global Services Pvt Ltd. 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.translator;
10
11 import java.util.Collections;
12 import java.util.List;
13 import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
14 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
15 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
18 import org.opendaylight.yangtools.yang.binding.DataObject;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
21
22 public class ExperimenterTranslator implements IMDMessageTranslator<OfHeader, List<DataObject>> {
23
24         private static final Logger LOG = LoggerFactory.getLogger(ExperimenterTranslator.class);
25
26         @Override
27         public List<DataObject> translate(SwitchConnectionDistinguisher cookie,
28                         SessionContext sc, OfHeader msg) {
29                 if( msg instanceof ExperimenterMessage) {
30                     // TODO - implement functionality to fully support Experimenter framework
31                     return null;
32                 }else {
33                         LOG.error( "Message is not of Experimenter Error Message " ) ;
34                         return Collections.emptyList();
35                 }
36         }
37
38
39 }