abstract class LambdaHandler[TEvent, TResponse] extends LambdaConfiguration
- Alphabetic
- By Inheritance
- LambdaHandler
- LambdaConfiguration
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LambdaHandler()(implicit arg0: ClassTag[TEvent])
Abstract Value Members
-
abstract
def
execute(event: TEvent, context: Context): TResponse
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
-
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
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
-
val
exceptionListeners: ArrayBuffer[(Throwable) ⇒ Unit]
- Attributes
- protected
-
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: ⇒ TResponse): Option[TResponse]
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
-
def
handleFailure(exception: Throwable): TResponse
Deal with exceptions, the basic logic reports and re-throws the exception.
Deal with exceptions, the basic logic reports and re-throws the exception.
- exception
the reported exception
- returns
TResponse
- Attributes
- protected
-
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
-
def
jsonDecode(json: String): TEvent
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
-
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
-
val
log: Logger
- Attributes
- protected
-
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
-
def
responseListener(listener: (TResponse) ⇒ TResponse): Unit
Transform the function response using custom functions
Transform the function response using custom functions
- listener
function
- Attributes
- protected
-
val
responseListeners: ArrayBuffer[(TResponse) ⇒ TResponse]
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
validationListener(listener: (TEvent) ⇒ Unit): Unit
Validate the request using custom functions
Validate the request using custom functions
- listener
function
- Attributes
- protected
-
val
validationListeners: ArrayBuffer[(TEvent) ⇒ Unit]
- Attributes
- protected
-
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( ... )