Package com.iisigroup.cap.operation

Examples of com.iisigroup.cap.operation.OpStepContext


  @Override
  public IResult execute(IRequest params) {
    Operation oper = getOperation(params);
    if (oper != null) {
      OpStepContext ctx = new OpStepContext(OperationStep.NEXT);
      oper.execute(ctx, params, this);
      return ctx.getResult();
    }
    return null;
  }// ;
View Full Code Here


  @Override
  public IResult execute(IRequest params) {
    Operation oper = getOperation();
    if (oper != null) {
      OpStepContext ctx = new OpStepContext(OperationStep.NEXT);
      oper.execute(ctx, params, this);
      return ctx.getResult();
    }
    return null;
  }
View Full Code Here

  public void execute(OpStepContext ctx, IRequest params, IHandler handler) {
    OperationStep step = getStartStep();
    long startOperation = System.currentTimeMillis();
    try {
      while (step != null) {
        OpStepContext result = ctx;
        try {
          long startStep = System.currentTimeMillis();
          result = step.execute(result, params, handler);
          logger.debug("{} cost : {} ms", step.getName(),
              (System.currentTimeMillis() - startStep));
        } catch (CapException e) {
          result = step.handleException(result, e);
          throw e;
        }
        if (result != null) {
          if (OperationStep.NEXT.equals(result.getGoToStep())) {
            step = getNextStep(step.getName());
          } else if (OperationStep.RETURN.equals(result.getGoToStep())
              || OperationStep.ERROR.equals(result.getGoToStep())) {
            step = null;
          } else {
            step = getStep(result.getGoToStep());
          }
        }
      }
    } catch (CapException ce) {
      throw ce;
View Full Code Here

TOP

Related Classes of com.iisigroup.cap.operation.OpStepContext

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.