Package com.atlan.samples.events
Class AbstractLambdaHandler
- java.lang.Object
-
- com.atlan.samples.events.AbstractLambdaHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestStreamHandler
- Direct Known Subclasses:
LambdaEnforcer,LambdaLogger,LambdaPlaybookRunner,LambdaScorer
public abstract class AbstractLambdaHandler extends java.lang.Object implements com.amazonaws.services.lambda.runtime.RequestStreamHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractLambdaHandler(com.atlan.events.AtlanEventHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleRequest(java.io.InputStream input, java.io.OutputStream output, com.amazonaws.services.lambda.runtime.Context context)voidprocessEvent(com.atlan.model.events.AtlanEvent event, com.amazonaws.services.lambda.runtime.Context context)Handle the Atlan event using the standard 5-step flow: 1.
-
-
-
Method Detail
-
processEvent
public void processEvent(com.atlan.model.events.AtlanEvent event, com.amazonaws.services.lambda.runtime.Context context) throws java.io.IOExceptionHandle the Atlan event using the standard 5-step flow: 1. Validate prerequisites. 2. Retrieve current state of the asset. 3. Apply any changes (in-memory). 4. Determine whether any changes actually would be applied (idempotency). 5. Apply changes back to Atlan (only if (4) shows there are changes to apply).- Parameters:
event- the event payload, from Atlancontext- context in which the event was received by the AWS Lambda function- Throws:
java.io.IOException- on any error during processing of the event
-
handleRequest
public void handleRequest(java.io.InputStream input, java.io.OutputStream output, com.amazonaws.services.lambda.runtime.Context context) throws java.io.IOException- Specified by:
handleRequestin interfacecom.amazonaws.services.lambda.runtime.RequestStreamHandler- Throws:
java.io.IOException
-
-