Updating fix for bug 3989 based on discussion in OVSDB meeting
[ovsdb.git] / library / impl / src / main / java / org / opendaylight / ovsdb / lib / jsonrpc / JsonRpc10Request.java
1 /*
2  * Copyright (c) 2013, 2015 EBay Software Foundation 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.ovsdb.lib.jsonrpc;
10
11 import com.google.common.collect.Lists;
12
13 import java.util.List;
14
15 public class JsonRpc10Request {
16
17     String id;
18     String method;
19     List<Object> params = Lists.newArrayList();
20
21     public JsonRpc10Request(String id) {
22         setId(id);
23     }
24
25     public String getId() {
26         return id;
27     }
28
29     public void setId(String id) {
30         this.id = id;
31     }
32
33     public String getMethod() {
34         return method;
35     }
36
37     public void setMethod(String method) {
38         this.method = method;
39     }
40
41     public List<Object> getParams() {
42         return params;
43     }
44
45     public void setParams(List<Object> params) {
46         this.params = params;
47     }
48
49     public void setParams(Object[] pararms) {
50         this.params = Lists.newArrayList(pararms);
51     }
52
53     @Override
54     public String toString() {
55         return "JsonRpc10Request [id=" + id + ", method=" + method
56                 + ", params=" + params + "]";
57     }
58 }