99330b087f03b078caea6b018caf887ea25befc3
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / lib / message / MonitorRequest.java
1 /*
2  * Copyright (C) 2013 EBay Software Foundation
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  * Authors : Ashwin Raveendran, Madhu Venugopal
9  */
10 package org.opendaylight.ovsdb.lib.message;
11
12 import com.fasterxml.jackson.annotation.JsonInclude;
13 import com.google.common.collect.Lists;
14
15 import java.util.List;
16
17 import org.opendaylight.ovsdb.lib.table.internal.Column;
18
19 @JsonInclude(JsonInclude.Include.NON_NULL)
20 public class MonitorRequest<E> {
21
22     //@JsonSerialize(contentAs = ToStringSerializer.class)
23     List<Column<E>> columns;
24
25     MonitorSelect select;
26
27     public List<? extends Column> getColumns() {
28         return columns;
29     }
30
31     public void setColumns(List<Column<E>> columns) {
32         this.columns = columns;
33     }
34
35
36     public MonitorSelect getSelect() {
37         return select;
38     }
39
40     public void setSelect(MonitorSelect select) {
41         this.select = select;
42     }
43
44     public MonitorRequest<E> column(Column<E> column) {
45         if (null == columns) {
46             columns = Lists.newArrayList();
47         }
48         columns.add(column);
49         return this;
50     }
51 }