Examples of ServiceReference


Examples of org.osgi.framework.ServiceReference

    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

Examples of org.osgi.framework.ServiceReference

  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

Examples of org.osgi.framework.ServiceReference

    }
    logReaders.clear();
  }

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


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

Examples of org.osgi.framework.ServiceReference

  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

Examples of org.osgi.framework.ServiceReference

        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

Examples of org.osgi.framework.ServiceReference

   *               specifies the http server to remove the soap service from
   */
  void undeploySOAPServices(ServiceReference httpSR) {
    synchronized(soapServices) {
      for(Iterator it = soapServices.keySet().iterator(); it.hasNext();) {
        ServiceReference sr = (ServiceReference)it.next();
        SOAPService  soapService = (SOAPService)soapServices.get(sr);
        undeploySOAPService(soapService, httpSR);
      }
      soapServices.clear();
    }
View Full Code Here

Examples of org.osgi.framework.ServiceReference

    log.debug("undeploySOAPService " + soapService);
   
    synchronized(servletRegistrations) {
      for(Iterator it = servletRegistrations.keySet().iterator(); it.hasNext(); ) {
        try {
          ServiceReference sr      = (ServiceReference)it.next();
          if(httpSR == null || httpSR.equals(sr)) {
            Object[]         v       = (Object[])servletRegistrations.get(sr);
            Axis2Servlet     servlet = (Axis2Servlet)v[1];

            AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
View Full Code Here

Examples of org.osgi.framework.ServiceReference

    int count = 0;
    synchronized(servletRegistrations) {
     
      for(Iterator it = servletRegistrations.keySet().iterator(); it.hasNext(); ) {
        try {
          ServiceReference sr      = (ServiceReference)it.next();
          Object[]         v       = (Object[])servletRegistrations.get(sr);
          Axis2Servlet     servlet = (Axis2Servlet)v[1];
         
          AxisConfiguration axisConfig = servlet.getAxisConfigurator().getAxisConfiguration();
                   
View Full Code Here

Examples of org.osgi.framework.ServiceReference

      }
    }

    synchronized(soapServices) {
      for(Iterator it = soapServices.keySet().iterator(); it.hasNext();) {
        ServiceReference sr          = (ServiceReference)it.next();
        SOAPService      soapService = (SOAPService)soapServices.get(sr);
        String           name        = (String)sr.getProperty(Axis2Admin.SOAP_SERVICE_NAME);
        if(soapService.getDeployCount() > 0 && name.equals(serviceName)) {
          throw new IllegalArgumentException("Service '" + name + "' is already deployed");
        }
      }
    }
View Full Code Here

Examples of org.osgi.framework.ServiceReference

            }
        }
    }

    public void serviceChanged(ServiceEvent e) {
        ServiceReference sr = e.getServiceReference();
        if (isDevice.match(sr)) {
            switch (e.getType()) {
            case ServiceEvent.REGISTERED:
                info("device found, " + showDevice(sr));
                touchDevice(sr);
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.