Search in sources :

Example 1 with EventTarget

use of com.vmware.flowgate.common.model.redis.message.EventTarget in project flowgate by vmware.

the class EventMessageUtil method createEventMessage.

public static EventMessage createEventMessage(EventType type, String targetCommand, String message) {
    EventUser targetUser = new EventUserImpl(targetCommand);
    Set<EventUser> users = new HashSet<EventUser>();
    users.add(targetUser);
    EventTarget target = new EventTargetImpl(users);
    EventMessage newMessage = new EventMessageImpl(type, null, null, target, new Date().getTime(), message);
    return newMessage;
}
Also used : EventMessage(com.vmware.flowgate.common.model.redis.message.EventMessage) EventUser(com.vmware.flowgate.common.model.redis.message.EventUser) EventTarget(com.vmware.flowgate.common.model.redis.message.EventTarget) Date(java.util.Date) HashSet(java.util.HashSet)

Aggregations

EventMessage (com.vmware.flowgate.common.model.redis.message.EventMessage)1 EventTarget (com.vmware.flowgate.common.model.redis.message.EventTarget)1 EventUser (com.vmware.flowgate.common.model.redis.message.EventUser)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1