Examples of AbstractService


Examples of org.apache.tuscany.sca.assembly.AbstractService

        super(factory, policyFactory, extensionProcessor);
    }

    public ConstrainingType read(XMLStreamReader reader) throws ContributionReadException {
        ConstrainingType constrainingType = null;
        AbstractService abstractService = null;
        AbstractReference abstractReference = null;
        AbstractProperty abstractProperty = null;
        AbstractContract abstractContract = null;
        QName name = null;
       
        try {
           
            // Read the constrainingType document
            while (reader.hasNext()) {
                int event = reader.getEventType();
                switch (event) {
   
                    case START_ELEMENT:
                        name = reader.getName();
                       
                        // Read a <constrainingType>
                        if (Constants.CONSTRAINING_TYPE_QNAME.equals(name)) {
                            constrainingType = assemblyFactory.createConstrainingType();
                            constrainingType.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
                            readIntents(constrainingType, reader);
   
                        } else if (Constants.SERVICE_QNAME.equals(name)) {
                           
                            // Read a <service>
                            abstractService = assemblyFactory.createAbstractService();
                            abstractContract = abstractService;
                            abstractService.setName(getString(reader, Constants.NAME));
                            constrainingType.getServices().add(abstractService);
                            readIntents(abstractService, reader);
   
                        } else if (Constants.REFERENCE_QNAME.equals(name)) {
                           
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AbstractService

        ref2.setName("stockQuoteService");
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ctype.getReferences().add(ref2);

        AbstractService s = factory.createAbstractService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        ctype.getServices().add(s);

        return ctype;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AbstractService

        super(factory, policyFactory, extensionProcessor);
    }

    public ConstrainingType read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
        ConstrainingType constrainingType = null;
        AbstractService abstractService = null;
        AbstractReference abstractReference = null;
        AbstractProperty abstractProperty = null;
        AbstractContract abstractContract = null;
        QName name = null;
       
        // Read the constrainingType document
        while (reader.hasNext()) {
            int event = reader.getEventType();
            switch (event) {

                case START_ELEMENT:
                    name = reader.getName();
                   
                    // Read a <constrainingType>
                    if (Constants.CONSTRAINING_TYPE_QNAME.equals(name)) {
                        constrainingType = assemblyFactory.createConstrainingType();
                        constrainingType.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
                        policyProcessor.readPolicies(constrainingType, reader);

                    } else if (Constants.SERVICE_QNAME.equals(name)) {
                       
                        // Read a <service>
                        abstractService = assemblyFactory.createAbstractService();
                        abstractContract = abstractService;
                        abstractService.setName(getString(reader, Constants.NAME));
                        constrainingType.getServices().add(abstractService);
                        policyProcessor.readPolicies(abstractService, reader);

                    } else if (Constants.REFERENCE_QNAME.equals(name)) {
                       
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AbstractService

        ref2.setName("stockQuoteService");
        ref2.setInterfaceContract(new TestInterfaceContract(factory));
        ref2.setMultiplicity(Multiplicity.ONE_ONE);
        ctype.getReferences().add(ref2);

        AbstractService s = factory.createAbstractService();
        s.setName("AccountService");
        s.setInterfaceContract(new TestInterfaceContract(factory));
        ctype.getServices().add(s);

        return ctype;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.assembly.AbstractService

        super(factory, policyFactory, extensionProcessor);
    }

    public ConstrainingType read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
        ConstrainingType constrainingType = null;
        AbstractService abstractService = null;
        AbstractReference abstractReference = null;
        AbstractProperty abstractProperty = null;
        AbstractContract abstractContract = null;
        QName name = null;
       
        // Read the constrainingType document
        while (reader.hasNext()) {
            int event = reader.getEventType();
            switch (event) {

                case START_ELEMENT:
                    name = reader.getName();
                   
                    // Read a <constrainingType>
                    if (Constants.CONSTRAINING_TYPE_QNAME.equals(name)) {
                        constrainingType = assemblyFactory.createConstrainingType();
                        constrainingType.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
                        policyProcessor.readPolicies(constrainingType, reader);

                    } else if (Constants.SERVICE_QNAME.equals(name)) {
                       
                        // Read a <service>
                        abstractService = assemblyFactory.createAbstractService();
                        abstractContract = abstractService;
                        abstractService.setName(getString(reader, Constants.NAME));
                        constrainingType.getServices().add(abstractService);
                        policyProcessor.readPolicies(abstractService, reader);

                    } else if (Constants.REFERENCE_QNAME.equals(name)) {
                       
View Full Code Here

Examples of org.cipres.treebase.service.AbstractService

    return null;
  }

  @SuppressWarnings("unchecked")
  public void setResultIDs(Collection<Long> ids) {
    AbstractService service = getService();
    makeEmpty();
    for (Long id : ids) {
      E obj = (E) service.findByID(getResultClass(), id);
      getResults().add(obj);
    }
  }
View Full Code Here

Examples of org.cipres.treebase.service.AbstractService

        }
        LOGGER.debug("Removing result "+refineCandidate.getId());
        sr.getResults().remove(refineCandidate);
      }
      sr.announceSize(LOGGER);
      AbstractService service = getSearchService().getAppropriateService(sr);
      service.resurrectAll(sr.getResults());
      saveSearchResults(request, sr);
    }
    if ( sr.size() == 0 ) {
      return onSubmitDiscardResults(request,response,command,errors);
    }
View Full Code Here

Examples of org.cipres.treebase.service.AbstractService

    }
   
    if (sr == null) {
      sr = initialSearchResults();
    } else if (sr.hasResultsList()) {
      AbstractService service = getSearchService().getAppropriateService(sr);
      service.resurrectAll(sr.getResults());
    }

    return sr;
  }
View Full Code Here

Examples of org.springframework.amqp.rabbit.log4j.service.AbstractService

  @ResponseBody
  public String randomLog(@RequestParam(value = "count", defaultValue = "10") int count) {
    if (count <= 0) {
      count = 10;
    }
    AbstractService service;

    int countServiceA = 0;
    int countServiceB = 0;
    int countInfo = 0;
    int countDebug = 0;
    int countWarn = 0;
    int countError = 0;

    int serviceNo;
    int operationNo;
    String randomMessage;
    for (int i = 0; i < count; i++) {
      serviceNo = random.nextInt(2);
      operationNo = random.nextInt(4);
      if (serviceNo == 0) {
        service = serviceA;
        countServiceA++;
      } else {
        service = serviceB;
        countServiceB++;
      }

      randomMessage = "Random log - " + System.currentTimeMillis();
      switch (operationNo) {
      case 0:
        // INFO
        service.logInfo(randomMessage);
        countInfo++;
        break;
      case 1:
        // DEBUG
        service.logDebug(randomMessage);
        countDebug++;
        break;
      case 2:
        // WARN
        service.logWarn(randomMessage);
        countWarn++;
        break;
      case 3:
        // ERROR
        service.logError(randomMessage);
        countError++;
        break;
      }
    }
    return String.format("%d random logs [%d for %s, %d for %s]: INFO - %d, DEBUG - %d, WARN - %d, ERROR - %d", count,
View Full Code Here

Examples of org.vfny.geoserver.servlets.AbstractService

     * @throws IOException If anything goes wrong reading or writing.
     */
    protected void doResponse(Reader requestReader, HttpServletRequest request,
        HttpServletResponse response, int req_type)
        throws ServletException, IOException {
        AbstractService dispatched;
        LOGGER.info("req_type is " + req_type);

        switch (req_type) {
        case GET_CAPABILITIES_REQUEST:
            dispatched = new Capabilities();

            break;

        case DESCRIBE_FEATURE_TYPE_REQUEST:
            dispatched = new Describe();

            break;

        case GET_FEATURE_REQUEST:
            dispatched = new Feature();

            break;

        case TRANSACTION_REQUEST:
            dispatched = new Transaction();

            break;

        case GET_FEATURE_LOCK_REQUEST:
            dispatched = new FeatureWithLock();

            break;

        case LOCK_REQUEST:
            dispatched = new Lock();

            break;

        default:
            dispatched = null;
        }

        if ((dispatched != null)) {
            dispatched.init(servletConfig); //only really needed for init

            if (requestReader == null) {
                dispatched.doGet(request, response);
            } else {
                dispatched.doPost(request, response, requestReader);
            }
        } else {
            String message;

            if (requestReader == null) {
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.