本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}