Examples of Callable


Examples of com.google.gxp.compiler.base.Callable

      public String visitUnboundCall(UnboundCall call) {
        throw new UnexpectedNodeException(call);
      }

      public String visitValidatedCall(final ValidatedCall call) {
        final Callable callee = call.getCallee();
        final StringBuilder sb = new StringBuilder();

        callee.acceptCallableVisitor(new CallableVisitor<Void>() {
          public Void visitCallable(Callable callable) {
            sb.append(callee.getName().toString());
            sb.append(".getGxpClosure(");
            COMMA_JOINER.appendTo(sb, getCallArguments(callee, call.getAttributes()));
            sb.append(")");
            return null;
          }
View Full Code Here

Examples of com.google.gxp.compiler.base.Callable

      public Void visitBoundCall(BoundCall call) {
        throw new UnexpectedNodeException(call);
      }

      public Void visitValidatedCall(final ValidatedCall call) {
        final Callable callee = call.getCallee();
        final Map<String, Attribute> params = call.getAttributes();
        final StringBuilder sb = new StringBuilder();

        boolean isInstance = callee.acceptCallableVisitor(new CallableVisitor<Boolean>() {
          public Boolean visitCallable(Callable callable) {
            return false;
          }

          public Boolean visitInstanceCallable(InstanceCallable callable) {
View Full Code Here

Examples of com.scratchdisk.script.Callable

  private static void addCallbacks(Scope scope, File file) {
    // Scan through callback names and add to callback scope sublists if
    // found.
    for (String name : callbackNames) {
      Callable callback = scope.getCallable(name);
      if (callback != null) {
        ArrayList<Scope> list = callbackScopes.get(name);
        if (list == null) {
          list = new ArrayList<Scope>();
          callbackScopes.put(name, list);
View Full Code Here

Examples of com.stuffwithstuff.magpie.interpreter.Callable

    public Obj invoke(Context context, Obj left, Obj right) {
      FnObj function = left.asFn();
      Obj fnArg = right;
     
      // Make sure the argument matches the function's pattern.
      Callable callable = function.getCallable();
      if (!PatternTester.test(context, callable.getPattern(), fnArg,
          callable.getClosure())) {
        throw context.error(Name.NO_METHOD_ERROR, "The argument \"" +
            context.getInterpreter().evaluateToString(fnArg) + "\" does not match the " +
            "function's pattern " + callable.getPattern());
      }

      return function.invoke(context, fnArg);
    }
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.Callable

            if( fullCheckpoint ) {               
                Iterator iterator = queues.values().iterator();
                while (iterator.hasNext()) {
                    try {
                        final JournalMessageStore ms = (JournalMessageStore) iterator.next();
                        FutureTask task = new FutureTask(new Callable() {
                            public Object call() throws Exception {
                                return ms.checkpoint();
                            }});
                        futureTasks.add(task);
                        checkpointExecutor.execute(task);                       
                    }
                    catch (Exception e) {
                        log.error("Failed to checkpoint a message store: " + e, e);
                    }
                }
            }

            Iterator iterator = topics.values().iterator();
            while (iterator.hasNext()) {
                try {
                    final JournalTopicMessageStore ms = (JournalTopicMessageStore) iterator.next();
                    FutureTask task = new FutureTask(new Callable() {
                        public Object call() throws Exception {
                            return ms.checkpoint();
                        }});
                    futureTasks.add(task);
                    checkpointExecutor.execute(task);                       
View Full Code Here

Examples of java.util.concurrent.Callable

   
   
    boolean isTwoWay = mex.getMessageExchangePattern()
        == org.apache.ode.bpel.iapi.MessageExchange.MessageExchangePattern.REQUEST_RESPONSE;
   
    final Callable executionCallable;
   
    if(isTwoWay)
    {
      // Defer the invoke until the transaction commits.
      Scheduler scheduler = executionEnvironment.getScheduler();
View Full Code Here

Examples of java.util.concurrent.Callable

      }

      @Override
      protected Callable<?> createPushStateTask()
      {
         return new Callable()
         {
            public Object call() throws Exception
            {
               numberCreatedTasks++;
               try
View Full Code Here

Examples of java.util.concurrent.Callable

                queue.addAll(0, map.values());
            } else if (dependency instanceof Object[]) {
                Object[] array = (Object[]) dependency;
                queue.addAll(0, Arrays.asList(array));
            } else if (dependency instanceof Callable) {
                Callable callable = (Callable) dependency;
                Object callableResult;
                try {
                    callableResult = callable.call();
                } catch (Exception e) {
                    throw UncheckedException.asUncheckedException(e);
                }
                if (callableResult != null) {
                    queue.add(0, callableResult);
View Full Code Here

Examples of java.util.concurrent.Callable

    }

    private Object unwrap(Object value) {
        while (true) {
            if (value instanceof Callable) {
                Callable callable = (Callable) value;
                try {
                    value = callable.call();
                } catch (Exception e) {
                    throw UncheckedException.asUncheckedException(e);
                }
            } else if (value instanceof Closure) {
                Closure closure = (Closure) value;
View Full Code Here

Examples of java.util.concurrent.Callable

                queue.addAll(0, collection);
            } else if (first instanceof Object[]) {
                Object[] array = (Object[]) first;
                queue.addAll(0, Arrays.asList(array));
            } else if (first instanceof Callable) {
                Callable callable = (Callable) first;
                Object callableResult;
                try {
                    callableResult = callable.call();
                } catch (Exception e) {
                    throw UncheckedException.asUncheckedException(e);
                }
                if (callableResult != null) {
                    queue.add(0, callableResult);
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.