Examples of Event


Examples of com.twitter.hbc.core.event.Event

      }
      rateTracker.start();
      while (!isDone()) {
        String host = hosts.nextHost();
        if (host == null) {
          setExitStatus(new Event(EventType.STOPPED_BY_ERROR, "No hosts available"));
          break;
        }

        double rate = rateTracker.getCurrentRateSeconds();
        if (!Double.isNaN(rate)) {
          endpoint.setBackfillCount(reconnectionManager.estimateBackfill(rate));
        }

        HttpUriRequest request = HttpConstants.constructRequest(host, endpoint, auth);
        if (request != null) {
          String postContent = null;
          if (endpoint.getHttpMethod().equalsIgnoreCase(HttpConstants.HTTP_POST)) {
            postContent = endpoint.getPostParamString();
          }
          auth.signRequest(request, postContent);
          Connection conn = new Connection(client, processor);
          StatusLine status = establishConnection(conn, request);
          if (handleConnectionResult(status)) {
            rateTracker.resume();
            processConnectionData(conn);
            rateTracker.pause();
          }
          logger.info("{} Done processing, preparing to close connection", name);
          conn.close();
        } else {
          addEvent(
            new Event(
              EventType.CONNECTION_ERROR,
              String.format("Error creating request: %s, %s, %s", endpoint.getHttpMethod(), host, endpoint.getURI())
            )
          );
        }
      }
    } catch (Throwable e) {
      logger.warn(name + " Uncaught exception", e);
      Exception laundered = (e instanceof Exception) ? (Exception) e : new RuntimeException(e);
      setExitStatus(new Event(EventType.STOPPED_BY_ERROR, laundered));
    } finally {
      rateTracker.stop();
      logger.info("{} Shutting down httpclient connection manager", name);
      client.getConnectionManager().shutdown();
      isRunning.countDown();
View Full Code Here

Examples of com.vmware.vim.binding.vim.event.Event

      sendEvents(100, 20);
   }

   private void sendEvents(int number, int sleepMS) throws Exception {
      for (int i = 0; i < number; i ++) {
         Event e = getVmEvent(Integer.toString(i), VmRemovedEvent.class);
         MockVcEventListener.getExtHandler().eventHandler(VcEventType.VmRemoved, e);
         e = getVmEvent(Integer.toString(i), VmPoweredOnEvent.class);
         MockVcEventListener.getIntHandler().eventHandler(VcEventType.VmPoweredOn, e);
         e = getVmEvent(Integer.toString(i), VmClonedEvent.class);
         MockVcEventListener.getIntHandler().eventHandler(VcEventType.VmCloned, e);
View Full Code Here

Examples of com.vmware.vim25.Event

      Event[] events = history.getLatestPage();

      System.out.println("Events In the latestPage are : ");
      for (int i = 0; i < events.length; i++)
      {
        Event anEvent = events[i];
        System.out.println("Event: " + anEvent.getClass().getName()
            + "  FullFormattedMessage: "
            + anEvent.getFullFormattedMessage());
      }
    } catch (Exception e)
    {
      System.out.println("Caught Exception : " + " Name : "
          + e.getClass().getName() + " Message : " + e.getMessage()
View Full Code Here

Examples of com.volantis.testtools.mock.Event

        RepeatingExpectation repeating = new RepeatingExpectation(1, 3);
        repeating.addExpectation(expectation);

        // Iterate over the events and target them at the repeating method.
        for (Iterator iterator = events.iterator(); iterator.hasNext();) {
            Event event = (Event) iterator.next();
            repeating.checkExpectations(ExpectationState.CURRENT, event, report);
        }

        // Ensure that the expectations have been met.
        repeating.verify();

        // Now iterator over them again.
        for (Iterator iterator = events.iterator(); iterator.hasNext();) {
            Event event = (Event) iterator.next();
            repeating.checkExpectations(ExpectationState.CURRENT, event, report);
        }

        // Ensure that the expectations have been met.
        repeating.verify();

        // Now iterator over them again.
        for (Iterator iterator = events.iterator(); iterator.hasNext();) {
            Event event = (Event) iterator.next();
            repeating.checkExpectations(ExpectationState.CURRENT, event, report);
        }

        // Ensure that the expectations have been met.
        repeating.verify();
View Full Code Here

Examples of com.webhiker.dreambox.api.epg.Event

    if (nindex < 0)
      return;
    if (nindex >= epg.getEvents().size())
      return;
    this.index = nindex;
    Event event = epg.getEvents().get(index);
    page.setText((index+1)+" of "+epg.getEvents().size());
    setTitle(epg.getServiceName());
    title.setTitle(event.getDescription());
    description.setText(event.getDetails());
    model.removeRow(0);
    model.insertRow(0,new String[]{event.getDate(),event.getTime(),event.getDuration(),event.getGenre()});
    setVisible(true);
    repaint();
  }
View Full Code Here

Examples of com.xebia.cqrs.domain.Event

        xstream.aliasPackage("event", LotteryEvent.class.getPackage().getName());
        xstream.addImmutableType(UUID.class);
    }
   
    public Event deserialize(Object serialized) {
        Event result = (Event) xstream.fromXML((String) serialized);
        if (LOG.isDebugEnabled()) {
            LOG.debug("deserialized " + result + " from " + serialized);
        }
        return result;
    }
View Full Code Here

Examples of common.util.Event

  private Timer timer;

  public Flusher(WindowManagerInterface window)
  {
    this.windowManager = window;
    event = new Event();

    timer = new Timer("Scheduler: bandwidth flush");
  }
View Full Code Here

Examples of cpw.mods.fml.common.eventhandler.Event

    ItemBackpack backpack = ((ItemBackpack) backpackStack.getItem());
    ItemInventory inventory = new ItemInventory(ItemBackpack.class, backpack.getBackpackSize(), backpackStack);
    if (backpackStack.getItemDamage() == 1)
      return stack;

    Event event = new BackpackStowEvent(player, backpack.getDefinition(), inventory, stack);
    MinecraftForge.EVENT_BUS.post(event);
    if (stack.stackSize <= 0)
      return null;
    if (event.isCanceled())
      return stack;

    ItemStack remainder = InvTools.moveItemStack(stack, inventory);
    stack.stackSize = remainder == null ? 0 : remainder.stackSize;
View Full Code Here

Examples of cu.ftpd.events.Event

                            if (!ForbiddenFilesFilter.getForbiddenFiles().contains(filename)) {
                                if (user.hasLeech() || file.length() < user.getCredits()) {
                                    if (remoteHost != null) {
                                        // if we have an address, and we are either transferring data to the same host that we are connecting from, or we have permission to FXPUP, then continue
                                        if (remoteHost.equals(connection.getClientHost()) || ServiceManager.getServices().getPermissions().hasPermission(ActionPermission.FXPDOWNLOAD, ftpPathToFile, user)) {
                                            Event event = EventFactory.download(user, fs, file, remoteHost, 0, 0, "PENDING");
                                            boolean proceed = ServiceManager.getServices().getEventHandler().handleBeforeEvent(event, connection);
                                            if (proceed) {
                                                section = fs.getSection(file);
                                                in = new FileInputStream(file);
                                                createTransfer();
View Full Code Here

Examples of de.caterdev.modelling.process.epc.Event

                        {
                            String label = parser.getText();
                           
                            if (inEvent)
                            {
                                localEventMappings.put(localId, new Event(Long.valueOf(localId), label));
                                localElementMappings.put(localId, new Event(Long.valueOf(localId), label));
                            }
                            else if (inFunction)
                            {
                                localFunctionMappings.put(localId, new Function(Long.valueOf(localId), label));
                                localElementMappings.put(localId, new Function(Long.valueOf(localId), label));
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.