Examples of Operation


Examples of net.sf.jmatchparser.template.engine.operation.Operation

    while (queuedStates.size() > 0) {
      ParserState current = queuedStates.remove(0);
      OperationResult opres = OperationResult.CONTINUE;
      while (opres == OperationResult.CONTINUE) {
        int ip = current.getNextInstructionAndIncrement();
        Operation op = template.getOperation(ip);
        try {
          opres = op.execute(current);
        } catch (RuntimeException ex) {
          throw new RuntimeException("Cannot execute operation at template position:\n\t" + op.getTemplatePosition(), ex);
        }
        if (opres == null)
          throw new RuntimeException(op.getClass().toString() + " returned invalid operation result");
        switch (opres) {
        case CONTINUE:
          // everything fine
          break;
        case NEXTPASS:
          lastFailOffset = -1;
          lastFailTemplatePositions.clear();
          sideEffectBlockedTemplatePositions.clear();
          opres = OperationResult.CONTINUE;
          break;
        case DIE:
          if (queuedStates.size() == 0)
            throw new RuntimeException("Last state died");
          break;
        case FAIL_BLOCKED:
          sideEffectBlockedTemplatePositions.add(op.getTemplatePosition());
          // fall through
        case FAIL:
          if (current.getOffset() > lastFailOffset) {
            lastFailOffset = current.getOffset();
            lastFailTemplatePositions.clear();
          }
          if (current.getOffset() == lastFailOffset) {
            String cmd = op.getTemplatePosition();
            if (!lastFailTemplatePositions.contains(cmd)) {
              lastFailTemplatePositions.add(cmd);
            }
          }
          break;
View Full Code Here

Examples of net.sf.jmd.metarepresentation.impl.Operation

       
        amModelItem = new ModelItem();
        amModelItem.setType("interface");
        amModelItem.setName("AnInterface");

        amMember = new Operation();
        amMember.addModifier("public");
        amMember.setType(voidTypeAM);
        amMember.setNamespace(amModelItem.getIdentifier());
        amMember.setName("aMember");

        amModelItem.addMember(amMember);

        // the DM with an interface and a member
        voidTypeDM = new ModelItem();
        voidTypeDM.setName("void");
       
        dmModelItem = new ModelItem();
        dmModelItem.setType("interface");
        dmModelItem.setName("AnInterface");

        dmMember = new Operation();
        dmMember.addModifier("public");
        dmMember.setType(voidTypeDM);
        dmMember.setNamespace(dmModelItem.getIdentifier());
        dmMember.setName("aMember");
       
View Full Code Here

Examples of net.sf.jz3950.protocol.operation.Operation

            synchronized (this.pendingOperations)
            {
                for (Iterator<Operation> pendingIt = this.pendingOperations.iterator();
                        pendingIt.hasNext();)
                {
                    Operation pending = pendingIt.next();

                    if (pending.processes(pdu))
                    {
                        logger.debug("Dispatching received PDU to " + pending);

                        synchronized (pending)
                        {
                            try
                            {
                                pending.terminatingResponseHasBeenReceived();
                                pending.process(pdu);
                            }
                            catch (ProtocolException e)
                            {
                                pending.setError(e);
                            }
                            finally
                            {
                                pendingIt.remove();
                                pending.notifyAll();
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of net.spy.memcached.ops.Operation

  /* (non-Javadoc)
   * @see net.spy.memcached.MemcachedNode#setupResend()
   */
  public final void setupResend() {
    // First, reset the current write op.
    Operation op=getCurrentWriteOp();
    if(op != null) {
      op.getBuffer().reset();
    }
    // Now cancel all the pending read operations.  Might be better to
    // to requeue them.
    while(hasReadOp()) {
      op=removeCurrentReadOp();
      getLogger().warn("Discarding partially completed op: %s", op);
      op.cancel();
    }

    getWbuf().clear();
    getRbuf().clear();
    toWrite=0;
View Full Code Here

Examples of opennlp.tools.tokenize.DetokenizationDictionary.Operation

  @Test
  public void testDetokenizer() {
   
    String tokens[] = new String[]{".", "!", "(", ")", "\""};
   
    Operation operations[] = new Operation[]{
        Operation.MOVE_LEFT,
        Operation.MOVE_LEFT,
        Operation.MOVE_RIGHT,
        Operation.MOVE_LEFT,
        Operation.RIGHT_LEFT_MATCHING
View Full Code Here

Examples of oracle.kv.Operation

        {
            Key kvKey = Key.createKey(majorKeyComponent, entry.getKey());
            Value kvValue = Value.createValue(entry.getValue().toArray());
            try
            {
                Operation op = store.getOperationFactory().createPut(kvKey, kvValue);
                persistOperations.add(op);
            }
            catch (FaultException e)
            {
                System.err.println(e);
View Full Code Here

Examples of org.activiti.bpmn.model.Operation

    interfaceObject.setId(model.getTargetNamespace() + ":" + xtr.getAttributeValue(null, ATTRIBUTE_ID));
    interfaceObject.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
    interfaceObject.setImplementationRef(parseMessageRef(xtr.getAttributeValue(null, ATTRIBUTE_IMPLEMENTATION_REF), model));
   
    boolean readyWithInterface = false;
    Operation operation = null;
    try {
      while (readyWithInterface == false && xtr.hasNext()) {
        xtr.next();
        if (xtr.isStartElement() && ELEMENT_OPERATION.equals(xtr.getLocalName())) {
          operation = new Operation();
          BpmnXMLUtil.addXMLLocation(operation, xtr);
          operation.setId(model.getTargetNamespace() + ":" + xtr.getAttributeValue(null, ATTRIBUTE_ID));
          operation.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
          operation.setImplementationRef(parseMessageRef(xtr.getAttributeValue(null, ATTRIBUTE_IMPLEMENTATION_REF), model));

        } else if (xtr.isStartElement() && ELEMENT_IN_MESSAGE.equals(xtr.getLocalName())) {
          String inMessageRef = xtr.getElementText();
          if (operation != null && StringUtils.isNotEmpty(inMessageRef)) {
            operation.setInMessageRef(parseMessageRef(inMessageRef.trim(), model));
          }
         
        } else if (xtr.isStartElement() && ELEMENT_OUT_MESSAGE.equals(xtr.getLocalName())) {
          String outMessageRef = xtr.getElementText();
          if (operation != null && StringUtils.isNotEmpty(outMessageRef)) {
            operation.setOutMessageRef(parseMessageRef(outMessageRef.trim(), model));
          }
         
        } else if (xtr.isEndElement() && ELEMENT_OPERATION.equalsIgnoreCase(xtr.getLocalName())) {
          if (operation != null && StringUtils.isNotEmpty(operation.getImplementationRef())) {
            interfaceObject.getOperations().add(operation);
          }
         
        } else if (xtr.isEndElement() && ELEMENT_INTERFACE.equals(xtr.getLocalName())) {
          readyWithInterface = true;
View Full Code Here

Examples of org.activiti.engine.impl.bpmn.webservice.Operation

    } else if (implementation != null && operationRef != null && implementation.equalsIgnoreCase("##WebService")) {
      if (!this.operations.containsKey(operationRef)) {
        addError(operationRef + " does not exist", serviceTaskElement);
      } else {
        Operation operation = this.operations.get(operationRef);
        WebServiceActivityBehavior webServiceActivityBehavior = new WebServiceActivityBehavior(operation);

        Element ioSpecificationElement = serviceTaskElement.element("ioSpecification");
        if (ioSpecificationElement != null) {
          IOSpecification ioSpecification = this.parseIOSpecification(ioSpecificationElement);
View Full Code Here

Examples of org.apache.archiva.redback.rbac.Operation

    @Override
    public Operation getOperation( String operationName )
        throws RbacObjectNotFoundException, RbacManagerException
    {

        Operation el = operationsCache.get( operationName );
        if ( el != null )
        {
            return el;
        }

        Exception lastException = null;
        for ( RBACManager rbacManager : rbacManagersPerId.values() )
        {
            try
            {
                Operation o = rbacManager.getOperation( operationName );
                if ( o != null )
                {
                    operationsCache.put( operationName, o );
                    return o;
                }
View Full Code Here

Examples of org.apache.axis2.corba.idl.types.Operation

        HashMap uniqueMethods = new HashMap();
        XmlSchemaComplexType methodSchemaType;
        XmlSchemaSequence sequence = null;
        List processedExs = new ArrayList();
        for (int i = 0; i < operations.length; i++) {
            Operation operation = operations[i];
            String operationName = operation.getName();
            if (excludeMethods.contains(operationName)) {
                continue;
            }

            if (uniqueMethods.get(operationName) != null) {
                throw new SchemaGeneratorException(
                        " Sorry we don't support methods overloading !!!! ");
            }

            if (operation.hasRaises()) {
                List extypes = operation.getRaises();
                for (int j = 0; j < extypes.size(); j++) {
                    ExceptionType extype = (ExceptionType) extypes.get(j);
                    if (processedExs.contains(extype.getName()))
                        continue;
                    processedExs.add(extype.getName());
                    methodSchemaType = createSchemaTypeForMethodPart(extype.getName()+ "Fault");
                    sequence = new XmlSchemaSequence();
                    generateSchemaForType(sequence, extype, extype.getName());
                    methodSchemaType.setParticle(sequence);
                }
            }
            uniqueMethods.put(operationName, operation);
            //create the schema type for the method wrapper
            List paras = operation.getParams();
            if (paras != null && paras.size() > 0) {
                sequence = new XmlSchemaSequence();
                methodSchemaType = createSchemaTypeForMethodPart(operationName);
                methodSchemaType.setParticle(sequence);
            }

            List outparas = null;
            if (paras != null) {
                for (int j = 0; j < paras.size(); j++) {
                    Member param = (Member) paras.get(j);
                    String parameterName = param.getName();
                    DataType paraType = param.getDataType();
                    if (Member.MODE_INOUT.equals(param.getMode())) {
                        if (outparas==null)
                            outparas = new ArrayList();
                        outparas.add(param);
                    } else if (Member.MODE_OUT.equals(param.getMode())) {
                        if (outparas==null)
                            outparas = new ArrayList();
                        outparas.add(param);
                        continue;
                    }
                    if(nonRpcMethods.contains(operationName)){
                        generateSchemaForType(sequence, null, operationName);
                        break;
                    } else {
                        generateSchemaForType(sequence, paraType, parameterName);
                    }
                }
            }

            DataType returnType = operation.getReturnType();

            if ((returnType != null && !CorbaUtil.getQualifiedName(returnType).equals(VOID)) || outparas!=null) {
                methodSchemaType = createSchemaTypeForMethodPart(operationName + RESPONSE);
                sequence = new XmlSchemaSequence();
                methodSchemaType.setParticle(sequence);
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.