BUG-58: refactor to take advantage of netty
[bgpcep.git] / bgp / parser-api / src / main / java / org / opendaylight / protocol / bgp / parser / BGPSessionListener.java
index 76f618b3391870c21aca61e253643f176b77f4ff..cc38f72dd81112ada6cc84f3cfba2bebf163cfee 100644 (file)
@@ -7,45 +7,11 @@
  */
 package org.opendaylight.protocol.bgp.parser;
 
-import java.util.Set;
-
-import org.opendaylight.protocol.bgp.concepts.BGPTableType;
-
 import org.opendaylight.protocol.framework.SessionListener;
 
 /**
  * Listener that receives session informations from the session.
  */
-public abstract class BGPSessionListener implements SessionListener {
-
-       /**
-        * Fired when an Update or a non-fatal Notification message is received.
-        * 
-        * @param message BGPMessage
-        */
-       public abstract void onMessage(BGPMessage message);
-
-       /**
-        * Fired when the session was established successfully.
-        * 
-        * @param remoteParams Peer address families which we accepted
-        */
-       public abstract void onSessionUp(Set<BGPTableType> remoteParams);
-
-       /**
-        * Fired when the session went down because of an IO error. Implementation should take care of closing underlying
-        * session.
-        * 
-        * @param session that went down
-        * @param e Exception that was thrown as the cause of session being down
-        */
-       public abstract void onSessionDown(BGPSession session, Exception e);
+public interface BGPSessionListener extends SessionListener<BGPMessage, BGPSession, BGPTerminationReason> {
 
-       /**
-        * 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 cause the cause why the session went down
-        */
-       public abstract void onSessionTerminated(BGPError cause);
 }