Class ApiProcessor<O>
java.lang.Object
com.scaleoutsoftware.modules.abstractions.ApiProcessor<O>
- Type Parameters:
O- the SOSS object type.
The ApiProcessor is responsible for handling incoming API requests from clients for the retrieved object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract OcreateObject(String moduleName, String id) Create an object for a received messaged for an object that did not exist and theSossApiMethod'sObjNotFoundBehavioris set toObjNotFoundBehavior.Create.abstract NewObjectPolicygetNewObjectPolicy(String moduleName, String id, O object) Generate aNewObjectPolicythat defines theExpirationTypeand expiration timeout.
-
Constructor Details
-
ApiProcessor
public ApiProcessor()Instantiate a new ApiProcessor.
-
-
Method Details
-
createObject
Create an object for a received messaged for an object that did not exist and theSossApiMethod'sObjNotFoundBehavioris set toObjNotFoundBehavior.Create.- Parameters:
moduleName- the name of the module.id- the SOSS object id.- Returns:
- the new object.
-
getNewObjectPolicy
Generate aNewObjectPolicythat defines theExpirationTypeand expiration timeout. UseDuration.ZEROfor an infinite timeout.- Parameters:
moduleName- the module name.id- the object id.object- the new object.- Returns:
- the
NewObjectPolicy.
-