BUG-58: refactor to take advantage of netty
[bgpcep.git] / pcep / api / src / main / java / org / opendaylight / protocol / pcep / PCEPSessionListener.java
index a0506099f111c842adf04249b9f2cc558c6b205c..be42b4372d3f8e1b3509b6dc5426e63dd18f7484 100644 (file)
@@ -8,47 +8,10 @@
 package org.opendaylight.protocol.pcep;
 
 import org.opendaylight.protocol.framework.SessionListener;
-import org.opendaylight.protocol.framework.TerminationReason;
-import org.opendaylight.protocol.pcep.object.PCEPOpenObject;
 
 /**
  * Listener that receives session informations from the session.
  */
-public abstract class PCEPSessionListener implements SessionListener {
+public interface PCEPSessionListener extends SessionListener<PCEPMessage, PCEPSession, PCEPTerminationReason> {
 
-       /**
-        * Fired when a message is received.
-        * 
-        * @param session session which received the message
-        * @param message PCEPMessage
-        */
-       public abstract void onMessage(PCEPSession session, PCEPMessage message);
-
-       /**
-        * Fired when the session is in state UP.
-        * 
-        * @param session Session which went up
-        * @param local Local open proposal which the peer accepted
-        * @param remote Peer open proposal which we accepted
-        */
-       public abstract void onSessionUp(PCEPSession session, PCEPOpenObject local, PCEPOpenObject remote);
-
-       /**
-        * Fired when the session went down as a result of peer's decision to tear it down. Implementation should take care
-        * of closing underlying session.
-        * 
-        * @param session Session which went down
-        * @param cause Reason for termination
-        * @param e exception that caused session down
-        */
-       public abstract void onSessionDown(PCEPSession session, TerminationReason cause, Exception e);
-
-       /**
-        * Fired when the session is terminated locally. The session has already been closed and transitioned to IDLE state.
-        * Any outstanding queued messages were not sent. The user should not attempt to make any use of the session.
-        * 
-        * @param session Session which went down
-        * @param cause the cause why the session went down
-        */
-       public abstract void onSessionTerminated(PCEPSession session, TerminationReason cause);
 }