Examples of Async


Examples of is.Async

                            // AOP code
                            Method currentMethod = ((MethodSignature)jp.getSignature()).getMethod();

                            // plain Java code
                            Async theCurrentAnnotation = currentMethod.getAnnotation(Async.class);
                            //System.out.println("AsyncAspect.run - timeout = " + theCurrentAnnotation.timeout());

                            jp.proceed();
                        } catch (Throwable t) {
                            t.printStackTrace();
View Full Code Here

Examples of javax.websocket.RemoteEndpoint.Async

   */
  @Override
  public void send(final URI receiverUri, final byte[] message,
      final String tag) throws IOException {
    if (remotes.containsKey(receiverUri)) {
      final Async remote = remotes.get(receiverUri);
      remote.sendBinary(ByteBuffer.wrap(message));
      remote.flushBatch();
    } else {
      throw new IOException("Remote: " + receiverUri.toASCIIString()
          + " is currently not connected.");
    }
  }
View Full Code Here

Examples of org.glassfish.api.Async

            }
        };

        // the command may be an asynchronous command, so we need to check
        // for the @Async annotation.
        Async async = command.getClass().getAnnotation(Async.class);
        if (async == null) {
            try {
                wrappedComamnd.execute(context);
            } catch(Throwable e) {
                logger.log(Level.SEVERE,
                        adminStrings.getLocalString("adapter.exception",
                                "Exception in command execution : ", e), e);
                report.setMessage(e.toString());
                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                report.setFailureCause(e);
            }
        } else {
            Thread t = new Thread() {
                public void run() {
                    try {
                        wrappedComamnd.execute(context);
                    } catch (RuntimeException e) {
                        logger.log(Level.SEVERE, e.getMessage(), e);
                    }
                }
            };
            t.setPriority(async.priority());
            t.start();
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            report.setMessage(
                    adminStrings.getLocalString("adapter.command.launch",
                    "Command {0} was successfully initiated asynchronously.",
View Full Code Here

Examples of org.glassfish.api.Async

            }
        };

        // the command may be an asynchronous command, so we need to check
        // for the @Async annotation.
        Async async = command.getClass().getAnnotation(Async.class);
        if (async == null) {
            try {
                wrappedComamnd.execute(context);
            } catch (Throwable e) {
                logger.log(Level.SEVERE,
                        adminStrings.getLocalString("adapter.exception",
                        "Exception in command execution : ", e), e);
                report.setMessage(e.toString());
                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                report.setFailureCause(e);
            }
        } else {
            Thread t = new Thread() {

                public void run() {
                    try {
                        wrappedComamnd.execute(context);
                    } catch (RuntimeException e) {
                        logger.log(Level.SEVERE, e.getMessage(), e);
                    }
                }
            };
            t.setPriority(async.priority());
            t.start();
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            report.setMessage(
                    adminStrings.getLocalString("adapter.command.launch",
                    "Command {0} was successfully initiated asynchronously.",
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                    }
                });
            }
        };

        new Async().waterfall(new ContextCreation(request), outcome, createContext);

    }
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                    }
                });
            }
        };

        new Async().waterfall(new ContextCreation(request), outcome, createContext);

    }
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                    }
                });
            }
        };

        new Async().waterfall(new ContextCreation(request), outcome, createContext);

    }
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                callback.onSuccess(true);
            }
        };

        new Async().waterfall(new RefreshValues(), outcome, fetchServers, fetchInstances);
    }
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                HostStore.this.topology = context;
                callback.onSuccess(true);
            }
        };

        new Async().waterfall(new Topology(), outcome, functions.toArray(new Function[functions.size()]));
    }
View Full Code Here

Examples of org.jboss.gwt.flow.client.Async

                    }
                });
            }
        };

        new Async().waterfall(new ContextCreation(request), outcome, createContext);

    }
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.