public class StandardSkillBuilder extends SkillBuilder<StandardSkillBuilder>
Skill
using the default DynamoDbPersistenceAdapter
and ApacheHttpApiClient
.apiClient, persistenceAdapter, sdkModules, skillId, templateFactory
exceptionHandlers, requestHandlers, requestInterceptors, responseInterceptors
Constructor and Description |
---|
StandardSkillBuilder() |
Modifier and Type | Method and Description |
---|---|
Skill |
build()
Returns a new
Skill instance. |
protected SkillConfiguration.Builder |
getConfigBuilder()
Returns instance of
SkillConfiguration Builder. |
StandardSkillBuilder |
withAutoCreateTable(boolean autoCreateTable)
Allows SDK to create a table if the table doesn't exist.
|
StandardSkillBuilder |
withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB customDynamoDBClient)
Allows the user to specify a custom DynamoDB client.
|
StandardSkillBuilder |
withHttpClient(org.apache.http.impl.client.CloseableHttpClient customHttpClient)
Allows the user to configure custom HTTP client.
|
StandardSkillBuilder |
withPartitionKeyGenerator(Function<RequestEnvelope,String> partitionKeyGenerator)
Allows the user to specify a partition key generator.
|
StandardSkillBuilder |
withTableName(String tableName)
Allows the user to configure a name for the DynamoDB table.
|
StandardSkillBuilder |
withTemplateDirectoryPath(String templateDirectoryPath)
Allows the user to specify directory path where the templates are stored.
|
registerSdkModule, withApiClient, withPersistenceAdapter, withSkillId, withTemplateFactory
addExceptionHandler, addExceptionHandlers, addExceptionHandlers, addRequestHandler, addRequestHandlers, addRequestHandlers, addRequestInterceptor, addRequestInterceptors, addRequestInterceptors, addResponseInterceptor, addResponseInterceptors, addResponseInterceptors, populateConfig
public StandardSkillBuilder withHttpClient(org.apache.http.impl.client.CloseableHttpClient customHttpClient)
customHttpClient
- which extends CloseableHttpClient.StandardSkillBuilder
public StandardSkillBuilder withTableName(String tableName)
tableName
- name for the DynamoDB table.StandardSkillBuilder
public StandardSkillBuilder withAutoCreateTable(boolean autoCreateTable)
autoCreateTable
- if set to true, allows SDK to auto create table.StandardSkillBuilder
public StandardSkillBuilder withPartitionKeyGenerator(Function<RequestEnvelope,String> partitionKeyGenerator)
partitionKeyGenerator
- DynamoDB uses the partition key as input for a hash function to determine storage.StandardSkillBuilder
public StandardSkillBuilder withDynamoDbClient(com.amazonaws.services.dynamodbv2.AmazonDynamoDB customDynamoDBClient)
customDynamoDBClient
- should implement AmazonDynamoDB
.StandardSkillBuilder
public StandardSkillBuilder withTemplateDirectoryPath(String templateDirectoryPath)
templateDirectoryPath
- string.StandardSkillBuilder
protected SkillConfiguration.Builder getConfigBuilder()
SkillConfiguration
Builder.getConfigBuilder
in class SkillBuilder<StandardSkillBuilder>
public Skill build()
Skill
instance.build
in class SkillBuilder<StandardSkillBuilder>
Copyright © 2023. All rights reserved.