Examples of OSGiModule


Examples of org.eclipse.sisu.peaberry.osgi.OSGiModule

   *
   * @param bundleContext current bundle context
   * @return OSGi specific Guice bindings
   */
  public static Module osgiModule(final BundleContext bundleContext) {
    return new OSGiModule(bundleContext);
  }
View Full Code Here

Examples of org.eclipse.sisu.peaberry.osgi.OSGiModule

   *
   * @since 1.1
   */
  public static Module osgiModule(final BundleContext bundleContext,
      final ServiceRegistry... registries) {
    return new OSGiModule(bundleContext, registries);
  }
View Full Code Here

Examples of org.eclipse.sisu.peaberry.osgi.OSGiModule

   * @return OSGi specific Guice bindings
   *
   * @since 1.3
   */
  public static Module osgiModule(final ServiceRegistry... registries) {
    return new OSGiModule(registries);
  }
View Full Code Here

Examples of org.jboss.as.osgi.parser.OSGiSubsystemState.OSGiModule

                        if (identifier == null)
                            throw ParseUtils.missingRequired(reader, Collections.singleton(Attribute.IDENTIFIER));
                        if (identifiers.contains(identifier))
                            throw new XMLStreamException(element.getLocalName() + " already declared", reader.getLocation());

                        subsystemState.addModule(new OSGiModule(identifier, start));
                        identifiers.add(identifier);

                        ParseUtils.requireNoContent(reader);
                    } else {
                        throw ParseUtils.unexpectedElement(reader);
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

            // Install a service that starts the bundles
            builder = serviceTarget.addService(Services.AUTOINSTALL_PROVIDER_COMPLETE, new AbstractService<Void>() {
                public void start(StartContext context) throws StartException {
                    for (ServiceName serviceName : pendingServices.keySet()) {
                        OSGiModule moduleMetaData = pendingServices.get(serviceName);
                        startBundle(serviceContainer, serviceName, moduleMetaData);
                    }
                    ROOT_LOGGER.debugf("Auto bundles bundles started");
                }
            });
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

    @Override
    protected void performRuntime(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException {
        String identifier = operation.get(ModelDescriptionConstants.OP_ADDR).asObject().get(CommonAttributes.MODULE).asString();

        SubsystemState stateService = (SubsystemState) context.getServiceRegistry(true).getRequiredService(SubsystemState.SERVICE_NAME).getValue();
        OSGiModule prevModule = stateService.removeModule(identifier);
        if (context.completeStep() == OperationContext.ResultAction.ROLLBACK) {
            stateService.addModule(prevModule);
        }
    }
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

        if (context.getType() == OperationContext.Type.SERVER) {
            context.addStep(new OperationStepHandler() {
                @Override
                public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
                    String identifier = operation.get(ModelDescriptionConstants.OP_ADDR).asObject().get(CommonAttributes.MODULE).asString();
                    OSGiModule module = new OSGiModule(ModuleIdentifier.fromString(identifier), startLevel);
                    SubsystemState stateService = (SubsystemState) context.getServiceRegistry(true).getRequiredService(SubsystemState.SERVICE_NAME).getValue();
                    stateService.addModule(module);

                    if (context.completeStep() == OperationContext.ResultAction.ROLLBACK) {
                        stateService.removeModule(identifier);
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

            ModelNode modules = operation.get(MODULES);
            Set<String> keys = modules.keys();
            if (keys != null) {
                for (String current : keys) {
                    String value = modules.get(current).get(START).asString();
                    subsystemState.addModule(new OSGiModule(ModuleIdentifier.fromString(current), Boolean.parseBoolean(value)));
                }
            }
        }

        return subsystemState;
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

            // Install a service that starts the bundles
            builder = serviceTarget.addService(ServiceNames.AUTOINSTALL_BUNDLES_COMPLETE, new AbstractService<Void>() {
                public void start(StartContext context) throws StartException {
                    for (ServiceName serviceName : pendingServices.keySet()) {
                        OSGiModule moduleMetaData = pendingServices.get(serviceName);
                        if (moduleMetaData.isStart()) {
                            @SuppressWarnings("unchecked")
                            ServiceController<Bundle> controller = (ServiceController<Bundle>) serviceContainer.getRequiredService(serviceName);
                            Bundle bundle = controller.getValue();
                            try {
                                bundle.start();
View Full Code Here

Examples of org.jboss.as.osgi.parser.SubsystemState.OSGiModule

            // Install a service that starts the bundles
            builder = serviceTarget.addService(Services.AUTOINSTALL_PROVIDER_COMPLETE, new AbstractService<Void>() {
                public void start(StartContext context) throws StartException {
                    for (ServiceName serviceName : pendingServices.keySet()) {
                        OSGiModule moduleMetaData = pendingServices.get(serviceName);
                        startBundle(serviceContainer, serviceName, moduleMetaData);
                    }
                    log.debugf("Auto bundles bundles started");
                }
            });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.