Examples of Service


Examples of com.google.gwt.requestfactory.shared.Service

  /**
   * Examine a RequestContext subtype to populate a ContextMethod.
   */
  private void buildContextMethod(ContextMethod.Builder contextBuilder,
      JClassType contextType) throws UnableToCompleteException {
    Service serviceAnnotation = contextType.getAnnotation(Service.class);
    ServiceName serviceNameAnnotation = contextType.getAnnotation(ServiceName.class);
    if (serviceAnnotation == null && serviceNameAnnotation == null) {
      poison("RequestContext subtype %s is missing a @%s annotation",
          contextType.getQualifiedSourceName(), Service.class.getSimpleName());
      return;
View Full Code Here

Examples of com.google.protobuf.Service

      throw new UnknownProtocolException(null,
          "No registered coprocessor service found for name "+serviceName+
          " in region "+Bytes.toStringBinary(getRegionName()));
    }

    Service service = coprocessorServiceHandlers.get(serviceName);
    Descriptors.ServiceDescriptor serviceDesc = service.getDescriptorForType();
    Descriptors.MethodDescriptor methodDesc = serviceDesc.findMethodByName(methodName);
    if (methodDesc == null) {
      throw new UnknownProtocolException(service.getClass(),
          "Unknown method "+methodName+" called on service "+serviceName+
              " in region "+Bytes.toStringBinary(getRegionName()));
    }

    Message request = service.getRequestPrototype(methodDesc).newBuilderForType()
        .mergeFrom(call.getRequest()).build();
    final Message.Builder responseBuilder =
        service.getResponsePrototype(methodDesc).newBuilderForType();
    service.callMethod(methodDesc, controller, request, new RpcCallback<Message>() {
      @Override
      public void run(Message message) {
        if (message != null) {
          responseBuilder.mergeFrom(message);
        }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.Service

    ProxyForName proxyForName = x.getAnnotation(ProxyForName.class);
    return proxyForName != null && !proxyForName.locator().isEmpty();
  }

  private boolean hasServiceLocator(TypeElement x, State state) {
    Service service = x.getAnnotation(Service.class);
    if (service != null) {
      // See javadoc on getAnnotation
      try {
        service.locator();
        throw new RuntimeException("Should not reach here");
      } catch (MirroredTypeException expected) {
        TypeMirror locatorType = expected.getTypeMirror();
        return !state.types.asElement(locatorType).equals(state.serviceLocatorType.asElement());
      }
View Full Code Here

Examples of com.hetty.object.Service

        type = Class.forName(interfaceStr);
      } catch (ClassNotFoundException e) {
        logger.error(e.getMessage());
        throw new RuntimeException("can't find service Interface:"+interfaceStr);
      }
      Service service = new Service("" + i, name);
      service.setTypeClass(type);
     
      if (StringUtil.isNotEmpty(overloadStr) && "true".equals(overloadStr.trim())) {
        service.setOverload(true);
      }
     
      List<Element> versionList = serviceNode.selectNodes("provider");
      for (Element element : versionList) {
        String version = element.attributeValue("version");
        String processor = element.attributeValue("class");
        String isDefault = element.attributeValue("default");
        Class<?> providerClass = null;
        try {
          providerClass = Class.forName(processor);
        } catch (ClassNotFoundException e) {
          logger.error(e.getMessage());
          throw new RuntimeException("can't find service provider Class:"+processor);
        }
        ServiceProvider sv = new ServiceProvider(version, providerClass);
        if (StringUtil.isNotEmpty(version) && StringUtil.isNotEmpty(isDefault)
            && "true".equals(isDefault.trim())) {
          service.setDefaultVersion(version);
        }
        service.addServiceProvider(version,sv);
      }
      slist.add(service);
      i++;
    }
    return slist;
View Full Code Here

Examples of com.hmkcode.spring.mybatis.service.Service

    public static void main( String[] args )
    {

      ApplicationContext cxt = new ClassPathXmlApplicationContext("spring-config.xml");
      Service service = (Service) cxt.getBean("service");
   
      log.info("Running App...");

     
      //( 1 ) INSERT MYOBJECT
      System.out.println("( 1 ) insertMyObject(myObject)");
      MyObject myObject = new MyObject();
      myObject.setObjectName("name-2");
      service.insertMyObject(myObject);
      System.out.println("myObject.objectId = "+myObject.getObjectId());
     
      System.out.println("\n********************************\n");
     
      //( 2 ) INSERT MYOBJECT
      System.out.println("( 2 ) insertMyObject_Annotation(myObject)");
      myObject = new MyObject();
      myObject.setObjectName("name-3");
      service.insertMyObject_Annotation(myObject);
      System.out.println("myObject.objectId = "+myObject.getObjectId());
     
      System.out.println("\n********************************\n");
     
      //( 3 ) SELECT ALL MYOBJECTS
      System.out.println("( 3 ) selectAllMyObjects()");
      List<MyObject> myObjects = service.selectAllMyObjects();
      System.out.println(myObjects);
   
     
    }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.services.Service

    }
    Set<Source> trustedSources = getTrustedSources(serviceResource);
    Source identity = new SourceImpl(serviceResource.getRequiredProperty(SERVICES.identity).getResource().getURI());
    trustedSources.add(identity); //trust yourself
    NamedNode configuration = new NamedNodeImpl(serviceResource.getRequiredProperty(SERVICES.configuration).getResource().getURI());
    final Service service  = serviceFactory.getService(store, identity, trustedSources, configuration);
    new Thread() {
      public void run() {
        service.start();
      }
    }.start();
   
   
  }
View Full Code Here

Examples of com.iggroup.oss.restdoclet.doclet.type.Service

         ArrayList<Method> matches = uriMethodMappings.get(uri);
         LOG.info(new StringBuilder().append("Found methods ")
            .append(matches.toString()).append(" ").append(matches.size())
            .toString());

         Service service =
            new Service(identifier, multiUriMappings.get(uri), new Controller(
               controller.getType(), controller.getJavadoc(), matches));
         services.add(service);
         service.assertValid();
         JiBXUtils.marshallService(service,
            ServiceUtils.serviceFile(dirs, identifier));
         identifier++;
      }

      LOG.info("Processing services...");
      Services list = new Services();
      for (Service service : services) {
         org.apache.commons.collections.Predicate predicate =
            new ControllerTypePredicate(service.getController().getType());
         if (CollectionUtils.exists(list.getControllers(), predicate)) {
            ControllerSummary controller =
               (ControllerSummary) CollectionUtils.find(list.getControllers(),
                  predicate);
            controller.addService(service);
         } else {
            ControllerSummary controller =
               new ControllerSummary(service.getController().getType(),
                  service.getController().getJavadoc());
            controller.addService(service);
            list.addController(controller);
         }
      }
