Package com.bitheads.braincloud.services
Class EventService
java.lang.Object
com.bitheads.braincloud.services.EventService
public class EventService extends Object
-
Constructor Summary
Constructors Constructor Description EventService(BrainCloudClient client) -
Method Summary
Modifier and Type Method Description voiddeleteIncomingEvent(String evId, IServerCallback callback)Delete an event out of the player's incoming mailbox.voiddeleteIncomingEvents(String[] evIds, IServerCallback callback)Delete a list of events out of the user's incoming mailbox.voiddeleteIncomingEventsByTypeOlderThan(String eventType, long dateMillis, IServerCallback callback)Delete any events of the given type older than the given date out of the user's incoming mailbox.voiddeleteIncomingEventsOlderThan(long dateMillis, IServerCallback callback)Delete any events older than the given date out of the user's incoming mailbox.voidgetEvents(IServerCallback callback)Get the events currently queued for the player.voidsendEvent(String toProfileId, String eventType, String jsonEventData, IServerCallback callback)Sends an event to the designated player id with the attached json data.voidupdateIncomingEventData(String evId, String jsonEventData, IServerCallback callback)Updates an event in the player's incoming event mailbox.
-
Constructor Details
-
EventService
-
-
Method Details
-
sendEvent
public void sendEvent(String toProfileId, String eventType, String jsonEventData, IServerCallback callback)Sends an event to the designated player id with the attached json data. Any events that have been sent to a player will show up in their incoming event mailbox. If the recordLocally flag is set to true, a copy of this event (with the exact same event id) will be stored in the sending player's "sent" event mailbox. Note that the list of sent and incoming events for a player is returned in the "ReadPlayerState" call (in the BrainCloudPlayer module). Service Name - event Service Operation - SEND- Parameters:
toProfileId- The id of the user who is being sent the eventeventType- The user-defined type of the event.jsonEventData- The user-defined data for this event encoded in JSON.callback- The callback.
-
updateIncomingEventData
Updates an event in the player's incoming event mailbox. Service Name - event Service Operation - UPDATE_EVENT_DATA- Parameters:
evId- The event idjsonEventData- The user-defined data for this event encoded in JSON.callback- The callback.
-
deleteIncomingEvent
Delete an event out of the player's incoming mailbox. Service Name - event Service Operation - DELETE_INCOMING- Parameters:
evId- The event idcallback- The callback.
-
deleteIncomingEvents
Delete a list of events out of the user's incoming mailbox. Service Name - event Service Operation - DELETE_INCOMING_EVENTS- Parameters:
evIds- Collection of event idscallback- The callback.
-
deleteIncomingEventsByTypeOlderThan
public void deleteIncomingEventsByTypeOlderThan(String eventType, long dateMillis, IServerCallback callback)Delete any events of the given type older than the given date out of the user's incoming mailbox. Service Name - event Service Operation - DELETE_INCOMING_EVENTS_BY_TYPE_OLDER_THAN- Parameters:
eventType- The user-defined type of the eventdateMillis- createdAt cut-off time whereby older events will be deletedcallback- The callback.
-
deleteIncomingEventsOlderThan
Delete any events older than the given date out of the user's incoming mailbox. Service Name - event Service Operation - DELETE_INCOMING_EVENTS_OLDER_THAN- Parameters:
dateMillis- createdAt cut-off time whereby older events will be deletedcallback- The callback.
-
getEvents
Get the events currently queued for the player. Service Name - event Service Operation - GET_EVENTS- Parameters:
callback- The method to be invoked when the server response is received
-