Examples of EventFilter


Examples of akka.testkit.EventFilter

  @Test
  public void mustEmploySupervisorStrategy() throws Exception {
    // code here
    //#testkit
    EventFilter ex1 = new ErrorFilter(ArithmeticException.class);
    EventFilter ex2 = new ErrorFilter(NullPointerException.class);
    EventFilter ex3 = new ErrorFilter(IllegalArgumentException.class);
    EventFilter ex4 = new ErrorFilter(Exception.class);
    EventFilter[] ignoreExceptions = { ex1, ex2, ex3, ex4 };
    Seq<EventFilter> seq = immutableSeq(ignoreExceptions);
    system.eventStream().publish(new TestEvent.Mute(seq));

    //#create
View Full Code Here

Examples of com.cumulocity.me.sdk.client.event.EventFilter

    }

    @When("I query all Events by type '([^']*)'$")
    public void iQueryAllByType(String type) throws SDKException, ClassNotFoundException {
        try {
            EventFilter filter = new EventFilter().byType(type);
            collection = (EventCollectionRepresentation) eventApi.getEventsByFilter(filter).get();
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }
    }
View Full Code Here

Examples of com.cumulocity.me.sdk.client.event.EventFilter

    @When("I query all Events by source '(\\d+)'$")
    public void iQueryAllBySource(int index) throws SDKException {
        try {
            ManagedObjectRepresentation mo = managedObject;
            EventFilter filter = new EventFilter().bySource(mo);
            collection = (EventCollectionRepresentation) eventApi.getEventsByFilter(filter).get();
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }
    }
View Full Code Here

Examples of com.cumulocity.me.sdk.client.event.EventFilter

    @When("I query all Events by source '(\\d+)' and type '([^']*)'$")
    public void iQueryAllBySourceAndType(int index, String type) throws SDKException, ClassNotFoundException {
        try {
            ManagedObjectRepresentation mo = managedObject;
            EventFilter filter = new EventFilter().bySource(mo).byType(type);
            collection = (EventCollectionRepresentation) eventApi.getEventsByFilter(filter).get();
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }
    }
View Full Code Here

Examples of com.cumulocity.me.sdk.client.event.EventFilter

    }

    @When("I query all Events by source '(\\d+)' and time '([^']*)'$")
    public void iQueryAllBySourceAndTime(int index, String time) throws SDKException, ClassNotFoundException {
        try {
            EventFilter filter = new EventFilter().byDate(DateConverter.string2Date(time), DateConverter.string2Date(time));
            collection = (EventCollectionRepresentation) eventApi.getEventsByFilter(filter).get();
        } catch (SDKException ex) {
            status = ex.getHttpStatus();
        }
    }
View Full Code Here

Examples of com.cumulocity.sdk.client.event.EventFilter

        assertThat(queryParams.keySet()).containsOnly("source","status");
    }
   
    @Test
    public void shouldEncodeParamValue() throws Exception {
        EventFilter eventFilter = new EventFilter().byFromDate(DateConverter.string2Date("2011-11-03T11:01:00.000+05:30"));
       
        Map<String, String> queryParams = eventFilter.getQueryParams();

        assertThat(queryParams.get("dateFrom")).doesNotContain(":");
    }
View Full Code Here

Examples of com.hazelcast.spi.EventFilter

            public void entryEvicted(EntryEvent<Object, Object> event) {
                handleEvent(event);
            }
        };

        EventFilter eventFilter;
        if (getPredicate() == null) {
            eventFilter = new EntryEventFilter(includeValue, key);
        } else {
            eventFilter = new QueryEventFilter(includeValue, key, getPredicate());
        }
View Full Code Here

Examples of com.hazelcast.spi.EventFilter

        final Set<EventRegistration> registrationsWithValue = new HashSet<EventRegistration>();
        final Set<EventRegistration> registrationsWithoutValue = new HashSet<EventRegistration>();
        // iterate on candidates.
        for (final EventRegistration candidate : candidates) {
            Result result = Result.NONE;
            final EventFilter filter = candidate.getFilter();
            if (emptyFilter(filter)) {
                result = processEmptyFilter();
            } else if (queryEventFilter(filter)) {
                result = processQueryEventFilter(filter, eventType, dataKey, dataOldValue, dataValue);
            } else if (filter.eval(dataKey)) {
                result = processEntryEventFilter(filter);
            }
            registerCandidate(result, candidate, registrationsWithValue, registrationsWithoutValue);
        }
        if (registrationsWithValue.isEmpty() && registrationsWithoutValue.isEmpty()) {
View Full Code Here

Examples of com.hazelcast.spi.EventFilter

    public String addLocalEntryListenerInternal(EntryListener listener, Predicate predicate,
                                                final Data key, boolean includeValue) {

        final MapService mapService = getService();
        EventFilter eventFilter = new QueryEventFilter(includeValue, key, predicate);
        return mapService.getMapServiceContext().addLocalEventListener(listener, eventFilter, name);
    }
View Full Code Here

Examples of com.hazelcast.spi.EventFilter

        return mapService.getMapServiceContext().addLocalEventListener(listener, eventFilter, name);
    }

    protected String addEntryListenerInternal(
            final EntryListener listener, final Data key, final boolean includeValue) {
        EventFilter eventFilter = new EntryEventFilter(includeValue, key);
        final MapService mapService = getService();
        return mapService.getMapServiceContext().addEventListener(listener, eventFilter, name);
    }
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.