summaryrefslogtreecommitdiffstats
path: root/netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2023-01-05 09:31:25 -0500
committerDan Timoney <dtimoney@att.com>2023-01-05 09:31:25 -0500
commitd4d6fbd430eb502cce6cb01a667ec799d487a510 (patch)
treeaea94837cd313f27f68e625d2b8277960fdf7af6 /netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java
parentd0508aaeb7af3f29095d1d0ef7dbf69af18f0d99 (diff)
Seed code for biermann restconf
Seed initial code from OpenDaylight netconf project for Biermann draft version of restconf API Issue-ID: CCSDK-3783 Signed-off-by: Dan Timoney <dtimoney@att.com> Change-Id: I8a1ad2050ee7addbb480f01bd448922803bff31f
Diffstat (limited to 'netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java')
-rw-r--r--netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java b/netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java
new file mode 100644
index 0000000..87e33b9
--- /dev/null
+++ b/netconf/restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/PutResult.java
@@ -0,0 +1,51 @@
+/*
+ * 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.netconf.sal.restconf.impl;
+
+import com.google.common.util.concurrent.FluentFuture;
+import javax.ws.rs.core.Response.Status;
+import org.opendaylight.mdsal.common.api.CommitInfo;
+
+/**
+ * Wrapper for status and future of PUT operation.
+ */
+public class PutResult {
+ private final Status status;
+ private final FluentFuture<? extends CommitInfo> future;
+
+ /**
+ * Wrap status and future by constructor - make this immutable.
+ *
+ * @param status
+ * status of operations
+ * @param future
+ * result of submit of PUT operation
+ */
+ public PutResult(final Status status, final FluentFuture<? extends CommitInfo> future) {
+ this.status = status;
+ this.future = future;
+ }
+
+ /**
+ * Get status.
+ *
+ * @return {@link Status} result
+ */
+ public Status getStatus() {
+ return this.status;
+ }
+
+ /**
+ * Get future.
+ *
+ * @return {@link FluentFuture} result
+ */
+ public FluentFuture<? extends CommitInfo> getFutureOfPutData() {
+ return this.future;
+ }
+}