Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.Event


                if (jsonInventory.containsKey("lastresponsetime")) {
                    eventContext.put("lastResponseTime", jsonInventory.getInt("lastresponsetime"));
                }

                Event event = eventService.createEvent(EventId.ACTIVITY,
                                                       inventoryItem,
                                                       eventContext);

                PingdomEntryDetails details = new PingdomEntryDetails.Builder()
                        .lastErrorTime(jsonInventory.containsKey("lasterrortime") ? jsonInventory.getInt("lasterrortime") : 0)
View Full Code Here


            eventContext.put("activityTitle", activityTitle);
            eventContext.put("activityContent", activityContent);
            eventContext.put("payload", profile);

            Event event = eventService.createEvent(EventId.ACTIVITY, connection, eventContext);
            TwitterActivityDetails details = new TwitterActivityDetails.Builder()
                    .favorites(favoritesCount)
                    .followers(followersCount)
                    .friends(friendsCount)
                    .profile(profile)
View Full Code Here

        events = getEventsForTarget(connection.getId());

        assertEquals(originalEventCount + 1, events.size());

        Event event = events.get(events.size() - 1);

        validateEvent(event, json);

        json = new JSONObject();
View Full Code Here

                        .user(getTestUser())
                        .authType(AuthType.OAUTH)
                        .build());

        int iterationCount = 0;
        Event taEvent = null;

        while (taEvent == null) {
            Thread.sleep(10000);

            if (iterationCount++ == 5) {
                Assert.fail("Unable to poll Twitter in the allotted amount of time.");
            }

            List<Event> allEvents = eventService.getEventsForAccount(getTestAccount());

            for (Event event : allEvents) {
                if (event.getEventId().equals(EventId.ACTIVITY)) {
                    taEvent = event;
                }
            }
        }

        Map<String, Object> taEventMetadata = taEvent.getMetadata();

        Assert.assertEquals(EventId.ACTIVITY, taEvent.getEventId());
        Assert.assertTrue(taEventMetadata.containsKey("activityTitle"));
        Assert.assertTrue(taEventMetadata.containsKey("activityContent"));
        Assert.assertTrue(taEventMetadata.containsKey("activityPayload"));
    }
View Full Code Here

        if (user.getUsername().equals(Constants.NODEABLE_SUPER_USERNAME)) {
            logger.error("You can not delete the Nodebelly user");
            return;
        }
        // Create the event stream entry
        Event event = eventService.createEvent(EventId.DELETE, user, null);
        if (user.getAccount() != null) {
            // Send a user is being deleted message
            messageService.sendNodeableAccountMessage(event, user.getAccount(), null);
        }
        // TODO: remove resoruces they own?
View Full Code Here

    public User createUser(User user) {
        user.setUserStatus(User.UserStatus.ACTIVATED);
        validateUserAlias(user);
        userDAO.save(user);
        // Create the event stream entry
        Event event = eventService.createEvent(EventId.CREATE, user, null);
        // Create a user created message
        messageService.sendNodeableAccountMessage(event, user.getAccount(), null);
        return user;
    }
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.Event

Copyright © 2018 www.massapicom. 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.