use of org.apache.felix.scr.annotations.Activate in project fabric8 by jboss-fuse.
the class ServletRegistrationHandler method activate.
@Activate
void activate(ComponentContext context, Map<String, ?> properties) {
try {
FabricDiscoveryServlet discoveryServlet = new FabricDiscoveryServlet();
discoveryServlet.setCurator(curator.get());
HttpContext base = httpService.get().createDefaultHttpContext();
httpService.get().registerServlet("/mq-discovery", discoveryServlet, createParams("mq-discovery"), base);
} catch (Throwable t) {
LOGGER.warn("Failed to register fabric maven proxy servlets, due to:" + t.getMessage());
}
activateComponent();
}
use of org.apache.felix.scr.annotations.Activate in project fabric8 by jboss-fuse.
the class KarafPropertiesService method activate.
@Activate
void activate(BundleContext bundleContext) {
propsProvider = new OSGiPropertiesProvider(bundleContext);
activateInternal();
activateComponent();
}
use of org.apache.felix.scr.annotations.Activate in project fabric8 by jboss-fuse.
the class ArchetypeServiceImpl method activate.
@Activate
void activate(Map<String, ?> configuration, ComponentContext componentContext) throws Exception {
if (mbeanServer != null) {
JMXUtils.registerMBean(this, mbeanServer, OBJECT_NAME);
}
activateComponent();
URL catalog = componentContext.getBundleContext().getBundle().getResource("archetype-catalog.xml");
Archetypes archetypes = (Archetypes) Archetypes.newUnmarshaller().unmarshal(new StreamSource(catalog.openStream()));
for (Archetype arch : archetypes.getArchetypes()) {
this.archetypes.put(String.format("%s:%s:%s", arch.groupId, arch.artifactId, arch.version), arch);
}
}
use of org.apache.felix.scr.annotations.Activate in project fabric8 by jboss-fuse.
the class ArchetypeWorkspace method activate.
@Activate
void activate() {
activateComponent();
bindCompleter(new FileCompleter(null));
}
use of org.apache.felix.scr.annotations.Activate in project fabric8 by jboss-fuse.
the class ArchetypeGenerate method activate.
@Activate
void activate() {
bindOptionalCompleter("-d", new FileCompleter(null));
activateComponent();
}
Aggregations