Examples of Service


Examples of org.apache.whirr.service.Service

   * @param serviceName
   * @return
   * @throws IllegalArgumentException if serviceName is not found
   */
  protected Service createService(String serviceName) {
    Service service = factory.create(serviceName);
    if (service == null) {
      throw new IllegalArgumentException("Unable to find service "
          + serviceName + ", exiting");
    }
    return service;
View Full Code Here

Examples of org.apache.woden.wsdl20.Service

                }
                return null;   // can't go any further without the wsdl
            }
            Service[] services = description.getServices();
            for (int i = 0; i < services.length; i++) {
                Service service = services[i];
                // set the serviceName on the parent to setup call to populateService
                serviceName = service.getName();
                this.axisService = new AxisService();
                    AxisService retAxisService = populateService();
                    if (retAxisService != null) {
                        axisServices.add(retAxisService);
                    } // end if axisService was returned
View Full Code Here

Examples of org.araneaframework.Service

    String rndString = RandomStringUtils.random(8, false, true);
    id = (id != null) ? new StringBuffer(id).append(rndString).toString() : rndString;
   
    BeanFactory factory = (BeanFactory) getEnvironment().getEntry(BeanFactory.class);
    // TODO:: some better way in framework?
    Service service = (Service) factory.getBean("servletServiceAdapterComponent");
   
    currentThreadCtx.addService(id, service);
   
    if (startMessage != null)
      startMessage.send(null, service);
View Full Code Here

Examples of org.candlepin.json.model.Service

    private Service createService(Pool pool) {
        if (pool.getProductAttributeValue("support_level") == null &&
            pool.getProductAttributeValue("support_type") == null) {
            return null;
        }
        Service toReturn = new Service();
        toReturn.setLevel(pool.getProductAttributeValue("support_level"));
        toReturn.setType(pool.getProductAttributeValue("support_type"));

        return toReturn;
    }
View Full Code Here

Examples of org.codehaus.activemq.service.Service

        // TODO we might not need to copy the collections, as maybe the List might not
        // throw concurrent modification exception? Couldn't tell from the docs
        // but I don't think it does

        for (Iterator iter = new ArrayList(networkConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        for (Iterator iter = new ArrayList(transportConnectors).iterator(); iter.hasNext();) {
            Service connector = (Service) iter.next();
            connector.start();
        }

        if (discoveryAgent != null) {
            discoveryAgent.start();
View Full Code Here

Examples of org.codehaus.xfire.service.Service

        {
            url = args[0];
        }
       
        XmlBeansServiceFactory xsf = new XmlBeansServiceFactory();
        Service serviceModel = xsf.create(OrderService.class);
       
        OrderService client =
            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
View Full Code Here

Examples of org.conventionsframework.qualifier.Service

      }
    }
  }

  private void initService(InjectionPoint ip) {
    Service paginatorService = ip.getAnnotated().getAnnotation(
        Service.class);
    try {
      if (!paginatorService.value().equals(BaseService.class)) {
        // set paginator service by type
        baseService = BeanManagerController
            .getBeanByType(paginatorService.value());
      }

    } catch (Exception ex) {
      ex.printStackTrace();
      throw new IllegalArgumentException(
View Full Code Here

Examples of org.cybergarage.upnp.Service

      return;
   
   
   
    for (int i = 0; i < services.length; i++) {
      Service ser = new Service();
      devUPnP.addService(ser);
      ser.setServiceType(services[i].getType() );
      ser.setServiceID(services[i].getId());
      ser.setSCPDURL(id+"/service/"+i+"/gen-desc.xml");
      ser.setDescriptionURL(id+"/service/"+i+"/gen-desc.xml");
      ser.setControlURL(id+"/service/"+i+"/ctrl");
      ser.setEventSubURL(id+"/service/"+i+"/event");

      UPnPAction[] actions = services[i].getActions();
      for (int j = 0; j < actions.length; j++) {
                boolean valid=true;
        Action act = new Action(ser.getServiceNode());
        act.setName(actions[j].getName());
        ArgumentList al = new ArgumentList();
       
        String[] names=actions[j].getInputArgumentNames();       
        if(names!=null){
          for (int k = 0; k < names.length; k++) {
                        UPnPStateVariable variable = actions[j].getStateVariable(names[k]);
                        if(variable==null){
                            /*
                             * //TODO Create a stict and relaxed behavior of the base driver which
                             * export as much it can or export only 100% complaint UPnPDevice service
                             */
                            Activator.logger.WARNING(
                                "UPnP Device that cotains serviceId="+id+" contains the action "
                                +actions[j].getName()+" with the Input argument "+names[k]
                                +" not related to any UPnPStateVariable. Thus this action won't be exported");
                            valid=false;
                            break;
                        }
                        Argument a = new Argument();
            a.setDirection(Argument.IN);
            a.setName(names[k]);
            a.setRelatedStateVariableName(variable.getName());           
            al.add(a);           
          }
        }
        names=actions[j].getOutputArgumentNames();
        if(names!=null && valid){
          for (int k = 0; k < names.length; k++) {
                        UPnPStateVariable variable = actions[j].getStateVariable(names[k]);
                        if(variable==null){
                            /*
                             * //TODO Create a stict and relaxed behavior of the base driver which
                             * export as much it can or export only 100% complaint UPnPDevice service
                             */
                            Activator.logger.WARNING(
                                "UPnP Device that cotains serviceId="+id+" contains the action "
                                +actions[j].getName()+" with the Output argument "+names[k]
                                +" not related to any UPnPStateVariable. Thus this action won't be exported");                           
                        }
            Argument a = new Argument();
            a.setDirection(Argument.OUT);
            a.setName(names[k]);
            a.setRelatedStateVariableName(variable.getName());           
            al.add(a);           
          }
        }
                if(valid) {
            act.setArgumentList(al);
            ser.addAction(act);
                }
      }     
     
      UPnPStateVariable[] vars = services[i].getStateVariables();
      for (int j = 0; j < vars.length; j++) {
        StateVariable var = new StateVariable();
        var.setDataType(vars[j].getUPnPDataType());
        var.setName(vars[j].getName());
        var.setSendEvents(vars[j].sendsEvents());
        String[] values = vars[j].getAllowedValues();
        if(values!=null){
          AllowedValueList avl = new AllowedValueList(values);
          var.setAllowedValueList(avl);
        }else if(vars[j].getMaximum()!= null){
          AllowedValueRange avr = new AllowedValueRange(
              vars[j].getMaximum(),
              vars[j].getMinimum(),
              vars[j].getStep()
            );
          var.setAllowedValueRange(avr);
        }
        if(vars[j].getDefaultValue()!=null)
          try {
            var.setDefaultValue(Converter.toString(
                vars[j].getDefaultValue(),vars[j].getUPnPDataType()
              ));
          } catch (Exception ignored) {
          }
        ser.addStateVariable(var);       
      }
           
      Activator.bc.ungetService(sr);
    }
   
View Full Code Here

Examples of org.dayatang.ioc.test.Service

        return new SpringInstanceProvider("applicationContext.xml");
    }

    @Test
    public void testGetInstanceByFactoryBean() {
        Service service = provider.getInstance(MyService1.class);
        assertEquals("I am Service 1", service.sayHello());
    }
View Full Code Here

Examples of org.drools.Service

            this.bc = bc;
            this.activator = activator;
        }

        public Object addingService(ServiceReference ref) {
            Service service = (Service) this.bc.getService( ref );
            System.out.println( "registering api : " + service + " : " + service.getClass().getInterfaces()[0] );

            Dictionary dic = new Hashtable();
            ServiceReference regServiceRef = this.activator.serviceRegistry.getReference();
            for ( String key : regServiceRef.getPropertyKeys() ) {
                dic.put( key,
                         regServiceRef.getProperty( key ) );
            }
            dic.put( service.getClass().getInterfaces()[0].getName(),
                     "true" );
            activator.serviceRegistry.setProperties( dic );

            ((ServiceRegistryImpl) bc.getService( regServiceRef )).registerLocator( service.getClass().getInterfaces()[0],
                                                                                    new BundleContextInstantiator( this.bc,
                                                                                                                   ref ) );

            return service;
        }
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.