- java.lang.Object
- 
- io.helidon.graphql.server.InvocationHandler.Builder
 
- 
- All Implemented Interfaces:
- Builder<InvocationHandler>,- Supplier<InvocationHandler>
 - Enclosing interface:
- InvocationHandler
 
 public static class InvocationHandler.Builder extends Object implements Builder<InvocationHandler> Fluent API builder to configure the invocation handler.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocationHandler.BuilderaddBlacklistedException(String exceptionClass)Add an exception to the blacklist.InvocationHandler.BuilderaddWhitelistedException(String exceptionClass)Add an exception to the whitelist.InvocationHandlerbuild()Build the instance from this builder.InvocationHandler.Builderconfig(Config config)Update builder from configuration.InvocationHandler.BuilderdefaultErrorMessage(String defaultErrorMessage)Default error message to return when an internal server error occurs.InvocationHandler.BuilderexceptionBlacklist(String[] classNames)Blacklisted error classes that will not return error message back to caller.InvocationHandler.BuilderexceptionWhitelist(String[] classNames)Whitelisted error classes that will return error message back to caller.InvocationHandler.Builderschema(graphql.schema.GraphQLSchema schema)Configure the GraphQL schema to be used.
 
- 
- 
- 
Method Detail- 
buildpublic InvocationHandler build() Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<InvocationHandler>
- Returns:
- instance of the built type
 
 - 
configpublic InvocationHandler.Builder config(Config config) Update builder from configuration. Configuration options:Optional configuration parameters key default value description default-error-message "Server Error" Error message used for internal errors that are not whitelisted. exception-white-list Array of exceptions classes. If an Erroror aRuntimeExceptionof this type is caught, its message will be propagated to the caller.exception-black-list Array of exception classes. If a checked Exceptionis called, its message is propagated to the caller, unless it is in the blacklist.- Parameters:
- config- configuration to use
- Returns:
- updated builder instance
 
 - 
schemapublic InvocationHandler.Builder schema(graphql.schema.GraphQLSchema schema) Configure the GraphQL schema to be used.- Parameters:
- schema- schema to handle by this support
- Returns:
- updated builder instance
 
 - 
defaultErrorMessagepublic InvocationHandler.Builder defaultErrorMessage(String defaultErrorMessage) Default error message to return when an internal server error occurs.- Parameters:
- defaultErrorMessage- default error message
- Returns:
- updated builder instance
 
 - 
exceptionBlacklistpublic InvocationHandler.Builder exceptionBlacklist(String[] classNames) Blacklisted error classes that will not return error message back to caller.- Parameters:
- classNames- names of classes to deny for checked exceptions
- Returns:
- updated builder instance
 
 - 
addBlacklistedExceptionpublic InvocationHandler.Builder addBlacklistedException(String exceptionClass) Add an exception to the blacklist. If a blacklisted exception is thrown,defaultErrorMessage(String)is returned instead.- Parameters:
- exceptionClass- exception to blacklist
- Returns:
- updated builder instance
 
 - 
exceptionWhitelistpublic InvocationHandler.Builder exceptionWhitelist(String[] classNames) Whitelisted error classes that will return error message back to caller.- Parameters:
- classNames- names of classes to allow for runtime exceptions and errors
- Returns:
- updated builder instance
 
 - 
addWhitelistedExceptionpublic InvocationHandler.Builder addWhitelistedException(String exceptionClass) Add an exception to the whitelist. If a whitelisted exception is thrown, its message is returned, otherwisedefaultErrorMessage(String)is returned.- Parameters:
- exceptionClass- exception to whitelist
- Returns:
- updated builder instance
 
 
- 
 
-