Package org.apache.uima.ducc.transport.event

Examples of org.apache.uima.ducc.transport.event.SubmitServiceReplyDuccEvent


        replyReservationEvent.setProperties(cancelReservationEvent.getProperties());
        exchange.getIn().setBody(replyReservationEvent);
      }
      if(obj instanceof SubmitServiceDuccEvent) {
        SubmitServiceDuccEvent submitServiceEvent = exchange.getIn().getBody(SubmitServiceDuccEvent.class);
        SubmitServiceReplyDuccEvent replyServiceEvent = new SubmitServiceReplyDuccEvent();
        replyServiceEvent.setProperties(submitServiceEvent.getProperties());
        exchange.getIn().setBody(replyServiceEvent);
      }
      if(obj instanceof CancelServiceDuccEvent) {
        CancelServiceDuccEvent cancelServiceEvent = exchange.getIn().getBody(CancelServiceDuccEvent.class);
        CancelServiceReplyDuccEvent replyServiceEvent = new CancelServiceReplyDuccEvent();
        replyServiceEvent.setProperties(cancelServiceEvent.getProperties());
        exchange.getIn().setBody(replyServiceEvent);
      }
    }
View Full Code Here


        }
   
        requestProperties.put(UiOption.ProcessThreadCount.pname(), "1");         // enforce this - OR will complain if it's missing

        SubmitServiceDuccEvent      ev    = new SubmitServiceDuccEvent(requestProperties);
        SubmitServiceReplyDuccEvent reply = null;
       
        try {
            reply = (SubmitServiceReplyDuccEvent) dispatcher.dispatchAndWaitForDuccReply(ev);
        } catch (Exception e) {
            message("Process not submitted:", e.getMessage());
View Full Code Here

        serviceRequestProperties.setProperty(UiOption.ProcessThreadCount.pname(), "1");
        serviceRequestProperties.setProperty(UiOption.ProcessDeploymentsMax.pname(), "1");    
        serviceRequestProperties.setProperty(UiOption.ServiceTypeOther.pname(), "");
       
        SubmitServiceDuccEvent ev = new SubmitServiceDuccEvent(serviceRequestProperties);
        SubmitServiceReplyDuccEvent reply = null;
       
        try {
            reply = (SubmitServiceReplyDuccEvent) dispatcher.dispatchAndWaitForDuccReply(ev);
        } finally {
            dispatcher.close();
        }

        /*
         * process reply
         */
        boolean retval = true;
        Properties properties = reply.getProperties();
        @SuppressWarnings("unchecked")
        ArrayList<String> or_warnings = (ArrayList<String>) properties.get(UiOption.SubmitWarnings.pname());
        if (or_warnings != null) {
            for ( String s : or_warnings) {
               message("WARN:", s);
            }
        }

        @SuppressWarnings("unchecked")
        ArrayList<String> or_errors = (ArrayList<String>) properties.get(UiOption.SubmitErrors.pname());
        if(or_errors != null) {
            for ( String s : or_errors ) {
                message("ERROR:", s);
            }
            retval = false;
        }

        if ( retval ) {
            String pid = reply.getProperties().getProperty(UiOption.JobId.pname());
            if (pid == null ) {
                retval = false;
            } else {
                friendlyId = Long.parseLong(pid);
                if ( friendlyId < 0 ) {
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.SubmitServiceReplyDuccEvent

Copyright © 2018 www.massapicom. 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.