R - as type of event response/resultP - as event paramspublic interface EventBasedService<R,P>
ChangeListener and ChangeGenerator
for more fine grained event/listener handling. This interface is for a service definition of the API exposed and all internal event handling details should remain encapsulated.| Modifier and Type | Method and Description |
|---|---|
R |
event(String id,
String eventType,
P eventParams)
A process that will notify/validate/inform a User immediately
If the validation cannot be performed for any reason an Exception will be thrown. |
String |
initEvent(String id,
String eventType,
P eventParams)
A process that will initiate the process Asynchronously/Offline and return a String as UID
to identify the result of the process.
|
void |
onEventFail(String id,
String UID,
Exception e)
When the process of validation completes this method is called.
|
void |
onEventSuccess(String id,
String UID,
R result,
String details)
When the process of validation completes/success this method is called.
|
R event(String id, String eventType, P eventParams) throws Exception
id - as String (like for a user a userId)eventType - as String (implementation specific. JSON or a single value String)eventParams - as PExceptionString initEvent(String id, String eventType, P eventParams)
id - as String (like for a user a userId)eventType - as StringeventParams - as Pvoid onEventSuccess(String id, String UID, R result, String details)
id - as String (like for a user a userId)UID - as Stringresult - as Tdetails - as Details as Exception or any other details about validation resultCopyright © 2018. All rights reserved.