public class PresenceEvent extends Event
Modifier and Type | Field and Description |
---|---|
static String |
FIRST_ENCOUNTER_DESCRIPTOR
Means that the Addon encountered the user the first time IN THE SPECIFIED MODE (Strict/General) since he left.
|
static String |
GENERAL_DESCRIPTOR
this event does not mean the user is able to notice anything (can be used for warm-up), it indicates
he might be
|
static String |
ID
it means that the addon can guarantee that the user entered an area near izou
|
static String |
KNOWN_DESCRIPTOR
it means that the user entered an area near izou
|
static String |
STRICT_DESCRIPTOR
it means that the addon can guarantee that the user entered an area near izou
|
static String |
UNKNOWN_DESCRIPTOR
it means that someone entered an area near izou, but it is not clear if it is the user,
|
Modifier | Constructor and Description |
---|---|
protected |
PresenceEvent(Identification source,
List<String> descriptors)
Creates a new Event Object
|
Modifier and Type | Method and Description |
---|---|
static Optional<PresenceEvent> |
createPresenceEvent(Identification source,
boolean strict,
boolean known,
boolean firstEncounter,
List<String> descriptors)
creates a new PresenceEvent
|
static Optional<PresenceEvent> |
createPresenceEvent(Identification source,
boolean strict,
boolean known,
boolean firstEncounter,
List<String> descriptors,
Long timePassed)
creates a new PresenceEvent
|
addDescriptor, addEventLifeCycleListener, addResource, addResources, containsDescriptor, createEvent, createEvent, getAllInformations, getDescriptors, getEventBehaviourController, getID, getListResourceContainer, getSource, getType, lifecycleCallback, replaceDescriptors, setDescriptors, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isOwner
public static final String GENERAL_DESCRIPTOR
public static final String STRICT_DESCRIPTOR
public static final String UNKNOWN_DESCRIPTOR
public static final String KNOWN_DESCRIPTOR
public static final String FIRST_ENCOUNTER_DESCRIPTOR
public static final String ID
protected PresenceEvent(Identification source, List<String> descriptors) throws IllegalArgumentException
source
- the source of the Event, most likely a this reference.descriptors
- the descriptors to initialize the Event withIllegalArgumentException
- if one of the Arguments is null or emptypublic static Optional<PresenceEvent> createPresenceEvent(Identification source, boolean strict, boolean known, boolean firstEncounter, List<String> descriptors)
source
- the callerstrict
- whether the addon can guarantee that the user is aroundknown
- true if the addon knows if the person encountered is the (main) userfirstEncounter
- if the user was first encountered in the specified modedescriptors
- the descriptorspublic static Optional<PresenceEvent> createPresenceEvent(Identification source, boolean strict, boolean known, boolean firstEncounter, List<String> descriptors, Long timePassed)
source
- the callerstrict
- whether the addon can guarantee that the user is aroundknown
- true if the addon knows if the person encountered is the (main) userfirstEncounter
- if the user was first encountered in the specified modedescriptors
- the descriptorstimePassed
- the time passed in seconds since the user was last encounteredCopyright © 2016. All rights reserved.