Examples of Event


Examples of opennlp.tools.ml.model.Event

    @Override
    protected Iterator<Event> createEvents(RESULT sample) {

      if (RESULT.EVENTS.equals(sample)) {
        List<Event> events = new ArrayList<Event>();
        events.add(new Event("test", new String[]{"f1", "f2"}));

        return events.iterator();
      }
      else if (RESULT.EMPTY.equals(sample)) {
        List<Event> emptyList = Collections.emptyList();
View Full Code Here

Examples of org.activiti.bpmn.model.Event

  }
 
  protected EventDefinition extractEventDefinition(FlowElement flowElement) {
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof Event);
    Event event = (Event)flowElement;
    assertFalse(event.getEventDefinitions().isEmpty());
    return event.getEventDefinitions().get(0);
  }
View Full Code Here

Examples of org.activiti.engine.task.Event

  public EventResponse getEvent(@PathVariable("taskId") String taskId,
      @PathVariable("eventId") String eventId, HttpServletRequest request) {
   
    HistoricTaskInstance task = getHistoricTaskFromRequest(taskId);
   
    Event event = taskService.getEvent(eventId);
    if (event == null || !task.getId().equals(event.getTaskId())) {
      throw new ActivitiObjectNotFoundException("Task '" + task.getId() +"' doesn't have an event with id '" + eventId + "'.", Event.class);
    }
   
    String serverRootUrl = request.getRequestURL().toString();
    serverRootUrl = serverRootUrl.substring(0, serverRootUrl.indexOf("/runtime/tasks/"));
View Full Code Here

Examples of org.apache.ace.feedback.Event

        }, false, RepositoryAdmin.TOPIC_LOGOUT);
    }

    private void doAutoTargetReg() throws Exception {
        List<Event> events = new ArrayList<Event>();
        events.add(new Event("anotherTarget", 1, 1, 1, AuditEvent.FRAMEWORK_STARTED));
        // fill auditlog; no install data
        m_auditLogStore.put(events);

        int initRepoSize = m_statefulTargetRepository.get().size();

        // Get the processauditlog task and run it
        ServiceTracker tracker = new ServiceTracker(m_bundleContext, m_bundleContext.createFilter("(&(" + Constants.OBJECTCLASS + "="
                + Runnable.class.getName() + ")(" + SchedulerConstants.SCHEDULER_NAME_KEY + "="
                + "org.apache.ace.client.processauditlog" + "))"), null);
        tracker.open();

        final Runnable processAuditlog = (Runnable) tracker.waitForService(2000);

        if (processAuditlog != null) {
            // commit should be called
            runAndWaitForEvent(new Callable<Object>() {
                public Object call() throws Exception {
                    processAuditlog.run();
                    return null;
                }
            }, false, RepositoryAdmin.TOPIC_REFRESH);

            assertEquals("After refresh, we expect 1 target based on auditlogdata;", initRepoSize + 1, m_statefulTargetRepository.get().size());
           
            List<StatefulTargetObject> sgoList = m_statefulTargetRepository.get(m_bundleContext.createFilter("(id=another*)"));
            StatefulTargetObject sgo = sgoList.get(0);
            assertTrue("Expected one (anotherTarget) in the list.", sgo != null);

            // should be registered and auto approved
            assertTrue("The automation target operator should have registered anotherTarget.", sgo.isRegistered());
            assertTrue("The automation target operator should have auto-approved anotherTarget.", sgo.getAutoApprove());

            // add a target which will not be autoregistered
            events.clear();
            events.add(new Event("secondTarget", 1, 1, 1, AuditEvent.FRAMEWORK_STARTED));
            m_auditLogStore.put(events);

            // do auto target action
            processAuditlog.run();
            assertEquals("After refresh, we expect an additional target based on auditlogdata;", initRepoSize + 2, m_statefulTargetRepository.get().size());
View Full Code Here

Examples of org.apache.airavata.ws.monitor.event.Event

    public void set(URI brokerURL, String topic, boolean pullMode, URI messageBoxURL) {
        this.brokerURL = brokerURL;
        this.topic = topic;
        this.pullMode = pullMode;
        this.messageBoxURL = messageBoxURL;
        sendSafeEvent(new Event(Type.MONITOR_CONFIGURATION_CHANGED));
    }
View Full Code Here

Examples of org.apache.airavata.xbaya.event.Event

        //Users can set the timeout and interval for the subscription using wsmg setter methods, here we use the default values
        this.wsmgClient.subscribe();
        this.status = true;

        // Enable/disable some menu items and show the monitor panel.
        sendSafeEvent(new Event(Type.MONITOR_STARTED));
    }
View Full Code Here

Examples of org.apache.ambari.view.events.Event

  // ----- ViewController ----------------------------------------------------

  @Override
  public void fireEvent(String eventId, Map<String, String> eventProperties) {
    Event event = viewInstanceEntity == null ?
        new EventImpl(eventId, eventProperties, viewEntity) :
        new EventImpl(eventId, eventProperties, viewInstanceEntity);

    viewRegistry.fireEvent(event);
  }
View Full Code Here

Examples of org.apache.cassandra.transport.Event

            if (!(response instanceof EventMessage)) {
                logger.error("Received an unexpected message from the server: {}", response);
                return;
            }

            final Event event = ((EventMessage)response).event;

            logger.debug("Received event {}, scheduling delivery", response);

            // When handle is called, the current thread is a network I/O  thread, and we don't want to block
            // it (typically addHost() will create the connection pool to the new node, which can take time)
View Full Code Here

Examples of org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event

            CreateVolumeFromBaseImageContext<VolumeApiResult> context) {
        CopyCommandResult result = callback.getResult();
        VolumeInfo volume = (VolumeInfo) context.templateOnStore;
        SnapshotInfo snapshot = context.snapshot;
        VolumeApiResult apiResult = new VolumeApiResult(volume);
        Event event = null;
        if (result.isFailed()) {
            apiResult.setResult(result.getResult());
            event = Event.OperationFailed;
        } else {
            event = Event.OperationSuccessed;
View Full Code Here

Examples of org.apache.cloudstack.framework.events.Event

        // if account has been deleted, this might be called during cleanup of resources and results in null pointer
        if (account == null)
            return;

        Event event = new Event(ManagementServer.Name, EventCategory.USAGE_EVENT.getName(), usageEventType,
                resourceType, resourceUUID);

        Map<String, String> eventDescription = new HashMap<String, String>();
        eventDescription.put("account", account.getUuid());
        eventDescription.put("zone", dc.getUuid());
        eventDescription.put("event", usageEventType);
        eventDescription.put("resource", resourceType);
        eventDescription.put("id", resourceUUID);
        event.setDescription(eventDescription);

        try {
            _eventBus.publish(event);
        } catch (EventBusException e) {
            s_logger.warn("Failed to publish usage event on the the event bus.");
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.