Java 类org.apache.camel.spi.ModelJAXBContextFactory 实例源码

项目:Camel    文件:CamelContextFactoryBeanTest.java   
public void testCustomModelJAXBContextFactory() throws Exception {
    StaticApplicationContext applicationContext = new StaticApplicationContext();
    applicationContext.registerSingleton("customModelJAXBContextFactory", CustomModelJAXBContextFactory.class);
    factory.setApplicationContext(applicationContext);
    factory.afterPropertiesSet();

    ModelJAXBContextFactory modelJAXBContextFactory = factory.getContext().getModelJAXBContextFactory();

    assertTrue(modelJAXBContextFactory instanceof CustomModelJAXBContextFactory);
}
项目:Camel    文件:MainSupport.java   
public ModelJAXBContextFactory getModelJAXBContextFactory() {
    return new DefaultModelJAXBContextFactory();
}
项目:Camel    文件:DefaultCamelContext.java   
public ModelJAXBContextFactory getModelJAXBContextFactory() {
    if (modelJAXBContextFactory == null) {
        modelJAXBContextFactory = new DefaultModelJAXBContextFactory();
    }
    return modelJAXBContextFactory;
}
项目:Camel    文件:DefaultCamelContext.java   
public void setModelJAXBContextFactory(final ModelJAXBContextFactory modelJAXBContextFactory) {
    this.modelJAXBContextFactory = modelJAXBContextFactory;
}
项目:Camel    文件:AbstractCamelContextFactoryBean.java   
private void setupCustomServices() {
    ModelJAXBContextFactory modelJAXBContextFactory = getBeanForType(ModelJAXBContextFactory.class);
    if (modelJAXBContextFactory != null) {
        LOG.info("Using custom ModelJAXBContextFactory: {}", modelJAXBContextFactory);
        getContext().setModelJAXBContextFactory(modelJAXBContextFactory);
    }
    ClassResolver classResolver = getBeanForType(ClassResolver.class);
    if (classResolver != null) {
        LOG.info("Using custom ClassResolver: {}", classResolver);
        getContext().setClassResolver(classResolver);
    }
    FactoryFinderResolver factoryFinderResolver = getBeanForType(FactoryFinderResolver.class);
    if (factoryFinderResolver != null) {
        LOG.info("Using custom FactoryFinderResolver: {}", factoryFinderResolver);
        getContext().setFactoryFinderResolver(factoryFinderResolver);
    }
    ExecutorServiceManager executorServiceStrategy = getBeanForType(ExecutorServiceManager.class);
    if (executorServiceStrategy != null) {
        LOG.info("Using custom ExecutorServiceStrategy: {}", executorServiceStrategy);
        getContext().setExecutorServiceManager(executorServiceStrategy);
    }
    ThreadPoolFactory threadPoolFactory = getBeanForType(ThreadPoolFactory.class);
    if (threadPoolFactory != null) {
        LOG.info("Using custom ThreadPoolFactory: {}", threadPoolFactory);
        getContext().getExecutorServiceManager().setThreadPoolFactory(threadPoolFactory);
    }
    ProcessorFactory processorFactory = getBeanForType(ProcessorFactory.class);
    if (processorFactory != null) {
        LOG.info("Using custom ProcessorFactory: {}", processorFactory);
        getContext().setProcessorFactory(processorFactory);
    }
    Debugger debugger = getBeanForType(Debugger.class);
    if (debugger != null) {
        LOG.info("Using custom Debugger: {}", debugger);
        getContext().setDebugger(debugger);
    }
    UuidGenerator uuidGenerator = getBeanForType(UuidGenerator.class);
    if (uuidGenerator != null) {
        LOG.info("Using custom UuidGenerator: {}", uuidGenerator);
        getContext().setUuidGenerator(uuidGenerator);
    }
    NodeIdFactory nodeIdFactory = getBeanForType(NodeIdFactory.class);
    if (nodeIdFactory != null) {
        LOG.info("Using custom NodeIdFactory: {}", nodeIdFactory);
        getContext().setNodeIdFactory(nodeIdFactory);
    }
    StreamCachingStrategy streamCachingStrategy = getBeanForType(StreamCachingStrategy.class);
    if (streamCachingStrategy != null) {
        LOG.info("Using custom StreamCachingStrategy: {}", streamCachingStrategy);
        getContext().setStreamCachingStrategy(streamCachingStrategy);
    }
    MessageHistoryFactory messageHistoryFactory = getBeanForType(MessageHistoryFactory.class);
    if (messageHistoryFactory != null) {
        LOG.info("Using custom MessageHistoryFactory: {}", messageHistoryFactory);
        getContext().setMessageHistoryFactory(messageHistoryFactory);
    }
}
项目:microservice-bundle    文件:ManagedCamelContext.java   
@Override
public ModelJAXBContextFactory getModelJAXBContextFactory() {
  return context.getModelJAXBContextFactory();
}
项目:microservice-bundle    文件:ManagedCamelContext.java   
@Override
public void setModelJAXBContextFactory(ModelJAXBContextFactory modelJAXBContextFactory) {
  context.setModelJAXBContextFactory(modelJAXBContextFactory);
}
项目:dropwizard-camel    文件:ManagedCamelContext.java   
@Override
public ModelJAXBContextFactory getModelJAXBContextFactory() {
    return context.getModelJAXBContextFactory();
}
项目:dropwizard-camel    文件:ManagedCamelContext.java   
@Override
public void setModelJAXBContextFactory(ModelJAXBContextFactory modelJAXBContextFactory) {
    context.setModelJAXBContextFactory(modelJAXBContextFactory);
}
项目:Camel    文件:CamelContext.java   
/**
 * Returns the JAXB Context factory used to create Models.
 *
 * @return the JAXB Context factory used to create Models.
 */
ModelJAXBContextFactory getModelJAXBContextFactory();
项目:Camel    文件:CamelContext.java   
/**
 * Sets a custom JAXB Context factory to be used
 *
 * @param modelJAXBContextFactory a JAXB Context factory
 */
void setModelJAXBContextFactory(ModelJAXBContextFactory modelJAXBContextFactory);