BUG-58: refactor to take advantage of netty
[bgpcep.git] / pcep / testtool / src / main / java / org / opendaylight / protocol / pcep / testtool / SimpleSessionListener.java
index c9c5cc3e8dae1397432999575ac85647fe468bed..153700b9b6d3aa5de4ceb8e1f27711c4fa0e6549 100644 (file)
@@ -10,18 +10,17 @@ package org.opendaylight.protocol.pcep.testtool;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.opendaylight.protocol.framework.TerminationReason;
 import org.opendaylight.protocol.pcep.PCEPMessage;
 import org.opendaylight.protocol.pcep.PCEPSession;
 import org.opendaylight.protocol.pcep.PCEPSessionListener;
-import org.opendaylight.protocol.pcep.object.PCEPOpenObject;
+import org.opendaylight.protocol.pcep.PCEPTerminationReason;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Simple Session Listener that is notified about messages and changes in the session.
  */
-public class SimpleSessionListener extends PCEPSessionListener {
+public class SimpleSessionListener implements PCEPSessionListener {
 
        public List<PCEPMessage> messages = new ArrayList<PCEPMessage>();
 
@@ -39,21 +38,21 @@ public class SimpleSessionListener extends PCEPSessionListener {
        }
 
        @Override
-       public void onSessionUp(final PCEPSession session, final PCEPOpenObject local, final PCEPOpenObject remote) {
+       public void onSessionUp(final PCEPSession session) {
                logger.debug("Session up.");
                this.up = true;
                // this.notifyAll();
        }
 
        @Override
-       public void onSessionDown(final PCEPSession session, final TerminationReason reason, final Exception e) {
-               logger.debug("Session down. Cause : {} or {}", reason, e);
+       public void onSessionDown(final PCEPSession session, final Exception e) {
+               logger.debug("Session down. Cause : {} or {}", e);
                this.up = false;
                // this.notifyAll();
        }
 
        @Override
-       public void onSessionTerminated(final PCEPSession session, final TerminationReason cause) {
+       public void onSessionTerminated(final PCEPSession session, final PCEPTerminationReason cause) {
                logger.debug("Session terminated. Cause : {}", cause);
        }
 }