Package org.osgi.framework

Examples of org.osgi.framework.ServiceReference


  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE);
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
View Full Code Here


  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE); //$NON-NLS-1$
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
View Full Code Here

        {
            try
            {
                if (resourcesService == null)
                {
                    ServiceReference serviceReference =
                        VersionActivator.bundleContext
                        .getServiceReference(
                                ResourceManagementService.class.getName());

                    if(serviceReference == null)
View Full Code Here

     */
    public TestFailSafeTransaction(String name)
    {
        super(name);
        BundleContext context = FileAccessServiceLick.bc;
        ServiceReference ref = context
                .getServiceReference(FileAccessService.class.getName());
        this.fileAccessService = (FileAccessService) context.getService(ref);
    }
View Full Code Here

    sb.append("<td width=\"100%\" colspan=3>");
    sb.append(fontify(e.getMessage()));
    sb.append("</td>");
    sb.append("</tr>");

    ServiceReference sr = e.getServiceReference();
    if (null!=sr) {
      sb.append("<tr bgcolor=\"#eeeeee\">");
      sb.append("<td width=\"100%\" colspan=\"3\">");
      sb.append(fontify("Service Properties"));
      sb.append("</td>");
      sb.append("</tr>");
      String[] propKeys = sr.getPropertyKeys();
      for (int i=0; i<propKeys.length; i++) {
        // Reuse service reference properties presentation form the
        // services tab.
        StringWriter sw = new StringWriter();
        PrintWriter  pr = new PrintWriter(sw);
        try {
          org.knopflerfish.bundle.desktop.swing.Util
            .printObject(pr, sr.getProperty(propKeys[i]));
        } catch (IOException ioe) {
        }

        sb.append("<tr>");
        sb.append("<td valign=top align=left>" +fontify(propKeys[i]) +"</td>");
View Full Code Here

    model.clear();
  }

  public void getAll() {
    for(Enumeration e = logReaders.keys(); e.hasMoreElements(); ) {
      ServiceReference sr = (ServiceReference)e.nextElement();
      LogReaderService lr = (LogReaderService)logReaders.get(sr);

      for(Enumeration e2 = lr.getLog(); e2.hasMoreElements(); ) {
        LogEntry entry = (LogEntry)e2.nextElement();
        logged(entry);
View Full Code Here

  public void close() {
    bc.removeServiceListener(this);

    for(Enumeration e = logReaders.keys(); e.hasMoreElements(); ) {
      ServiceReference sr = (ServiceReference)e.nextElement();
      serviceChanged(new ServiceEvent(ServiceEvent.UNREGISTERING, sr));
    }
    logReaders.clear();
  }
View Full Code Here

    }
    logReaders.clear();
  }

  public void serviceChanged(ServiceEvent ev) {
    ServiceReference sr = ev.getServiceReference();


    LogReaderService lr =
      logReaders.containsKey(sr)
      ? (LogReaderService)logReaders.get(sr)
View Full Code Here

  public String[] getPublishedServiceNames() {
    synchronized(soapServices) {
      Set names = new TreeSet();
      for(Iterator it = soapServices.keySet().iterator(); it.hasNext();) {
        ServiceReference sr          = (ServiceReference)it.next();
        SOAPService      soapService = (SOAPService)soapServices.get(sr);
        if(soapService.getDeployCount() > 0) {
          names.add(soapService.serviceName);
        }
      }
View Full Code Here

        Object[]          v          = (Object[])servletRegistrations.get(httpSR);
        Axis2Servlet      servlet    = (Axis2Servlet)v[1];       
        AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
       
        for(Iterator it = soapServices.keySet().iterator(); it.hasNext(); ) {           
          ServiceReference soapSR      = (ServiceReference)it.next();
          SOAPService      soapService = (SOAPService)soapServices.get(soapSR);
          soapService.undeploy(axisConfig);
        }
      } catch (Exception e) {
        log.warn("Failed to undeploy", e);
View Full Code Here

TOP

Related Classes of org.osgi.framework.ServiceReference

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.