Mass replace CRLF->LF
[openflowjava.git] / util / src / main / java / org / opendaylight / openflowjava / util / ExperimenterSerializerKeyFactory.java
1 /*
2  * Copyright (c) 2014 Pantheon Technologies s.r.o. 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.openflowjava.util;
10
11 import org.opendaylight.openflowjava.protocol.api.keys.experimenter.ExperimenterIdSerializerKey;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterInput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.meter.band.header.meter.band.MeterBandExperimenterCase;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.request.multipart.request.body.MultipartRequestExperimenterCase;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.table.features.properties.grouping.TableFeatureProperties;
16
17 /**
18  * @author michal.polkorab
19  *
20  */
21 public abstract class ExperimenterSerializerKeyFactory {
22
23     /**
24      * @param msgVersion openflow wire version
25      * @param experimenterId experimenter / vendor ID
26      * @return key instance
27      */
28     public static ExperimenterIdSerializerKey<ExperimenterInput> createExperimenterMessageSerializerKey(
29             short msgVersion, Long experimenterId) {
30         return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, ExperimenterInput.class);
31     }
32
33     /**
34      * @param msgVersion openflow wire version
35      * @param experimenterId experimenter / vendor ID
36      * @return key instance
37      */
38     public static ExperimenterIdSerializerKey<MultipartRequestExperimenterCase> createMultipartRequestSerializerKey(
39             short msgVersion, Long experimenterId) {
40         return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, MultipartRequestExperimenterCase.class);
41     }
42
43     /**
44      * @param msgVersion openflow wire version
45      * @param experimenterId experimenter / vendor ID
46      * @return key instance
47      */
48     public static ExperimenterIdSerializerKey<TableFeatureProperties> createMultipartRequestTFSerializerKey(
49             short msgVersion, Long experimenterId) {
50         return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, TableFeatureProperties.class);
51     }
52
53     /**
54      * @param msgVersion openflow wire version
55      * @param experimenterId experimenter / vendor ID
56      * @return key instance
57      */
58     public static ExperimenterIdSerializerKey<MeterBandExperimenterCase> createMeterBandSerializerKey(
59             short msgVersion, Long experimenterId) {
60         return new ExperimenterIdSerializerKey<>(msgVersion, experimenterId, MeterBandExperimenterCase.class);
61     }
62 }