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