BUG-5280: add AbstractClientConnection
[controller.git] / opendaylight / md-sal / cds-access-client / src / main / java / org / opendaylight / controller / cluster / access / client / SimpleReconnectForwarder.java
diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SimpleReconnectForwarder.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SimpleReconnectForwarder.java
new file mode 100644 (file)
index 0000000..a8ab7c4
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.controller.cluster.access.client;
+
+// Simple forwarder which just pushes the entry to the successor
+final class SimpleReconnectForwarder extends ReconnectForwarder {
+    SimpleReconnectForwarder(final AbstractReceivingClientConnection<?> successor) {
+        super(successor);
+    }
+
+    @Override
+    protected void forwardEntry(final ConnectionEntry entry) {
+        successor().enqueueEntry(entry);
+    }
+}