com.lafaspot.icap.client.IcapClientInitializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icapclient Show documentation
Show all versions of icapclient Show documentation
Icap client to talk to Symantec server.
/**
*
*/
package com.lafaspot.icap.client;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.bytes.ByteArrayEncoder;
import io.netty.handler.codec.string.StringEncoder;
/**
* The client initilaized, setup the static encoder/decoders.
*
* @author kraman
*
*/
public class IcapClientInitializer extends ChannelInitializer {
/** String encoder to encode HTTP/ICAP headers. */
private static final StringEncoder STRING_ENCODER = new StringEncoder();
/** Byte encoder to encode ICAP attachment payload. */
private static final ByteArrayEncoder BYTE_ENCODER = new ByteArrayEncoder();
@Override
protected void initChannel(final SocketChannel ch) throws Exception {
ch.pipeline().addLast(STRING_ENCODER);
ch.pipeline().addLast(BYTE_ENCODER);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy