Examples of Task


Examples of org.fusesource.hawtdispatch.Task

            }
        });
        final String address = server.getBoundAddress();

        // Start a client..
        queue.execute(new Task() {
            public void run() {
                try {
                    System.out.println("Creating a client connection.");
                    AmqpConnection c = startClient(address);
                    Session session = c.getProtonConnection().session();
View Full Code Here

Examples of org.glassfish.api.logging.Task

            }
            long nextsystime = nextDay.getTime();

            rotationTimeLimitValue = nextsystime - systime;

            Task rotationTask = new Task() {
                public Object run() {
                    rotate();
                    return null;
                }
            };

            LogRotationTimer.getInstance().startTimer(
                    new LogRotationTimerTask(rotationTask,
                            rotationTimeLimitValue / 60000));

        } else {

            Long rotationTimeLimitValue = 0L;
            try {
                propValue = manager.getProperty(cname + ".rotationTimelimitInMinutes");
                if (propValue != null) {
                    rotationTimeLimitValue = Long.parseLong(propValue);                   
                }
            } catch (NumberFormatException e) {
                lr = new LogRecord(Level.WARNING, LogFacade.INVALID_ATTRIBUTE_VALUE);
                lr.setParameters(new Object[]{propValue, "rotationTimelimitInMinutes"});
                lr.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));
                lr.setThreadID((int) Thread.currentThread().getId());
                lr.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);
                EarlyLogHandler.earlyMessages.add(lr);
            }

            if (rotationTimeLimitValue != 0) {

                Task rotationTask = new Task() {
                    public Object run() {
                        rotate();
                        return null;
                    }
                };
View Full Code Here

Examples of org.gradle.api.Task

        Map<String, Object> mutableOptions = new HashMap<String, Object>(options);

        Object replaceStr = mutableOptions.remove(Task.TASK_OVERWRITE);
        boolean replace = replaceStr != null && "true".equals(replaceStr.toString());

        Task task = taskFactory.createTask(project, mutableOptions);
        String name = task.getName();

        if (!replace && findByNameWithoutRules(name) != null) {
            throw new InvalidUserDataException(String.format(
                    "Cannot add %s as a task with that name already exists.", task));
        }
View Full Code Here

Examples of org.h2.util.Task

        // but for Ubuntu, the default ulimit is 1024,
        // which breaks the test
        int len = getSize(10, 50);
        Task[] tasks = new Task[len];
        for (int i = 0; i < len; i++) {
            tasks[i] = new Task() {
                public void call() throws SQLException {
                    Connection c = DriverManager.getConnection(url, user, password);
                    PreparedStatement prep = c.prepareStatement("insert into employee values(?, ?, 0)");
                    int id = getNextId();
                    prep.setInt(1, id);
View Full Code Here

Examples of org.intalio.tempo.workflow.task.Task

        Task[] tasks = tmsServer.getTaskList(dao,TOKEN_CURRENT);

        /*
         * Select one task to re-assign
         */
        Task selectTask = tasks[0];
        String selectTaskId = selectTask.getID();
        _logger.debug("Select one task: " + selectTaskId);

        /*
         * Select a user to be re-assigned.
         */
        AuthIdentifierSet targetUserSet = new AuthIdentifierSet();
        String targetUserId = users[0];
        _logger.debug("Select one target user = " + targetUserId);
        targetUserSet.add(targetUserId);

        /*
         * Re-assign task
         */
        tmsServer.reassign(dao,selectTask.getID(), targetUserSet, new AuthIdentifierSet(), TaskState.READY, "token1");
        _logger.debug("Reassign task[" + selectTaskId + "] to " + targetUserId);

        /*
         * check that the task is not in the inbox of current user
         */
 
View Full Code Here

Examples of org.japura.task.Task

   */
  @Test
  public void submitNestedTask3() {
  // parent task status =
  thrown.expect(TaskExeception.class);
  Task parentTask = buildTaskWithOwner(); //
  parentTask.submitNestedTask(new Task());
  }
View Full Code Here

Examples of org.jboss.as.quickstarts.tasksJsf.Task

    @Test
    @InSequence(1)
    public void user_should_be_created_with_one_task_attached() throws Exception {
        // given
        User user = new User("New user");
        Task task = new Task("New task");

        // when
        em.persist(user);
        taskDao.createTask(user, task);
        List<Task> userTasks = em.createQuery("SELECT t FROM Task t WHERE t.owner = :owner", Task.class)
View Full Code Here

Examples of org.jboss.as.quickstarts.tasksrs.model.Task

    @Path("tasks/{title}")
    public Response createTask(@Context UriInfo info, @Context SecurityContext context,
                               @PathParam("title"@DefaultValue("task") String taskTitle) {

        User user = getUser(context);
        Task task = new Task(taskTitle);

        taskDao.createTask(user, task);

        // Construct the URI for the newly created resource and put in into the Location header of the response
        // (assumes that there is only one occurrence of the task title in the request)
        String rawPath = info.getAbsolutePath().getRawPath().replace(task.getTitle(), task.getId().toString());
        UriBuilder uriBuilder = info.getAbsolutePathBuilder().replacePath(rawPath);
        URI uri = uriBuilder.build();

        return Response.created(uri).build();
    }
View Full Code Here

Examples of org.jboss.cache.eviction.EvictionTimerTask.Task

   }

   public Signaller getEvictionThreadSignaller()
   {
      final Signaller s = new Signaller();
      Task signallingTask = timerTask.new Task()
      {
         public void run()
         {
            s.getToken();
            try
View Full Code Here

Examples of org.jboss.seam.example.tasks.entity.Task

   }

   @Override
   public Task getEntity(Long id)
   {
      Task task = super.getEntity(id);
      if (!task.getCategory().getName().equals(categoryName) || !task.getOwner().getUsername().equals(user.getUsername()))
      {
         throw new ResourceNotFoundException("Task not found");
      }
      if (!task.isResolved() == isResolved())
      {
         throw new ResourceNotFoundException("Task found, but in different state.");
      }
      return task;
   }
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.