|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface KeenDetailedCallback
An interface to allow callers to receive a callback on success or failure of an operation by the keen client. This is most helpful for asynchronous calls (to detect completion of the operation), but can also be used to be notified of failures, which are normally caught silently by the client to prevent application crashes. This advanced version of the callback adds callbacks that take the event details as parameters.
| Method Summary | |
|---|---|
void |
onFailure(KeenProject project,
java.lang.String eventCollection,
java.util.Map<java.lang.String,java.lang.Object> event,
java.util.Map<java.lang.String,java.lang.Object> keenProperties,
java.lang.Exception e)
Invoked when the requested operation fails. |
void |
onSuccess(KeenProject project,
java.lang.String eventCollection,
java.util.Map<java.lang.String,java.lang.Object> event,
java.util.Map<java.lang.String,java.lang.Object> keenProperties)
Invoked when the requested operation succeeds. |
| Methods inherited from interface io.keen.client.java.KeenCallback |
|---|
onFailure, onSuccess |
| Method Detail |
|---|
void onSuccess(KeenProject project,
java.lang.String eventCollection,
java.util.Map<java.lang.String,java.lang.Object> event,
java.util.Map<java.lang.String,java.lang.Object> keenProperties)
project - The project in which the event was published. If a default project has been set
on the client, this parameter may be null, in which case the default project
was used.eventCollection - The name of the collection in which the event was publishedevent - A Map that consists of key/value pairs. Keen naming conventions apply (see
docs). Nested Maps and lists are acceptable (and encouraged!).keenProperties - A Map that consists of key/value pairs to override default properties.
ex: "timestamp" -> Calendar.getInstance()
void onFailure(KeenProject project,
java.lang.String eventCollection,
java.util.Map<java.lang.String,java.lang.Object> event,
java.util.Map<java.lang.String,java.lang.Object> keenProperties,
java.lang.Exception e)
project - The project in which the event was published. If a default project has been set
on the client, this parameter may be null, in which case the default project
was used.eventCollection - The name of the collection in which the event was publishedevent - A Map that consists of key/value pairs. Keen naming conventions apply (see
docs). Nested Maps and lists are acceptable (and encouraged!).keenProperties - A Map that consists of key/value pairs to override default properties.
ex: "timestamp" -> Calendar.getInstance()e - An exception indicating the cause of the failure.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||