Examples of cancel()


Examples of org.itsnat.core.event.ItsNatTimerHandle.cancel()

                                ItsNatTimerEvent timerEvt = (ItsNatTimerEvent)evt;
                                ItsNatTimerHandle handle = timerEvt.getItsNatTimerHandle();
                                long firstTime = handle.getFirstTime();
                                if ((new Date().getTime() - firstTime) > 30*60*1000) // 30 minutes
                                {
                                    handle.cancel();
                                    clientOwner.addCodeToSend("The timer for updating the client has finished");
                                }
                            }
                        };
                        ItsNatTimer timer = clientOwner.createItsNatTimer();
View Full Code Here

Examples of org.itsnat.impl.core.listener.domext.ItsNatTimerEventListenerWrapperImpl.cancel()

            // Convertimos en array porque al cancelar cada timer task se modifica el propio Map (un iterador dar�a error)
            ItsNatTimerEventListenerWrapperImpl[] listenerArray = listeners.values().toArray(new ItsNatTimerEventListenerWrapperImpl[listeners.size()]);
            for(int i = 0; i < listenerArray.length; i++)
            {
                ItsNatTimerEventListenerWrapperImpl listener = listenerArray[i];
                listener.cancel(); // Autom�ticamente desregistra de este timer y en el documento. Si en este momento est� ejecut�ndose el m�todo TimerEventListener.handleTimerEvent(Event)  asegura que no se genera c�digo JavaScript para enviar m�s
            }
            listeners.clear(); // No hace falta pero por si acaso
        }

        this.canceled = true;
View Full Code Here

Examples of org.japura.task.Task.cancel()

  }

  @Test
  public void cancelingTask1() {
  Task task = new Task();
  task.cancel();
  Assert.assertEquals(TaskStatus.CANCELED, task.getStatus());
  }

  @Test
  public void cancelingTask2() {
View Full Code Here

Examples of org.jboss.as.controller.Cancellable.cancel()

            expectHeader(inputStream, ModelControllerClientProtocol.PARAM_REQUEST_ID);
            int operationId = StreamUtils.readInt(inputStream);

            Cancellable operation = getAsynchronousOperation(operationId);
            cancelled = operation!= null && operation.cancel();
        }

        @Override
        protected void sendResponse(final OutputStream outputStream) throws IOException {
            StreamUtils.writeBoolean(outputStream, cancelled);
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.TimerImpl.cancel()

            @Override
            void executeRuntime(OperationContext context, ModelNode operation) throws OperationFailedException {
                final TimerImpl timer = getTimer(context, operation);
                // this is TX aware
                timer.cancel();
                context.completeStep(OperationContext.RollbackHandler.NOOP_ROLLBACK_HANDLER);
            }
        });

        resourceRegistration.registerOperationHandler(TRIGGER, new AbstractTimerHandler() {
View Full Code Here

Examples of org.jboss.dna.graph.request.CompositeRequest.cancel()

                                channel.close();
                            } finally {
                                try {
                                    channel.await();
                                } catch (CancellationException err) {
                                    composite.cancel();
                                } catch (ExecutionException err) {
                                    composite.setError(err);
                                } catch (InterruptedException err) {
                                    // Reset the thread ...
                                    Thread.interrupted();
View Full Code Here

Examples of org.jboss.dna.graph.request.ReadNodeRequest.cancel()

        projected1.addChild(child(projected1.getActualLocationOfNode(), "child1"));
        projected1.addChild(child(projected1.getActualLocationOfNode(), "child2"));
        request.add(projected1, false, false, projectionA);
        // And a second source request (that was cancelled)...
        final ReadNodeRequest projected2 = new ReadNodeRequest(location("/a/b/c"), "workspaceM");
        projected2.cancel();
        request.add(projected2, true, false, mirrorProjection);
        request.freeze();
        request.getLatch().countDown();
        request.getLatch().countDown();
        joinQueue.add(request);
View Full Code Here

Examples of org.jboss.errai.bus.client.api.AsyncTask.cancel()

      if (task == null) {
        System.out.println("Nothing to stop: " + taskName);
      }
      else {
        System.out.println("Stopping: " + taskName);
        task.cancel(true);
        ctx.removeAttribute(taskName);
      }
    }
  }
View Full Code Here

Examples of org.jboss.errai.bus.server.async.TimedTask.cancel()

          return;
        }
      }
      catch (Throwable t) {
        if (task != null) {
          task.cancel(true);
        }

        if (errorCallback != null) {
          /**
           * If the errorCallback is defined for this ThreadWorker, we report the exception we
View Full Code Here

Examples of org.jboss.errai.common.client.api.tasks.AsyncTask.cancel()

          final Object sessionResource = ((ConversationMessageWrapper) message).getIncomingMessage().getResource(Object.class, "Session");
          final LaundryReclaim reclaim =
                  LaundryListProviderFactory.get().getLaundryList(sessionResource).add(new Laundry() {
                            @Override
                            public void clean() {
                              task.cancel(true);
                            }
                          });

          task.setExitHandler(new Runnable() {
            @Override
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.