Squash more sonar warnings
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / PCEPSession.java
index 0dbeed907ab6081b748068ae1acdaf83ae240433..27516a85dc9d93ee08b87be490339315dcbdd6ac 100644 (file)
@@ -7,8 +7,13 @@
  */
 package org.opendaylight.protocol.pcep;
 
+import io.netty.util.concurrent.Future;
+
+import java.net.InetAddress;
+
 import org.opendaylight.protocol.framework.ProtocolSession;
-import org.opendaylight.protocol.pcep.object.PCEPCloseObject;
+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;
 
 /**
  * PCEP Session represents the finite state machine in PCEP, including timers and its purpose is to create a PCEP
@@ -16,7 +21,7 @@ import org.opendaylight.protocol.pcep.object.PCEPCloseObject;
  * 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 ProtocolSession<PCEPMessage> {
+public interface PCEPSession extends ProtocolSession<Message> {
 
        /**
         * Sends message from user to PCE/PCC. If the user sends an Open Message, the session returns an error (open message
@@ -24,8 +29,13 @@ public interface PCEPSession extends ProtocolSession<PCEPMessage> {
         * resources.
         * 
         * @param message message to be sent
+        * @return Future promise which will be succeed when the message is enqueued in the socket.
         */
-       public void sendMessage(PCEPMessage message);
+       Future<Void> sendMessage(Message message);
+
+       void close(TerminationReason reason);
+
+       Tlvs getRemoteTlvs();
 
-       public void close(PCEPCloseObject.Reason reason);
+       InetAddress getRemoteAddress();
 }