当前位置: 首页>>代码示例>>Java>>正文


Java JndiRegistry.bind方法代码示例

本文整理汇总了Java中org.apache.camel.impl.JndiRegistry.bind方法的典型用法代码示例。如果您正苦于以下问题:Java JndiRegistry.bind方法的具体用法?Java JndiRegistry.bind怎么用?Java JndiRegistry.bind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.camel.impl.JndiRegistry的用法示例。


在下文中一共展示了JndiRegistry.bind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();

    // START SNIPPET: e1
    HL7MLLPNettyDecoderFactory decoder = new HL7MLLPNettyDecoderFactory();
    decoder.setCharset("iso-8859-1");
    decoder.setConvertLFtoCR(true);
    jndi.bind("hl7decoder", decoder);

    HL7MLLPNettyEncoderFactory encoder = new HL7MLLPNettyEncoderFactory();
    decoder.setCharset("iso-8859-1");
    decoder.setConvertLFtoCR(true);
    jndi.bind("hl7encoder", encoder);
    // END SNIPPET: e1

    return jndi;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:HL7MLLPNettyCodecTest.java

示例2: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    KeyStoreParameters ksp = new KeyStoreParameters();
    ksp.setResource(this.getClass().getClassLoader().getResource("jsse/localhost.ks").toString());
    ksp.setPassword(pwd);

    KeyManagersParameters kmp = new KeyManagersParameters();
    kmp.setKeyPassword(pwd);
    kmp.setKeyStore(ksp);

    //TrustManagersParameters tmp = new TrustManagersParameters();
    //tmp.setKeyStore(ksp);

    SSLContextParameters sslContextParameters = new SSLContextParameters();
    sslContextParameters.setKeyManagers(kmp);
    //sslContextParameters.setTrustManagers(tmp);

    JndiRegistry registry = super.createRegistry();
    registry.bind("sslContextParameters", sslContextParameters);

    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:23,代码来源:JettyHttpsProducerSslContextInUriTest.java

示例3: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    KeyStoreParameters ksp = new KeyStoreParameters();
    ksp.setResource(this.getClass().getClassLoader().getResource("jsse/localhost.ks").toString());
    ksp.setPassword(pwd);

    KeyManagersParameters kmp = new KeyManagersParameters();
    kmp.setKeyPassword(pwd);
    kmp.setKeyStore(ksp);

    SSLContextParameters sslContextParameters = new SSLContextParameters();
    sslContextParameters.setKeyManagers(kmp);

    JndiRegistry registry = super.createRegistry();
    registry.bind("sslContextParameters", sslContextParameters);

    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:19,代码来源:HttpsRouteSslContextParametersInUriTest.java

示例4: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    Map<String, Object> properties = new HashMap<>();
    properties.put("beanName", "my-bean");

    ComponentProxyComponent component = new ComponentProxyComponent("my-bean-proxy", "bean");
    component.setOptions(properties);

    JndiRegistry registry = super.createRegistry();
    registry.bind("my-bean", new MyBean());
    registry.bind(component.getComponentId() + "-component", component);

    return registry;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:15,代码来源:ComponentProxyComponentTest.java

示例5: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("my-bean", new ComponentProxyComponentTest.MyBean());

    return registry;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:8,代码来源:ComponentProxyRuntimeTest.java

示例6: main

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
/**
 * Application entry point
 * @param args application arguments
 * @throws Exception
 */
public static void main(String... args) throws Exception {
    JndiRegistry reg = new JndiRegistry(new JndiContext());

    reg.bind("sslContextParameters",sslParameters());

    CamelContext ctx = new DefaultCamelContext(reg);
    ctx.addRoutes(new WebsocketRouteNoSSL());
    ctx.setUseMDCLogging(true);
    ctx.setTracing(true);
    ctx.start();
}
 
开发者ID:IIlllII,项目名称:bitbreeds-webrtc,代码行数:17,代码来源:SimpleSignalingExample.java

示例7: main

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
/**
 * Application entry point
 * @param args application arguments
 * @throws Exception
 */
public static void main(String... args) throws Exception {

    JndiRegistry reg = new JndiRegistry(new JndiContext());

    reg.bind("sslContextParameters",sslParameters());

    CamelContext ctx = new DefaultCamelContext(reg);
    ctx.addRoutes(new WebsocketRouteNoSSL());
    ctx.setUseMDCLogging(true);
    ctx.setTracing(true);
    ctx.start();
}
 
开发者ID:IIlllII,项目名称:bitbreeds-webrtc,代码行数:18,代码来源:SimpleSignalingExample.java

示例8: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
public JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("jobLauncher", jobLauncher);
    registry.bind("alternativeJobLauncher", alternativeJobLauncher);
    registry.bind("mockJob", job);
    registry.bind("dynamicMockjob", dynamicMockjob);
    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:SpringBatchEndpointTest.java

示例9: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();

    HttpUrlRewrite myRewrite = new HttpUrlRewrite();
    myRewrite.setConfigFile("example/urlrewrite2.xml");

    jndi.bind("myRewrite", myRewrite);

    return jndi;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:12,代码来源:JettyUrlRewriteLoadBalanceFailoverTest.java

示例10: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("amazonSQSClient", new AmazonSQSClientMock());
    
    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:SqsComponentTest.java

示例11: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();

    registry.bind("privateKey", getBytesFromFile("./src/test/resources/id_rsa"));
    registry.bind("knownHosts", getBytesFromFile("./src/test/resources/known_hosts"));

    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:10,代码来源:SftpKeyConsumeTest.java

示例12: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = new JndiRegistry(createJndiContext());
    ConnectionCloseHeaderFilter connectionCloseFilterStrategy = new ConnectionCloseHeaderFilter();
    jndi.bind("myFilter", connectionCloseFilterStrategy);
    return jndi;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:HttpProducerConnectionCloseTest.java

示例13: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry jndi = super.createRegistry();
    testingCacheManagerFactory = new TestingCacheManagerFactory();
    jndi.bind("testCacheManagerFactory", testingCacheManagerFactory);
    return jndi;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:8,代码来源:CacheManagerFactoryRefTest.java

示例14: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    final JndiRegistry registry = super.createRegistry();
    registry.bind("activemq", activeMQComponent());
    return registry;
}
 
开发者ID:zapodot,项目名称:embedded-jms-junit,代码行数:7,代码来源:EmbeddedJmsRuleCamelTest.java

示例15: createRegistry

import org.apache.camel.impl.JndiRegistry; //导入方法依赖的package包/类
@Override
protected JndiRegistry createRegistry() throws Exception {
    JndiRegistry registry = super.createRegistry();
    registry.bind("cacheContainer", clusteredCacheContainers.get(0));
    return registry;
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:InfinispanClusterTestSupport.java


注:本文中的org.apache.camel.impl.JndiRegistry.bind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。