Package com.liveperson.faas.client
Interface FaaSClient
-
- All Known Implementing Classes:
FaaSWebClient
public interface FaaSClientFaaS client for invoking lambdas of a account/brand- Author:
- sschwarz, arotaru
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<LambdaResponse>getLambdas(String userId, Map<String,String> optionalQueryParams, OptionalParams optionalParams)Get a list of lambdas.voidinvokeByEvent(String externalSystem, FaaSEvent event, FaaSInvocation data, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by event ID but does not return response of invocation<T> TinvokeByEvent(String externalSystem, FaaSEvent event, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by event IDvoidinvokeByEvent(String externalSystem, String event, FaaSInvocation data, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by event ID but does not return response of invocation<T> TinvokeByEvent(String externalSystem, String event, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by event IDvoidinvokeByUUID(String externalSystem, String lambdaUUID, FaaSInvocation data, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by lambda UUID but does not return response of invocation<T> TinvokeByUUID(String externalSystem, String lambdaUUID, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams)Invoking a lambda per brand via the RESTful api by lambda UUIDbooleanisImplemented(String externalSystem, FaaSEvent event, OptionalParams optionalParams)Checking if lambda implementation exist for a given eventbooleanisImplemented(String externalSystem, String event, OptionalParams optionalParams)Checking if lambda implementation exist for a given event
-
-
-
Method Detail
-
invokeByEvent
<T> T invokeByEvent(String externalSystem, FaaSEvent event, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by event ID- Type Parameters:
T- Class of the response type- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventdata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaresponseType- the type of the response objectoptionalParams- optional Parameters for request - requestId and timeOuts- Returns:
- the response object of type responseType
- Throws:
FaaSException- when error occurs during lambda invocation
-
invokeByEvent
<T> T invokeByEvent(String externalSystem, String event, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by event ID- Type Parameters:
T- Class of the response type- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventdata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaresponseType- the type of the response objectoptionalParams- optional Parameters for request - requestId and timeOut- Returns:
- the response object of type responseType
- Throws:
FaaSException- when error occurs during lambda invocation
-
invokeByEvent
void invokeByEvent(String externalSystem, FaaSEvent event, FaaSInvocation data, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by event ID but does not return response of invocation- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventdata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaoptionalParams- optional Parameters for request - requestId and timeOut- Throws:
FaaSException- when error occurs during lambda invocation
-
invokeByEvent
void invokeByEvent(String externalSystem, String event, FaaSInvocation data, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by event ID but does not return response of invocation- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventdata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaoptionalParams- optional Parameters for request - requestId and timeOut- Throws:
FaaSException- when error occurs during lambda invocation
-
invokeByUUID
<T> T invokeByUUID(String externalSystem, String lambdaUUID, FaaSInvocation data, Class<T> responseType, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by lambda UUID- Type Parameters:
T- Class of the response type- Parameters:
externalSystem- the name of the external system doing the invocationlambdaUUID- the global unique identifier of a lambdadata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaresponseType- the type of the response objectoptionalParams- optional Parameters for request - requestId and timeOuts- Returns:
- the response object of type responseType
- Throws:
FaaSException- when error occurs during lambda invocation
-
invokeByUUID
void invokeByUUID(String externalSystem, String lambdaUUID, FaaSInvocation data, OptionalParams optionalParams) throws FaaSException
Invoking a lambda per brand via the RESTful api by lambda UUID but does not return response of invocation- Parameters:
externalSystem- the name of the external system doing the invocationlambdaUUID- the global unique identifier of a lambdadata- the invocation payload containing timestamp (ms), headers and payload send to the lambdaoptionalParams- optional Parameters for request - requestId and timeOut- Throws:
FaaSException- when error occurs during lambda invocation
-
isImplemented
boolean isImplemented(String externalSystem, FaaSEvent event, OptionalParams optionalParams) throws FaaSException
Checking if lambda implementation exist for a given event- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventoptionalParams- optional Parameters for request - requestId and timeOut- Returns:
- boolean
- Throws:
FaaSException- when error occurs during isImplemented request
-
isImplemented
boolean isImplemented(String externalSystem, String event, OptionalParams optionalParams) throws FaaSException
Checking if lambda implementation exist for a given event- Parameters:
externalSystem- the name of the external system doing the invocationevent- the faas eventoptionalParams- optional Parameters for request - requestId and timeOut- Returns:
- boolean
- Throws:
FaaSException- when error occurs during isImplemented request
-
getLambdas
List<LambdaResponse> getLambdas(String userId, Map<String,String> optionalQueryParams, OptionalParams optionalParams) throws FaaSException
Get a list of lambdas. Filters can be applied by state, eventId or name. EventId and name supports substring.- Parameters:
userId- LE user idoptionalQueryParams- optional query params that are used for filtering - supported params: state, eventId, nameoptionalParams- optional Parameters for request - requestId and timeOut- Returns:
- A list of lambdas that belong that the above account filtered by the optionalQueryParams
- Throws:
FaaSException- when error occurs during getLambda request
-
-