View Full Code Here

Examples of com.infoclinika.web.Service

        return Service.class;
    }

    @Override
    protected Service createInstance() throws Exception {
        Service translationService = mock(Service.class);
       /* when(translationService.translateFiles(anyListOf(String.class), Mockito.<ExperimentWorkflowType>anyObject(),
                Mockito.<InstrumentVendorType>anyObject(), anyString(), anyString())).thenAnswer(new Answer<Service.TranslationResult>() {
            @Override
            public Service.TranslationResult answer(InvocationOnMock invocation) throws Throwable {
                List<String> fileUrls = (List<String>) invocation.getArguments()[0];
View Full Code Here

Examples of com.mockey.model.Service

        try {
            Long serviceId = new Long(req.getParameter("serviceId"));
            int hangTime = Integer.parseInt(req.getParameter("hangTime"));
            int serviceResponseType = Integer.parseInt(req.getParameter("serviceResponseType"));
            Long defaultScenarioId = Long.parseLong(req.getParameter("scenario"));
            Service service = store.getServiceById(serviceId);
            service.setServiceResponseType(serviceResponseType);
            service.setHangTime(hangTime);
            service.setDefaultScenarioId(defaultScenarioId);
            store.saveOrUpdateService(service);
            String filter = req.getParameter("filter");
            if(filter!=null && "yes".equals(filter)){
                req.setAttribute("filter", "yes");
                List<Service> list = new ArrayList<Service>();
View Full Code Here

Examples of com.rakaizsys.eims.model.service.Service

    }
  }

  @Override
  protected DBObject createDBObject() {
    return new 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.