Search in sources :

Example 1 with ModuleContext

use of org.jboss.gravia.runtime.ModuleContext in project wildfly-camel by wildfly-extras.

the class ContextCreateHandlerRegistryService method start.

@Override
public void start(StartContext startContext) throws StartException {
    ServiceContainer serviceContainer = startContext.getController().getServiceContainer();
    createHandlerRegistry = new ContextCreateHandlerRegistryImpl(serviceContainer, startContext.getChildTarget());
    Runtime runtime = injectedRuntime.getValue();
    ModuleContext syscontext = runtime.getModuleContext();
    registration = syscontext.registerService(ContextCreateHandlerRegistry.class, createHandlerRegistry, null);
}
Also used : Runtime(org.jboss.gravia.runtime.Runtime) ServiceContainer(org.jboss.msc.service.ServiceContainer) ContextCreateHandlerRegistry(org.wildfly.extension.camel.ContextCreateHandlerRegistry) ModuleContext(org.jboss.gravia.runtime.ModuleContext)

Example 2 with ModuleContext

use of org.jboss.gravia.runtime.ModuleContext in project wildfly-camel by wildfly-extras.

the class CamelContextFactoryService method start.

@Override
public void start(StartContext startContext) throws StartException {
    contextFactory = new CamelContextFactoryImpl();
    // Register the service with gravia
    Runtime runtime = injectedRuntime.getValue();
    ModuleContext syscontext = runtime.getModuleContext();
    registration = syscontext.registerService(CamelContextFactory.class, contextFactory, null);
}
Also used : Runtime(org.jboss.gravia.runtime.Runtime) ModuleContext(org.jboss.gravia.runtime.ModuleContext) CamelContextFactory(org.wildfly.extension.camel.CamelContextFactory)

Example 3 with ModuleContext

use of org.jboss.gravia.runtime.ModuleContext in project wildfly-camel by wildfly-extras.

the class CamelUndertowHostService method start.

@Override
public void start(StartContext startContext) throws StartException {
    runtimeState.setHttpHost(getConnectionURL());
    eventListener = new CamelUndertowEventListener();
    injectedUndertowService.getValue().registerListener(eventListener);
    undertowHost = new WildFlyUndertowHost(injectedDefaultHost.getValue());
    ModuleContext syscontext = injectedRuntime.getValue().getModuleContext();
    registration = syscontext.registerService(UndertowHost.class, undertowHost, null);
}
Also used : ModuleContext(org.jboss.gravia.runtime.ModuleContext) UndertowHost(org.apache.camel.component.undertow.UndertowHost)

Example 4 with ModuleContext

use of org.jboss.gravia.runtime.ModuleContext in project wildfly-camel by wildfly-extras.

the class CamelContextRegistryService method start.

@Override
public void start(StartContext startContext) throws StartException {
    ContextCreateHandlerRegistry handlerRegistry = injectedHandlerRegistry.getValue();
    ServiceRegistry serviceRegistry = startContext.getController().getServiceContainer();
    contextRegistry = new CamelContextRegistryImpl(handlerRegistry, serviceRegistry, startContext.getChildTarget());
    // Register the service with gravia
    Runtime runtime = injectedRuntime.getValue();
    ModuleContext syscontext = runtime.getModuleContext();
    registration = syscontext.registerService(CamelContextRegistry.class, contextRegistry, null);
    for (final String name : subsystemState.getContextDefinitionNames()) {
        createCamelContext(name, subsystemState.getContextDefinition(name));
    }
}
Also used : Runtime(org.jboss.gravia.runtime.Runtime) ContextCreateHandlerRegistry(org.wildfly.extension.camel.ContextCreateHandlerRegistry) ModuleContext(org.jboss.gravia.runtime.ModuleContext) ServiceRegistry(org.jboss.msc.service.ServiceRegistry) CamelContextRegistry(org.wildfly.extension.camel.CamelContextRegistry) MutableCamelContextRegistry(org.wildfly.extension.camel.service.CamelContextRegistryService.MutableCamelContextRegistry)

Example 5 with ModuleContext

use of org.jboss.gravia.runtime.ModuleContext in project wildfly-camel by wildfly-extras.

the class UndertowHostService method start.

@Override
public void start(StartContext startContext) throws StartException {
    ModuleContext syscontext = injectedRuntime.getValue().getModuleContext();
    registration = syscontext.registerService(Host.class, injectedDefaultHost.getValue(), null);
}
Also used : ModuleContext(org.jboss.gravia.runtime.ModuleContext) Host(org.wildfly.extension.undertow.Host)

Aggregations

ModuleContext (org.jboss.gravia.runtime.ModuleContext)5 Runtime (org.jboss.gravia.runtime.Runtime)3 ContextCreateHandlerRegistry (org.wildfly.extension.camel.ContextCreateHandlerRegistry)2 UndertowHost (org.apache.camel.component.undertow.UndertowHost)1 ServiceContainer (org.jboss.msc.service.ServiceContainer)1 ServiceRegistry (org.jboss.msc.service.ServiceRegistry)1 CamelContextFactory (org.wildfly.extension.camel.CamelContextFactory)1 CamelContextRegistry (org.wildfly.extension.camel.CamelContextRegistry)1 MutableCamelContextRegistry (org.wildfly.extension.camel.service.CamelContextRegistryService.MutableCamelContextRegistry)1 Host (org.wildfly.extension.undertow.Host)1