use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class UnsharableCodecsConflictsTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry registry = super.createRegistry();
// we can share the decoder between multiple netty consumers, because they have the same configuration
// and we use a ChannelHandlerFactory
ChannelHandlerFactory decoder = ChannelHandlerFactories.newLengthFieldBasedFrameDecoder(1048576, 0, 4, 0, 4);
registry.bind("length-decoder", decoder);
registry.bind("length-decoder2", decoder);
return registry;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class NettyUDPMessageLargerThanDefaultBufferSizeTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
FixedRecvByteBufAllocator fixedRecvByteBufAllocator = new FixedRecvByteBufAllocator(4096);
jndi.bind(ChannelOption.RCVBUF_ALLOCATOR.name(), fixedRecvByteBufAllocator);
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class BaseNettyTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
Properties prop = new Properties();
prop.setProperty("port", "" + getPort());
jndi.bind("prop", prop);
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class NettyCustomCodecTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
jndi.bind("myCustomDecoder", MyCustomCodec.createMyCustomDecoder());
jndi.bind("myCustomDecoder2", MyCustomCodec.createMyCustomDecoder2());
jndi.bind("myCustomEncoder", MyCustomCodec.createMyCustomEncoder());
return jndi;
}
use of org.apache.camel.impl.JndiRegistry in project camel by apache.
the class RabbitMQInOutIntTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
HashMap<String, Object> queueArgs = new HashMap<>();
queueArgs.put("x-expires", 60000);
jndi.bind("queueArgs", queueArgs);
return jndi;
}
Aggregations