Package org.emrys.webosgi.common

Examples of org.emrys.webosgi.common.ComActivator


    }
  }

  private ServletRequestAttributeListener[] findReqAttrListeners() {
    if (bundle != null) {
      ComActivator activator = FwkRuntime.getInstance()
          .getBundleActivator(bundle.getBundleId());
      if (activator instanceof WebComActivator) {
        List<ServletRequestAttributeListener> result = new ArrayList<ServletRequestAttributeListener>();
        Collection<ListenerInfo> listeners = ((WebComActivator) activator)
            .getBundleServletContext().getListeners();
View Full Code Here


    public void addingEntries(Bundle bundle, List<Bundle> entries) {
      if (!fwkRuntime.isFwkInited())
        return;
      if (bundle.getState() == Bundle.ACTIVE) {
        ComActivator activator = FwkRuntime.getInstance()
            .getBundleActivator(bundle.getBundleId());
        if (activator instanceof WebComActivator) {
          WebComActivator webActivator = (WebComActivator) activator;
          if (!webActivator.isWebServiceStarted()) {
            try {
View Full Code Here

      }
    }

    public void removingEntries(Bundle bundle, List<Bundle> entries) {
      if (bundle.getState() == Bundle.INSTALLED) {
        ComActivator activator = FwkRuntime.getInstance()
            .getBundleActivator(bundle.getBundleId());
        if (activator instanceof WebComActivator) {
          IOSGiWebContainer webContainer = fwkRuntime
              .getWebContainer();
          WebComActivator webActivator = (WebComActivator) activator;
View Full Code Here

    return fwkEarlyInitCompleted;
  }

  public IWebApplication getAppliction(Bundle wabundle) {
    // To adaptable with our former ComActivator mechanism.
    ComActivator activator = this
        .getBundleActivator(wabundle.getBundleId());
    if (activator instanceof IWebApplication)
      return (IWebApplication) activator;

    // Search applications registration.
View Full Code Here

      // getResource(path)
      Collection<ComActivator> activators = FwkRuntime.getInstance()
          .getAllComponentActivators();
      for (Iterator<ComActivator> it = activators.iterator(); it
          .hasNext();) {
        ComActivator activator = it.next();
        if (!(activator instanceof WebResComActivator)
            && activator instanceof WebComActivator) {
          WebComActivator webComActivator = ((WebComActivator) activator);
          String resPath = originalPath;
          if (originalPath.startsWith("/"
View Full Code Here

    // Open the switch of debug for all registered components.
    Collection<ComActivator> components = ComponentCore.getInstance()
        .getAllComponentActivators();
    for (Iterator<ComActivator> it = components.iterator(); it.hasNext();) {
      ComActivator activator = it.next();
      activator.setDebugging(openDebug);
    }

    // debugOptions.setDebugEnabled(openDebug);
  }
View Full Code Here

    int et = event.getType();
    Bundle bundle = event.getBundle();

    if (et == BundleEvent.STOPPED) {
      ComActivator activator = FwkRuntime.getInstance()
          .getBundleActivator(bundle.getBundleId());
      if (activator instanceof WebComActivator) {
        WebComActivator webActivator = (WebComActivator) activator;
        jeeContainer.unregServletContext(webActivator
            .getBundleServletContext());
        try {
          jeeContainer.refresh();
          FwkActivator.getInstance().log(
              "Removed web bundle service: "
                  + webActivator.getBundleSymbleName(), 0,
              false);
        } catch (Exception e) {
          // e.printStackTrace();
          FwkActivator.getInstance().log(e);
        }
      }
    }

    if (et == BundleEvent.STARTED) {
      ComActivator activator = FwkRuntime.getInstance()
          .getBundleActivator(bundle.getBundleId());
      if (activator instanceof WebComActivator) {
        WebComActivator webActivator = (WebComActivator) activator;
        if (!webActivator.isWebServiceStarted()) {
          try {
View Full Code Here

  public WabBundleClassLoader(IWABServletContext wabServletCtx,
      ClassLoader parentCL) {
    super(wabServletCtx.getBundle(), null, parentCL);
    this.wabServletCtx = wabServletCtx;
    // The OSGi specied WAB may have no Web ComActivator.
    ComActivator backingBundleActivator = ComponentCore.getInstance()
        .getBundleActivator(getBundle().getBundleId());
    if (backingBundleActivator != null)
      backingBundleCL = backingBundleActivator.getClass()
          .getClassLoader();
  }
View Full Code Here

TOP

Related Classes of org.emrys.webosgi.common.ComActivator

Copyright © 2018 www.massapicom. 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.