Examples of Signal


Examples of com.amazonaws.services.simpleworkflow.flow.annotations.Signal

        for (Method method : interfaze.getMethods()) {
            if (method.getDeclaringClass().getAnnotation(Workflow.class) == null) {
                continue;
            }
            Execute executeAnnotation = method.getAnnotation(Execute.class);
            Signal signalAnnotation = method.getAnnotation(Signal.class);
            GetState getStateAnnotation = method.getAnnotation(GetState.class);
            checkAnnotationUniqueness(method, executeAnnotation, signalAnnotation, getStateAnnotation);
            if (executeAnnotation != null) {
                if (workflowImplementationMethod != null) {
                    throw new IllegalArgumentException(
                            "Interface annotated with @Workflow is allowed to have only one method annotated with @Execute. Found "
                                    + getMethodFullName(workflowImplementationMethod.getMethod()) + " and "
                                    + getMethodFullName(method));
                }
                if (!method.getReturnType().equals(void.class) && !(Promise.class.isAssignableFrom(method.getReturnType()))) {
                    throw new IllegalArgumentException(
                            "Workflow implementation method annotated with @Execute can return only Promise or void: "
                                    + getMethodFullName(method));
                }
                if (!method.getDeclaringClass().equals(interfaze)) {
                    throw new IllegalArgumentException("Interface " + interfaze.getName()
                            + " cannot inherit workflow implementation method annotated with @Execute: "
                            + getMethodFullName(method));

                }
                DataConverter converter = createConverter(workflowAnnotation.dataConverter(), converterOverride);
                workflowImplementationMethod = new MethodConverterPair(method, converter);
                workflowType = getWorkflowType(interfaceName, method, executeAnnotation);
               
                WorkflowRegistrationOptions registrationOptionsAnnotation = interfaze.getAnnotation(WorkflowRegistrationOptions.class);
                SkipTypeRegistration skipRegistrationAnnotation = interfaze.getAnnotation(SkipTypeRegistration.class);
                if (skipRegistrationAnnotation == null) {
                    if (registrationOptionsAnnotation == null) {
                        throw new IllegalArgumentException(
                                "@WorkflowRegistrationOptions is required for the interface that contains method annotated with @Execute");
                    }
                    registrationOptions = createRegistrationOptions(registrationOptionsAnnotation);
                }
                else {
                    if (registrationOptionsAnnotation != null) {
                        throw new IllegalArgumentException(
                                "@WorkflowRegistrationOptions is not allowed for the interface annotated with @SkipTypeRegistration.");
                    }
                }
            }
            if (signalAnnotation != null) {
                String signalName = signalAnnotation.name();
                if (signalName == null || signalName.isEmpty()) {
                    signalName = method.getName();
                }
                DataConverter signalConverter = createConverter(workflowAnnotation.dataConverter(), converterOverride);
                signals.put(signalName, new MethodConverterPair(method, signalConverter));
View Full Code Here

Examples of com.collective2.signalEntry.Signal

        C2ServiceFactory factory = new C2ServiceFactory(simulationAdapter);
        C2EntryService sentryService = factory.signalEntryService(password, systemId, eMail);

        assertEquals(0, portfolio.position("msft").quantity().intValue());

        Signal msft = sentryService.stockSignal(ActionForStock.BuyToOpen)
                .quantity(10).symbol("msft")
                .stopLoss(base, stopSize)
                .duration(Duration.GoodTilCancel);
        if (isLimit) {
            msft = msft.limitOrder(triggerPrice);
        } else {
            msft = msft.stopOrder(triggerPrice);
        }

        Response openResponse = msft.send();

        Integer signalId = openResponse.getInteger(C2Element.ElementSignalId);

        assertEquals(0,signalId.intValue());
View Full Code Here

Examples of com.sk89q.craftbook.mech.ic.Signal

            return;
        }

        try {
            for (int i = 0; i < output.length; i++) {
                Signal out = chip.getOut(i + 1);
                if (out == null) break;
                out.set(output[i]);
            }
        } catch (ArrayIndexOutOfBoundsException e) {
            t.setLine2("§c" + t.getLine2());
            t.setLine3("!ERROR!");
            t.setLine4("too many outputs");
View Full Code Here

Examples of crazypants.enderio.conduit.redstone.Signal

   
    boolean update = worldObj.getWorldInfo().getWorldTotalTime() % 10 == 0;
    NetworkPowerManager pm = getPowerManager();
    if(pm != null && update) {
      update(pm);
      Signal sig = null;
      if(!engineControlEnabled) {
        sig = null;
      } else {
        float percentFull = getPercentFull();       
        if(currentlyEmmittedSignal == null) {
          if(percentFull <= startLevel) {
            sig = new Signal(xCoord, yCoord, zCoord, ForgeDirection.UNKNOWN, 15, DyeColor.RED);
          }
        } else {
          if(percentFull >= stopLevel) {
            sig = null;
          } else {
View Full Code Here

Examples of fr.cyann.react.Signal

        return value - 100;
      }
    });

    // shoots
    Signal shoot = TimeReact.every(50).edge(MouseReact.onButton1()).subscribe(new Procedure1<Integer>() {

      @Override
      public void invoke(Integer value) {
        addPlayerShoot(x.getValue(), y.getValue());
        addPlayerShoot(x.getValue() + player.getWidth() - 10, y.getValue());
View Full Code Here

Examples of horcher.maths2.Signal

    return this.ort.getName();
  }

  public Signal input(final int kanal, final long lange) throws Fehler,
      IOException {
    final Signal signal = new Signal(this.in[kanal].samplerate);
    ComplexD tmp;
    for (int i = 0; i < lange; i++) {
      tmp = new NotComplexD(this.in[kanal].read());
      signal.add(tmp);
    }
    return signal;
  }
View Full Code Here

Examples of io.netty.util.Signal

            if (t instanceof IncompleteFlushException) {
                pfe = (IncompleteFlushException) t;
            } else {
                String msg = processed + " out of " + inSize + " message(s) flushed";
                if (t instanceof Signal) {
                    Signal abort = (Signal) t;
                    abort.expect(ABORT);
                    pfe = new IncompleteFlushException("aborted: " + msg);
                } else {
                    pfe = new IncompleteFlushException(msg, t);
                }
            }
View Full Code Here

Examples of jaron.components.Signal

   * @param key         a string that identifies the FG ouput data
   * @param listener    the listener to be added
   * @see SignalListener
   */
  public void addSignalListener(String key, SignalListener listener) {
    Signal signal = signals.get(key);
    if (signal == null) signal = new Signal();
    signal.addSignalListener(listener);
    signals.put(key, signal);
  }
View Full Code Here

Examples of jaron.components.Signal

          // a hack to prevalidate the xml code (against timing issues)
          if(s.matches("<\\?xml.*</data>")) {
            if (parser.parse(s)) {
              // fire the signal update events
              for (String key : signals.keySet()) {
                Signal signal = signals.get(key);
                signal.setValue(parser.getDouble(key));
              }
              if (debug) System.out.println("FlightGearReceiver::run(): Data published");
            }
          }
          else {
View Full Code Here

Examples of jaron.components.Signal

   */
  public void addGraph(String label, int color) {
    GraphData graph = new GraphData();
    graph.color = color;
    graph.label = label;
    graph.signal = new Signal();
    graph.data = new double[(int )content.getWidth()];
    graphs.put(label, graph);

    setLabelBottomHeight((graphs.size() * Fonts.LINE_HEIGHT) + Fonts.LINE_SPACING);
  }
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.