T
- Payload that is going over the wire, typically JsonObject or Bufferpublic interface AsyncDominoBase<T> extends KeepSubscriberInfo
Core Interface that all handling classes that interact with Domino implement Works for both DominoJNA and
Modifier and Type | Interface and Description |
---|---|
static class |
AsyncDominoBase.RequestType
Authentication type used to field the request
|
Modifier and Type | Method and Description |
---|---|
default java.util.function.Predicate<io.vertx.core.json.JsonObject> |
customValidator()
Additional validation that is not covered by the OpenAPI specification or otherwise default is: validation is OK
|
java.lang.String |
getApiName() |
java.util.List<io.micrometer.core.instrument.Tag> |
getAppTags() |
TheBarbican |
getBarbican() |
DbRequestParameters<T> |
getDbRequestParameters(KeepJnxSession session,
com.hcl.domino.DominoClient client,
com.hcl.domino.data.Database db,
io.reactivex.Observer<T> observer,
io.vertx.core.json.JsonObject incoming,
java.lang.String eventBusId)
Returns the flexible DBRequest object that is used for calling processPayload
|
AsyncDominoBase.RequestType |
getRequestType() |
KeepUser |
getUser() |
boolean |
isProcessPayloadRequired()
Check if we need to execute processPayload or everything was done in preflight or elsewhere asynchronously
|
default io.vertx.core.Future<java.lang.Void> |
preflight(java.lang.String userName,
io.vertx.core.json.JsonObject incoming)
Preflight is called BEFORE we establish a NotesSession/Database and returns a Future.
|
void |
process(DbRequestParameters<T> request)
Actual work is done here.
|
void |
setApiName(java.lang.String apiName)
Sets the OperationId / APIName the implementing class is reacting to typically matched the class name
|
void |
setDbFileName(java.lang.String dbFileName)
Overwrite the physical file name for the database to act on.
|
void |
setKeepDbInfo(KeepDbInfo keepDbInfo)
Provides the database information like path and configured forms to the method.
|
void |
setProcessPayloadRequired(boolean processPayloadRequired)
When set to false no code in process incoming is executed usually added when everything is done async in preflight
|
void |
setRequestParams(io.vertx.core.json.JsonObject source)
Updates the parameter object coming in from the request
|
AsyncDominoBase<T> |
setRequestType(AsyncDominoBase.RequestType requestType) |
void |
setSubscriber(io.reactivex.ObservableEmitter<T> subscriber)
Sets the subscriber receiving the events that the class generates from interacting with the database.
|
void |
setUser(KeepUser user)
Overwrite the user to act upon.
|
void |
setVertx(io.vertx.core.Vertx vertx)
Inject the runtime into the request
|
default java.util.function.Predicate<io.vertx.core.json.JsonObject> customValidator()
Additional validation that is not covered by the OpenAPI specification or otherwise default is: validation is OK
java.lang.String getApiName()
getApiName
in interface KeepSubscriberInfo
java.util.List<io.micrometer.core.instrument.Tag> getAppTags()
TheBarbican getBarbican()
DbRequestParameters<T> getDbRequestParameters(KeepJnxSession session, com.hcl.domino.DominoClient client, com.hcl.domino.data.Database db, io.reactivex.Observer<T> observer, io.vertx.core.json.JsonObject incoming, java.lang.String eventBusId) throws KeepExceptionMissingParameters
Returns the flexible DBRequest object that is used for calling processPayload
session
- Domino session with user identityclient
- DominoClientdb
- Domino database to act onobserver
- The observer to report errors tpincoming
- the JSON parameterseventBusId
- what operation do we attemptKeepExceptionMissingParameters
AsyncDominoBase.RequestType getRequestType()
KeepUser getUser()
getUser
in interface KeepSubscriberInfo
boolean isProcessPayloadRequired()
Check if we need to execute processPayload or everything was done in preflight or elsewhere asynchronously
default io.vertx.core.Future<java.lang.Void> preflight(@Nonnull java.lang.String userName, @Nonnull io.vertx.core.json.JsonObject incoming)
Preflight is called BEFORE we establish a NotesSession/Database and returns a Future. Anything that needs to happen asynchronously needs to happen here, so the runtime has a chance to wait for completion
userName
- incoming
- void process(DbRequestParameters<T> request) throws java.lang.Exception
Actual work is done here. The DbRequestParameters injects all needed components as well as functions like validation and results
request
- DbRequestParameters granting access to session and databasejava.lang.Exception
- Anything that can go wrong, will go wrongvoid setApiName(java.lang.String apiName)
Sets the OperationId / APIName the implementing class is reacting to typically matched the class name
apiName
- the apiName to setvoid setDbFileName(java.lang.String dbFileName)
Overwrite the physical file name for the database to act on. Used in mail and testing scenarios
dbFileName
- the dbFileName to setvoid setKeepDbInfo(KeepDbInfo keepDbInfo)
Provides the database information like path and configured forms to the method. Important for subrequest handling
keepDbInfo
- KeepDbInfo object for the database to be queriedvoid setProcessPayloadRequired(boolean processPayloadRequired)
When set to false no code in process incoming is executed usually added when everything is done async in preflight
processPayloadRequired
- the processPayloadRequired to setvoid setRequestParams(io.vertx.core.json.JsonObject source)
Updates the parameter object coming in from the request
source
- AsyncDominoBase<T> setRequestType(AsyncDominoBase.RequestType requestType)
requestType
- used for metricsvoid setSubscriber(io.reactivex.ObservableEmitter<T> subscriber)
Sets the subscriber receiving the events that the class generates from interacting with the database. Could be and EventbusResponseSubscriber or a SubTask or a KeepTestSubscriber
subscriber
- the subscriber to setvoid setUser(KeepUser user)
Overwrite the user to act upon. Used in delegation scenarios or for test environments (doesn’t bypass security)
user
- the KeepUser to set, alternative to user from KeepJnxSessionvoid setVertx(io.vertx.core.Vertx vertx)
Inject the runtime into the request
vertx
-