2 * Copyright (c) 2014 Pantheon Technologies s.r.o. 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.openflowjava.util;
11 import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdSerializerKey;
12 import org.opendaylight.openflowjava.protocol.api.keys.ExperimenterIdTypeSerializerKey;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.experimenter.core.ExperimenterDataOfChoice;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
18 * @author michal.polkorab
21 public abstract class ExperimenterSerializerKeyFactory {
24 * @param msgVersion openflow wire version
25 * @param experimenterId experimenter / vendor ID
26 * @param type experimenter type according to vendor implementation
27 * @return key instance
29 public static ExperimenterIdSerializerKey<ExperimenterDataOfChoice> createExperimenterMessageSerializerKey(
30 short msgVersion, long experimenterId, long type) {
31 return new ExperimenterIdTypeSerializerKey<>(msgVersion, experimenterId, type, ExperimenterDataOfChoice.class);
35 * @param msgVersion openflow wire version
36 * @param experimenterId experimenter / vendor ID
37 * @param type experimenter type according to vendor implementation
38 * @return key instance
40 public static ExperimenterIdSerializerKey<ExperimenterDataOfChoice> createMultipartRequestSerializerKey(
41 short msgVersion, long experimenterId, long type) {
42 return new ExperimenterIdTypeSerializerKey<>(msgVersion, experimenterId, type, ExperimenterDataOfChoice.class);
46 * @param msgVersion openflow wire version
47 * @param experimenterId experimenter / vendor ID
48 * @return key instance
50 public static ExperimenterIdSerializerKey<TableFeatureProperties> createMultipartRequestTFSerializerKey(
51 short msgVersion, long experimenterId) {
52 return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, TableFeatureProperties.class);
56 * @param msgVersion openflow wire version
57 * @param experimenterId experimenter / vendor ID
58 * @return key instance
60 public static ExperimenterIdSerializerKey<MeterBandExperimenterCase> createMeterBandSerializerKey(
61 short msgVersion, long experimenterId) {
62 return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, MeterBandExperimenterCase.class);