Search in sources :

Example 36 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 37 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) FixedRecvByteBufAllocator(io.netty.channel.FixedRecvByteBufAllocator)

Example 38 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) Properties(java.util.Properties)

Example 39 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry)

Example 40 with JndiRegistry

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;
}
Also used : JndiRegistry(org.apache.camel.impl.JndiRegistry) HashMap(java.util.HashMap) TestSerializableObject(org.apache.camel.component.rabbitmq.testbeans.TestSerializableObject) TestNonSerializableObject(org.apache.camel.component.rabbitmq.testbeans.TestNonSerializableObject) TestPartiallySerializableObject(org.apache.camel.component.rabbitmq.testbeans.TestPartiallySerializableObject)

Aggregations

JndiRegistry (org.apache.camel.impl.JndiRegistry)608 SSLContextParameters (org.apache.camel.util.jsse.SSLContextParameters)19 HttpUrlRewrite (org.apache.camel.component.urlrewrite.HttpUrlRewrite)18 KeyStoreParameters (org.apache.camel.util.jsse.KeyStoreParameters)17 DeadLetterChannelBuilder (org.apache.camel.builder.DeadLetterChannelBuilder)16 Properties (java.util.Properties)15 Test (org.junit.Test)14 TrustManagersParameters (org.apache.camel.util.jsse.TrustManagersParameters)13 ArrayList (java.util.ArrayList)11 KeyManagersParameters (org.apache.camel.util.jsse.KeyManagersParameters)11 EmbeddedDatabaseBuilder (org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)11 File (java.io.File)10 RouteBuilder (org.apache.camel.builder.RouteBuilder)8 ExchangeCookieHandler (org.apache.camel.http.common.cookie.ExchangeCookieHandler)8 InstanceCookieHandler (org.apache.camel.http.common.cookie.InstanceCookieHandler)8 CamelContext (org.apache.camel.CamelContext)6 MockEndpoint (org.apache.camel.component.mock.MockEndpoint)6 BookCatalog (org.apache.camel.component.routebox.demo.BookCatalog)5 SimpleRouteBuilder (org.apache.camel.component.routebox.demo.SimpleRouteBuilder)5 DefaultCamelContext (org.apache.camel.impl.DefaultCamelContext)5