Package com.slack.api.bolt.aws_lambda
Class SlackApiLambdaHandler
- java.lang.Object
-
- com.slack.api.bolt.aws_lambda.SlackApiLambdaHandler
-
- All Implemented Interfaces:
com.amazonaws.services.lambda.runtime.RequestHandler<ApiGatewayRequest,ApiGatewayResponse>
public abstract class SlackApiLambdaHandler extends Object implements com.amazonaws.services.lambda.runtime.RequestHandler<ApiGatewayRequest,ApiGatewayResponse>
The AWS Lambda handler base class. A sub class that inherits this abstract class works as a Lambda handler.- See Also:
- AWS Lambda
-
-
Constructor Summary
Constructors Constructor Description SlackApiLambdaHandler(App app)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Appapp()Returns the underlyingAppinstance in this handler.ApiGatewayResponsehandleRequest(ApiGatewayRequest input, com.amazonaws.services.lambda.runtime.Context context)protected abstract booleanisWarmupRequest(ApiGatewayRequest awsReq)Returns true if the given incoming request is an internal warmup request.protected ApiGatewayResponsetoApiGatewayResponse(Response slackResp)protected Request<?>toSlackRequest(ApiGatewayRequest awsReq)
-
-
-
Constructor Detail
-
SlackApiLambdaHandler
public SlackApiLambdaHandler(App app)
-
-
Method Detail
-
isWarmupRequest
protected abstract boolean isWarmupRequest(ApiGatewayRequest awsReq)
Returns true if the given incoming request is an internal warmup request. You can use your own logic for distinguishing requests from Slack from your own internal warmup trigger.
-
handleRequest
public ApiGatewayResponse handleRequest(ApiGatewayRequest input, com.amazonaws.services.lambda.runtime.Context context)
- Specified by:
handleRequestin interfacecom.amazonaws.services.lambda.runtime.RequestHandler<ApiGatewayRequest,ApiGatewayResponse>
-
toSlackRequest
protected Request<?> toSlackRequest(ApiGatewayRequest awsReq)
-
toApiGatewayResponse
protected ApiGatewayResponse toApiGatewayResponse(Response slackResp)
-
-