e96da2bc26e8dc25e8d25ded505d3bb1a653c397
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / OFRpcTaskContext.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.core.sal;
9
10 import java.util.concurrent.TimeUnit;
11
12 import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
13 import org.opendaylight.openflowplugin.openflow.md.core.session.IMessageDispatchService;
14 import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
15
16 import com.google.common.util.concurrent.ListeningExecutorService;
17
18 /**
19  * 
20  */
21 public class OFRpcTaskContext {
22
23     private IMessageDispatchService messageService;
24     private SessionContext session;
25     private NotificationProviderService rpcNotificationProviderService;
26     private long maxTimeout;
27     private TimeUnit maxTimeoutUnit;
28     private ListeningExecutorService rpcPool;
29     
30     /**
31      * @return the messageService
32      */
33     public IMessageDispatchService getMessageService() {
34         return messageService;
35     }
36     /**
37      * @param messageService the messageService to set
38      */
39     public void setMessageService(IMessageDispatchService messageService) {
40         this.messageService = messageService;
41     }
42     /**
43      * @return the session
44      */
45     public SessionContext getSession() {
46         return session;
47     }
48     /**
49      * @param session the session to set
50      */
51     public void setSession(SessionContext session) {
52         this.session = session;
53     }
54     /**
55      * @return the rpcNotificationProviderService
56      */
57     public NotificationProviderService getRpcNotificationProviderService() {
58         return rpcNotificationProviderService;
59     }
60     /**
61      * @param rpcNotificationProviderService the rpcNotificationProviderService to set
62      */
63     public void setRpcNotificationProviderService(
64             NotificationProviderService rpcNotificationProviderService) {
65         this.rpcNotificationProviderService = rpcNotificationProviderService;
66     }
67     /**
68      * @return the maxTimeout
69      */
70     public long getMaxTimeout() {
71         return maxTimeout;
72     }
73     /**
74      * @param maxTimeout the maxTimeout to set
75      */
76     public void setMaxTimeout(long maxTimeout) {
77         this.maxTimeout = maxTimeout;
78     }
79     /**
80      * @return the maxTimeoutUnit
81      */
82     public TimeUnit getMaxTimeoutUnit() {
83         return maxTimeoutUnit;
84     }
85     /**
86      * @param maxTimeoutUnit the maxTimeoutUnit to set
87      */
88     public void setMaxTimeoutUnit(TimeUnit maxTimeoutUnit) {
89         this.maxTimeoutUnit = maxTimeoutUnit;
90     }
91     /**
92      * @param rpcPool
93      */
94     public void setRpcPool(ListeningExecutorService rpcPool) {
95         this.rpcPool = rpcPool;
96     }
97     
98     /**
99      * @return the rpcPool
100      */
101     public ListeningExecutorService getRpcPool() {
102         return rpcPool;
103     }
104 }