2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.openflowplugin.openflow.md.core.sal;
10 import java.util.concurrent.TimeUnit;
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.openflow.statistics.MessageSpy;
16 import org.opendaylight.yangtools.yang.binding.DataContainer;
18 import com.google.common.util.concurrent.ListeningExecutorService;
23 public class OFRpcTaskContext {
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;
34 * @return the messageService
36 public IMessageDispatchService getMessageService() {
37 return messageService;
40 * @param messageService the messageService to set
42 public void setMessageService(IMessageDispatchService messageService) {
43 this.messageService = messageService;
48 public SessionContext getSession() {
52 * @param session the session to set
54 public void setSession(SessionContext session) {
55 this.session = session;
58 * @return the rpcNotificationProviderService
60 public NotificationProviderService getRpcNotificationProviderService() {
61 return rpcNotificationProviderService;
64 * @param rpcNotificationProviderService the rpcNotificationProviderService to set
66 public void setRpcNotificationProviderService(
67 NotificationProviderService rpcNotificationProviderService) {
68 this.rpcNotificationProviderService = rpcNotificationProviderService;
71 * @return the maxTimeout
73 public long getMaxTimeout() {
77 * @param maxTimeout the maxTimeout to set
79 public void setMaxTimeout(long maxTimeout) {
80 this.maxTimeout = maxTimeout;
83 * @return the maxTimeoutUnit
85 public TimeUnit getMaxTimeoutUnit() {
86 return maxTimeoutUnit;
89 * @param maxTimeoutUnit the maxTimeoutUnit to set
91 public void setMaxTimeoutUnit(TimeUnit maxTimeoutUnit) {
92 this.maxTimeoutUnit = maxTimeoutUnit;
95 * @param rpcPool executor service pool for rpc
97 public void setRpcPool(ListeningExecutorService rpcPool) {
98 this.rpcPool = rpcPool;
102 * @return the rpcPool
104 public ListeningExecutorService getRpcPool() {
109 * @param messageSpy the message spy
111 public void setMessageSpy(MessageSpy<DataContainer> messageSpy) {
112 this.messageSpy = messageSpy;
115 * @return the messageSpy
117 public MessageSpy<DataContainer> getMessageSpy() {