trait ApiGatewayHandler extends LambdaHandler[AwsProxyRequest, AwsProxyResponse] with ApiGatewayResponse with LambdaConfiguration
- Alphabetic
- By Inheritance
- ApiGatewayHandler
- ApiGatewayResponse
- LambdaHandler
- LambdaConfiguration
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
execute(event: AwsProxyRequest, context: Context): AwsProxyResponse
This method should be implemented by all lambda functions a and is called by the lambda handler.
This method should be implemented by all lambda functions a and is called by the lambda handler. Please note that the main entry to the lambda codeBlock should be the "lambdaHandler".
- event
TEvent
- context
AWS Context
- returns
TResponse, if not response is required set this to Unit
- Definition Classes
- LambdaHandler
-
abstract
def
getValue(path: String): Option[String]
Get configuration values by name.
Get configuration values by name. This assumes that the name uses a path notation
- path
name of the configuration value
- Definition Classes
- LambdaConfiguration
-
abstract
def
getValues(path: String): Map[String, String]
Get multiple values using a prefix.
Get multiple values using a prefix. e.g. the path "/database" would return /database/username, /database/password, /database/port, /database/host, etc.
- path
name of the path to search for
- Definition Classes
- LambdaConfiguration
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
buildError(code: Int, message: String): AwsProxyResponse
Helper method to build an error response
Helper method to build an error response
- code
HTTP Code
- message
The error message
- returns
AwsProxyResponse
- Attributes
- protected
- Definition Classes
- ApiGatewayResponse
-
def
buildResponse(code: Int, payload: AnyRef): AwsProxyResponse
Helper methods to build the AWS Proxy Response
Helper methods to build the AWS Proxy Response
- code
HTTP Code
- payload
The payload that will be in the body of the response
- returns
AwsProxyResponse
- Attributes
- protected
- Definition Classes
- ApiGatewayResponse
-
def
buildResponse(code: Int, payload: AnyRef, headers: Map[String, String]): AwsProxyResponse
Helper methods to build the AWS Proxy Response
Helper methods to build the AWS Proxy Response
- code
HTTP Code
- payload
The payload that will be in the body of the response
- headers
Map of headers
- returns
AwsProxyResponse
- Attributes
- protected
- Definition Classes
- ApiGatewayResponse
-
def
buildResponse(code: Int, headers: Map[String, String] = Map()): AwsProxyResponse
Helper methods to build the AWS Proxy Response
Helper methods to build the AWS Proxy Response
- code
HTTP Code
- headers
Map of headers
- returns
AwsProxyResponse
- Attributes
- protected
- Definition Classes
- ApiGatewayResponse
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionListener(listener: (Throwable) ⇒ Unit): Unit
Add custom logic in the handleFailure method before raising the exception
Add custom logic in the handleFailure method before raising the exception
- listener
function
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
val
exceptionListeners: ArrayBuffer[(Throwable) ⇒ Unit]
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
handle(codeBlock: ⇒ AwsProxyResponse): Option[AwsProxyResponse]
Execute the function code and handles errors using the functionHandler.
Execute the function code and handles errors using the functionHandler. It returns None if the response type is Unit, otherwise it returns an Option of TResponse.
- codeBlock
any codeBlock that returns a TResponse
- returns
Option[TResponse]
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
def
handleFailure(exception: Throwable): AwsProxyResponse
Custom handleFailure method for ApiGateway, will generate a response with a custom error message or a generic message to prevent exposing internal details.
Custom handleFailure method for ApiGateway, will generate a response with a custom error message or a generic message to prevent exposing internal details.
- exception
the reported exception
- returns
TResponse
- Attributes
- protected
- Definition Classes
- ApiGatewayHandler → LambdaHandler
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isWarmUpEvent(json: String): Boolean
check if the message is a warm up event or not.
check if the message is a warm up event or not. Returns true if it is.
- json
string event
- returns
Boolean
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
def
jsonDecode(json: String): AwsProxyRequest
Override this method to use a custom json-decode strategy
Override this method to use a custom json-decode strategy
- json
string event
- returns
TEvent
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
final
def
lambdaHandler(inputStream: InputStream, outputStream: OutputStream, context: Context): Unit
The lambdaHandler is the main entry point to your application and it is in charge of decoding your event, handling errors/notifications, and writing to the output stream.
The lambdaHandler is the main entry point to your application and it is in charge of decoding your event, handling errors/notifications, and writing to the output stream.
- inputStream
aws input stream
- outputStream
aws output stream
- context
aws lambda context
- Definition Classes
- LambdaHandler
-
val
log: Logger
- Attributes
- protected
- Definition Classes
- ApiGatewayHandler → LambdaHandler
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
region: String
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
def
responseListener(listener: (AwsProxyResponse) ⇒ AwsProxyResponse): Unit
Transform the function response using custom functions
Transform the function response using custom functions
- listener
function
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
val
responseListeners: ArrayBuffer[(AwsProxyResponse) ⇒ AwsProxyResponse]
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
validationListener(listener: (AwsProxyRequest) ⇒ Unit): Unit
Validate the request using custom functions
Validate the request using custom functions
- listener
function
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
val
validationListeners: ArrayBuffer[(AwsProxyRequest) ⇒ Unit]
- Attributes
- protected
- Definition Classes
- LambdaHandler
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )