Examples of ResponderEntryPointWS


Examples of uk.org.microbase.client.ws.ResponderEntryPointWS

//        //factory.setAddress("http://localhost:8080/HelloWorldResponder/services/HelloWorld");
//        factory.setAddress(urlStr.toString());
//        factory.setDataBinding(new AegisDatabinding());
//        ResponderEntryPointWS wsClient = (ResponderEntryPointWS) factory.create();

        ResponderEntryPointWS wsClient = WSClientFactory.create(
            ResponderEntryPointWS.class, urlStr.toString(), WS_LOGGING_ENABLED);


        // Attempt to connect to the service
        String echoResult = wsClient.echoTest(WS_TEST_ECHO_STRING);
        logger.log(Level.INFO,
            "Recieved the following from the web service: {0}", echoResult);
        if (echoResult.equals(WS_TEST_ECHO_STRING))
        {
          logger.log(Level.INFO,
View Full Code Here

Examples of uk.org.microbase.client.ws.ResponderEntryPointWS

   */
  public void runJob()
      throws ProcessingException
  {

    ResponderEntryPointWS wsClient = createAndTestResponderWsClient();

    try
    {
      logger.log(Level.INFO, "Instructing service to process max {0} jobs",
          MAX_MESSAGES_IN_BLOCK);
      process.setState(ActiveProcess.State.EXECUTING);
      activeProcessDao.updateProcess(process);
      String responderId = process.getResponder().getTaskTypeGuid();

      if (process.getType() == ProcessType.RESPONDER_DEMAND_CHECK)
        /*
         * Cause the responder to check for new messages and generate
         * job messages.
         */
      {
        int newJobsCreated;
        do
        {
          //Continue to request new jobs until no more are created.
          logger.log(Level.INFO, "Starting {0} for: {1}",
              new Object[]{ProcessType.RESPONDER_DEMAND_CHECK, responderId});
          newJobsCreated = wsClient.checkResponderDemand();
          logger.log(Level.INFO, "Created {0} new jobs for responder: {1}",
              new Object[]{newJobsCreated, responderId});
        } while(newJobsCreated > 0);
      }
      else if (process.getType() == ProcessType.COMPUTATIONAL_WORK)
      {
        /*
         * Cause the responder to execute work available in the distributed
         * job queue.
         */
        logger.log(Level.INFO, "Starting {0} request for: {1}",
            new Object[]{ProcessType.COMPUTATIONAL_WORK, responderId});
        String requestId = wsClient.processMessages(MAX_MESSAGES_IN_BLOCK);
        logger.log(Level.INFO, "Recieved request ID: {0} from {1}",
            new Object[]{requestId, responderId});

        while(wsClient.isStillProcessingRequest(requestId))
        {
          try
          {
            logger.log(Level.INFO,
                "Request ID: {0} for {1} is still processing. Waiting...",
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.