tidy up addFlow futures
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / DataCrateBuilder.java
1 /**
2  * Copyright (c) 2015 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 package org.opendaylight.openflowplugin.impl.services;
9
10 import org.opendaylight.openflowplugin.api.openflow.device.RequestContext;
11 import java.math.BigInteger;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowModInputBuilder;
13
14 public class DataCrateBuilder<T> {
15     BigInteger iDConnection;
16     RequestContext<T> requestContext;
17     FlowModInputBuilder flowModInputBuilder;
18
19     public DataCrateBuilder() {
20     }
21
22     public DataCrateBuilder<T> setFlowModInputBuilder(final FlowModInputBuilder flowModInputBuilder) {
23         this.flowModInputBuilder = flowModInputBuilder;
24         return this;
25     }
26
27     public DataCrateBuilder<T> setiDConnection(final BigInteger iDConnection) {
28         this.iDConnection = iDConnection;
29         return this;
30     }
31
32     public DataCrateBuilder<T> setRequestContext(final RequestContext<T> requestContext) {
33         this.requestContext = requestContext;
34         return this;
35     }
36
37     public static <T> DataCrateBuilder<T> builder() {
38         return new DataCrateBuilder<>();
39     }
40
41     public DataCrate<T> build() {
42         return new DataCrate<>(this);
43     }
44
45
46
47 }