PCEP sucessfull connection now implemented. Fixed minor bug in parsing.
[bgpcep.git] / framework / src / main / java / org / opendaylight / protocol / framework / ProtocolHandlerFactory.java
index 1c3674dacad9f1d704f85580cd9c8c530486653d..e5b7382ba2688ff99d48b769b543d0cf333b8d69 100644 (file)
@@ -21,8 +21,19 @@ public class ProtocolHandlerFactory {
                this.decoder = new ProtocolMessageDecoder(msgFactory);
        }
 
-       public ChannelHandler[] getHandlers(final ProtocolSession session) {
-               return new ChannelHandler[] { this.encoder, new ProtocolSessionInboundHandler(session),
-                               new ProtocolSessionOutboundHandler(session), this.decoder };
+       public ChannelHandler getEncoder() {
+               return this.encoder;
+       }
+
+       public ChannelHandler getDecoder() {
+               return this.decoder;
+       }
+
+       public ChannelHandler getSessionInboundHandler(final ProtocolSession session) {
+               return new ProtocolSessionInboundHandler(session);
+       }
+
+       public ChannelHandler getSessionOutboundHandler() {
+               return new ProtocolSessionOutboundHandler();
        }
 }