Add new revision for pcep types model
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / PCEPSession.java
index 656daaf25a8cd1ed42eee1175ffeac3c716989e8..21815071b466567d8f2d7c20a9be3b13bca6a2bf 100644 (file)
@@ -9,9 +9,9 @@ package org.opendaylight.protocol.pcep;
 
 import io.netty.util.concurrent.Future;
 import java.net.InetAddress;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.stats.rev141006.PcepSessionState;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs;
+import javax.annotation.Nonnull;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Message;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.open.Tlvs;
 
 /**
  * PCEP Session represents the finite state machine in PCEP, including timers and its purpose is to create a PCEP
@@ -19,7 +19,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
  * manually. If the session is up, it has to redirect messages to/from user. Handles also malformed messages and unknown
  * requests.
  */
-public interface PCEPSession extends AutoCloseable, PcepSessionState {
+public interface PCEPSession extends PCEPSessionState, AutoCloseable {
 
     /**
      * Sends message from user to PCE/PCC. If the user sends an Open Message, the session returns an error (open message
@@ -33,15 +33,35 @@ public interface PCEPSession extends AutoCloseable, PcepSessionState {
 
     void close(TerminationReason reason);
 
+    /**
+     * Returns session characteristics of the remote PCEP Speaker.
+     *
+     * @return Open message TLVs
+     */
     Tlvs getRemoteTlvs();
 
+    /**
+     * Returns remote address.
+     *
+     * @return inet address
+     */
+    @Nonnull
     InetAddress getRemoteAddress();
 
-    void resetStats();
+    /**
+     * Returns session characteristics of the local PCEP Speaker.
+     *
+     * @return Open message TLVs
+     */
+    Tlvs getLocalTlvs();
 
     /**
-     * Returns session characteristics of the local PCEP Speaker
+     * Returns session characteristics of the local PCEP Speaker.
+     *
      * @return Open message TLVs
      */
-    Tlvs localSessionCharacteristics();
+    @Deprecated
+    default Tlvs localSessionCharacteristics() {
+        return getLocalTlvs();
+    }
 }