Fix various warnings
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / RequestContext.java
index e9468807208bec86cf6a739301c392b535841c84..0a8f44f8b5b7a736859acce677ee8ae5c2f0553c 100644 (file)
@@ -7,28 +7,24 @@
  */
 package org.opendaylight.openflowplugin.api.openflow.device;
 
+import javax.annotation.Nullable;
 
 /**
  * Request context handles all requests on device. Number of requests is limited by request quota. When this quota is
  * exceeded all rpc's will end up with exception.
- * <p/>
+ * <p>
  * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 25.2.2015.
  */
 public interface RequestContext<T> extends RequestFutureContext<T>, AutoCloseable {
-
     /**
-     * Returns xid generated for this request.
+     * Returns XID generated for this request.
      *
-     * @return
+     * @return Allocated XID, or null if the device has disconnected.
      */
-    Xid getXid();
+    @Nullable Xid getXid();
 
-    /**
-     * Sets xid generated for this request.
-     *
-     * @return
-     */
-    void setXid(Xid xid);
+    @Override
+    void close();
 
     /**
      * Returns request timeout value.
@@ -37,12 +33,8 @@ public interface RequestContext<T> extends RequestFutureContext<T>, AutoCloseabl
      */
     long getWaitTimeout();
 
-
     /**
      * Sets request timeout value.
-     *
-     * @return
      */
     void setWaitTimeout(long waitTimeout);
-
 }