fixing some spelling and formatting issues including a lot of trailing whitespace
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / queue / TicketImpl.java
1 /**
2  * Copyright (c) 2013 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.openflow.md.queue;
9
10 import java.util.List;
11
12 import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
13
14 import com.google.common.util.concurrent.SettableFuture;
15
16 /**
17  * @author mirehak
18  * @param <IN> source type
19  * @param <OUT> result type
20  *
21  */
22 public class TicketImpl<IN, OUT> implements Ticket<IN, OUT> {
23     
24     private IN message;
25     private ConnectionConductor conductor;
26     private SettableFuture<List<OUT>> future;
27     private Class<? extends IN> registeredMessageType;
28     
29     /**
30      * default ctor
31      */
32     public TicketImpl() {
33         future = SettableFuture.create();
34     }
35
36     @Override
37     public SettableFuture<List<OUT>> getResult() {
38         return future;
39     }
40
41     /**
42      * @return the message
43      */
44     @Override
45     public IN getMessage() {
46         return message;
47     }
48
49     /**
50      * @param message the message to set
51      */
52     public void setMessage(IN message) {
53         this.message = message;
54     }
55
56     /**
57      * @return the conductor
58      */
59     @Override
60     public ConnectionConductor getConductor() {
61         return conductor;
62     }
63
64     /**
65      * @param conductor the conductor to set
66      */
67     public void setConductor(ConnectionConductor conductor) {
68         this.conductor = conductor;
69     }
70
71     /**
72      * @param registeredMessageType
73      */
74     public void setRegisteredMessageType(
75             Class<? extends IN> registeredMessageType) {
76         this.registeredMessageType = registeredMessageType;
77     }
78
79     /**
80      * @return the registeredMessageType
81      */
82     @Override
83     public Class<? extends IN> getRegisteredMessageType() {
84         return registeredMessageType;
85     }
86 }