ad58e044a268eea1aa17e733ac3b4875057aa418
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / ForwardingPingPongDataBroker.java
1 /*
2  * Copyright (c) 2018 Red Hat, 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.impl;
9
10 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
11 import org.opendaylight.controller.md.sal.binding.api.ForwardingDataBroker;
12
13 /**
14  * Delegating {@link PingPongDataBroker} implementation.
15  * This is useful for simple strongly typed dependency injection.
16  *
17  * @author Michael Vorburger.ch
18  */
19 public class ForwardingPingPongDataBroker extends ForwardingDataBroker implements PingPongDataBroker {
20
21     private final DataBroker delegate;
22
23     public ForwardingPingPongDataBroker(DataBroker delegate) {
24         this.delegate = delegate;
25     }
26
27     @Override
28     protected DataBroker delegate() {
29         return delegate;
30     }
31 }