org.zbus.net.http.MessageServer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zbus Show documentation
Show all versions of zbus Show documentation
lightweight message queue, service bus
package org.zbus.net.http;
import java.util.List;
import org.zbus.net.CodecInitializer;
import org.zbus.net.IoDriver;
import org.zbus.net.tcp.TcpServer;
import io.netty.channel.ChannelHandler;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpServerCodec;
public class MessageServer extends TcpServer {
public MessageServer() {
this(null);
}
public MessageServer(final IoDriver driver) {
super(driver);
codec(new CodecInitializer() {
@Override
public void initPipeline(List p) {
p.add(new HttpServerCodec());
p.add(new HttpObjectAggregator(getIoDriver().getPackageSizeLimit()));
p.add(new MessageToHttpWsCodec());
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy