Examples of Service


Examples of org.drools.runtime.pipeline.Service

        Pipeline pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );
        pipeline.setReceiver( unwrapObjectStage );

        ResultHandleFactoryImpl factory = new ResultHandleFactoryImpl();
        Service feeder = PipelineFactory.newJmsMessenger( pipeline,
                                                          props,
                                                          this.destinationName,
                                                          factory );
        feeder.start();

        String xml = StringUtils.readFileAsString( new InputStreamReader( getClass().getResourceAsStream( "order.xml" ) ) );

        this.simpleProducer.sendObject( xml );

        for ( int i = 0; i < 5; i++ ) {
            // iterate and sleep 5 times, to give these messages time to complete.
            if ( factory.list.size() == 1 ) {
                break;
            }
            Thread.sleep( 5000 );
        }

        FactHandle factHandle = (FactHandle) ((Map) ((ResultHandlerImpl) factory.list.get( 0 )).getObject()).keySet().iterator().next();
        assertNotNull( factHandle );

        assertEquals( 1,
                      factory.list.size() );

        Action executeResult = PipelineFactory.newExecuteResultHandler();

        Action assignAsResult = PipelineFactory.newAssignObjectAsResult();
        assignAsResult.setReceiver( executeResult );

        //transformer = PipelineFactory.newXStreamToXmlTransformer( xstream );
        Marshaller marshaller = jaxbCtx.createMarshaller();
        transformer = PipelineFactory.newJaxbToXmlTransformer( marshaller );
        transformer.setReceiver( assignAsResult );

        KnowledgeRuntimeCommand getObject = PipelineFactory.newStatefulKnowledgeSessionGetObject();
        getObject.setReceiver( transformer );

        pipeline = PipelineFactory.newStatefulKnowledgeSessionPipeline( ksession );
        pipeline.setReceiver( getObject );

        ResultHandlerImpl resultHandler = new ResultHandlerImpl();
        pipeline.insert( factHandle,
                         resultHandler );

        assertEqualsIgnoreWhitespace( xml,
                                      (String) resultHandler.getObject() );
        feeder.stop();

    }
View Full Code Here

Examples of org.earth3d.jearth.model.Service

    }

    assertTrue(downloadedServices>0);

    // now choose the first service for download
    Service service = serviceList.getServices().get(0);
    service.addListener(new DownloadFinishedListener() {
     
      public void downloadFinished(DownloadFinishedData dfd) {
        synchronized(sl) {
          sl.notifyAll();
        }
      }
   
      public void downloadFailed(DownloadFinishedData dfd, Exception e) {
        InfoWindow.showError(e);

        synchronized(sl) {
          sl.notifyAll();
        }
      }
    });
    service.download();

    synchronized(sl) {
      sl.wait();
    }

    assertTrue(service.getGeometry() != null);
    assertEquals("sphere", ((GeometryMapTree) service.getGeometry()).getBase());
   
    // then download the first texture map tile and heightfield map tile
    GeometryMapTree geometry = (GeometryMapTree) service.getGeometry();
    geometry.addListener(new DownloadFinishedListener() {
     
      public void downloadFinished(DownloadFinishedData dfd) {
        synchronized(sl) {
          sl.notifyAll();
View Full Code Here

Examples of org.eclipse.orion.server.cf.objects.Service

          JSONObject serviceResp = jobStatus.getJsonData();
          boolean isBindable = serviceResp.getJSONObject(CFProtocolConstants.V2_KEY_ENTITY).getBoolean(CFProtocolConstants.V2_KEY_BINDABLE);

          if (isBindable) {
            Service s = new Service(serviceInstanceEntity.getString(CFProtocolConstants.V2_KEY_NAME));
            services.put(s.toJSON());
          }
        }

      } while (serviceInstancesURI != null);
View Full Code Here

Examples of org.eclipse.wst.wsdl.Service

      List portsToUpdate = new ArrayList();

      Iterator servicesIt = binding.getEnclosingDefinition().getEServices().iterator();
      while (servicesIt.hasNext())
      {
        Service service = (Service)servicesIt.next();
        Iterator portsIt = service.getEPorts().iterator();
        while (portsIt.hasNext())
        {
          Port port = (Port)portsIt.next();
          if (binding.equals(port.getEBinding()))
          {
View Full Code Here

Examples of org.fao.geonet.domain.Service

            MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE })
    public @ResponseBody
    CswVirtualServiceResponse exec(@RequestParam String id)
            throws Exception {

        final Service service = serviceRepository.findOne(Integer.valueOf(id));

        CswVirtualServiceResponse response = new CswVirtualServiceResponse(service);

        return response;
    }
View Full Code Here

Examples of org.geoserver.platform.Service

        ogr.setGdalData(Ogr2OgrTestUtil.getGdalData());

        // the EMF objects used to talk with the output format
        gft = WfsFactory.eINSTANCE.createGetFeatureType();
        fct = WfsFactory.eINSTANCE.createFeatureCollectionType();
        op = new Operation("GetFeature", new Service("WFS", null, new Version("1.0.0"),
                Arrays.asList("GetFeature")), null, new Object[] { gft });
    }
View Full Code Here

Examples of org.geotools.data.ows.Service

* @since 1.1.0
*/
public class WMSCServieInfo extends IServiceInfo {
   
    public WMSCServieInfo(WMSCServiceImpl service ){
        Service capservice;
        capservice = service.getWMSC().getCapabilities().getService();
       
        if (capservice != null){
            this.title = capservice.getName();
            this._abstract = capservice.get_abstract();
            this.description = capservice.getTitle();
            this.keywords = capservice.getKeywordList();
        }
    }
View Full Code Here

Examples of org.geotools.gtcatalog.Service

   
    out.println("<html><body>");
    out.println(services.size() + " services found.<br>");
   
    for (Iterator itr = services.iterator(); itr.hasNext();) {
      Service service = (Service)itr.next();
      out.println("<a href=\"" + service.getIdentifier() + "\">"+service.getInfo(null).getTitle()+ "</a><br>");
    }
   
   
    out.println("</body></html>");
    out.close();
View Full Code Here

Examples of org.geowebcache.service.Service

            HttpServletResponse response) throws Exception {

        Conveyor conv = null;

        // 1) Figure out what Service should handle this request
        Service service = findService(serviceStr);

        // 2) Find out what layer will be used and how
        conv = service.getConveyor(request, response);
        final String layerName = conv.getLayerId();
        if (layerName != null && !tileLayerDispatcher.getTileLayer(layerName).isEnabled()) {
            throw new GeoWebCacheException("Layer '" + layerName + "' is disabled");
        }

        // Check where this should be dispatched
        if (conv.reqHandler == Conveyor.RequestHandler.SERVICE) {
            // A3 The service object takes it from here
            service.handleRequest(conv);

        } else {
            ConveyorTile convTile = (ConveyorTile) conv;

            // B3) Get the configuration that has to respond to this request
View Full Code Here

Examples of org.hibernate.service.Service

      dependentServiceRole = injectionMethod.getParameterTypes()[0];
    }

    // todo : because of the use of proxies, this is no longer returning null here...

    final Service dependantService = getService( dependentServiceRole );
    if ( dependantService == null ) {
      if ( injectService.required() ) {
        throw new ServiceDependencyException(
            "Dependency [" + dependentServiceRole + "] declared by service [" + service + "] not found"
        );
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.