Search in sources :

Example 1 with OslpDecoder

use of com.alliander.osgp.oslp.OslpDecoder in project Protocol-Adapter-OSLP by OSGP.

the class ApplicationContext method createPipeLine.

private ChannelPipeline createPipeLine() {
    final ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("oslpEncoder", new OslpEncoder());
    pipeline.addLast("oslpDecoder", new OslpDecoder(this.oslpSignature(), this.oslpSignatureProvider()));
    pipeline.addLast("oslpSecurity", this.oslpSecurityHandler());
    pipeline.addLast("oslpChannelHandler", this.oslpChannelHandler());
    return pipeline;
}
Also used : OslpDecoder(com.alliander.osgp.oslp.OslpDecoder) OslpEncoder(com.alliander.osgp.oslp.OslpEncoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Example 2 with OslpDecoder

use of com.alliander.osgp.oslp.OslpDecoder in project Protocol-Adapter-OSLP by OSGP.

the class OslpConfig method createChannelPipeline.

private ChannelPipeline createChannelPipeline(final ChannelHandler handler) throws ProtocolAdapterException {
    final ChannelPipeline pipeline = Channels.pipeline();
    pipeline.addLast("loggingHandler", new LoggingHandler(InternalLogLevel.INFO, false));
    pipeline.addLast("oslpEncoder", new OslpEncoder());
    pipeline.addLast("oslpDecoder", new OslpDecoder(this.oslpSignature(), this.oslpSignatureProvider()));
    pipeline.addLast("oslpSecurity", this.oslpSecurityHandler());
    pipeline.addLast("oslpChannelHandler", handler);
    return pipeline;
}
Also used : LoggingHandler(org.jboss.netty.handler.logging.LoggingHandler) OslpDecoder(com.alliander.osgp.oslp.OslpDecoder) OslpEncoder(com.alliander.osgp.oslp.OslpEncoder) ChannelPipeline(org.jboss.netty.channel.ChannelPipeline)

Aggregations

OslpDecoder (com.alliander.osgp.oslp.OslpDecoder)2 OslpEncoder (com.alliander.osgp.oslp.OslpEncoder)2 ChannelPipeline (org.jboss.netty.channel.ChannelPipeline)2 LoggingHandler (org.jboss.netty.handler.logging.LoggingHandler)1