Class RestServerConfigurationBuilder
- java.lang.Object
-
- org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
- org.infinispan.rest.configuration.RestServerConfigurationBuilder
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.Builder<RestServerConfiguration>
,org.infinispan.commons.configuration.Self<RestServerConfigurationBuilder>
,ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public class RestServerConfigurationBuilder extends ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder> implements org.infinispan.commons.configuration.Builder<RestServerConfiguration>
RestServerConfigurationBuilder.- Since:
- 5.3
- Author:
- Tristan Tarrant
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CONTEXT_PATH
static String
DEFAULT_NAME
static int
DEFAULT_PORT
-
Fields inherited from class org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder
attributes, ssl
-
-
Constructor Summary
Constructors Constructor Description RestServerConfigurationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestServerConfigurationBuilder
addAll(List<io.netty.handler.codec.http.cors.CorsConfig> corsConfig)
RestServerConfiguration
build()
Builds a configuration objectRestServerConfiguration
build(boolean validate)
RestServerConfigurationBuilder
compressionLevel(int compressLevel)
RestServerConfigurationBuilder
contextPath(String contextPath)
RestServerConfigurationBuilder
corsAllowForLocalhost(String scheme, int port)
RestServerConfiguration
create()
Create the configuration beanRestServerConfigurationBuilder
defaultCacheName(String defaultCacheName)
Specifies the cache to use as a default cache for the protocolRestServerConfigurationBuilder
extendedHeaders(ExtendedHeaders extendedHeaders)
RestServerConfigurationBuilder
idleTimeout(int idleTimeout)
Specifies the maximum time that connections from client will be kept open without activityRestServerConfigurationBuilder
maxContentLength(int maxContentLength)
org.infinispan.commons.configuration.Builder<?>
read(RestServerConfiguration template)
Reads the configuration from an already created configuration bean into this builder.RestServerConfigurationBuilder
recvBufSize(int recvBufSize)
Sets the size of the receive bufferRestServerConfigurationBuilder
self()
RestServerConfigurationBuilder
sendBufSize(int sendBufSize)
Sets the size of the send bufferRestServerConfigurationBuilder
tcpKeepAlive(boolean tcpKeepAlive)
Affects TCP KEEPALIVE on the TCP stack.RestServerConfigurationBuilder
tcpNoDelay(boolean tcpNoDelay)
Affects TCP NODELAY on the TCP stack.void
validate()
Validate the data in this builder before building the configuration beanRestServerConfigurationBuilder
workerThreads(int workerThreads)
Sets the number of worker threads-
Methods inherited from class org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder
adminOperationsHandler, host, ignoredCaches, ioThreads, name, name, port, ssl, startTransport
-
-
-
-
Field Detail
-
DEFAULT_CONTEXT_PATH
public static final String DEFAULT_CONTEXT_PATH
- See Also:
- Constant Field Values
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
DEFAULT_NAME
public static final String DEFAULT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
extendedHeaders
public RestServerConfigurationBuilder extendedHeaders(ExtendedHeaders extendedHeaders)
-
contextPath
public RestServerConfigurationBuilder contextPath(String contextPath)
-
maxContentLength
public RestServerConfigurationBuilder maxContentLength(int maxContentLength)
-
compressionLevel
public RestServerConfigurationBuilder compressionLevel(int compressLevel)
-
corsAllowForLocalhost
public RestServerConfigurationBuilder corsAllowForLocalhost(String scheme, int port)
-
addAll
public RestServerConfigurationBuilder addAll(List<io.netty.handler.codec.http.cors.CorsConfig> corsConfig)
-
validate
public void validate()
Description copied from interface:org.infinispan.commons.configuration.Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceorg.infinispan.commons.configuration.Builder<RestServerConfiguration>
- Overrides:
validate
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
create
public RestServerConfiguration create()
Description copied from interface:org.infinispan.commons.configuration.Builder
Create the configuration bean- Specified by:
create
in interfaceorg.infinispan.commons.configuration.Builder<RestServerConfiguration>
- Returns:
-
read
public org.infinispan.commons.configuration.Builder<?> read(RestServerConfiguration template)
Description copied from interface:org.infinispan.commons.configuration.Builder
Reads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
read
in interfaceorg.infinispan.commons.configuration.Builder<RestServerConfiguration>
- Overrides:
read
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Parameters:
template
- the configuration from which to "clone" this config if needed.
-
build
public RestServerConfiguration build()
Description copied from interface:ProtocolServerConfigurationChildBuilder
Builds a configuration object- Specified by:
build
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
build
public RestServerConfiguration build(boolean validate)
-
self
public RestServerConfigurationBuilder self()
- Specified by:
self
in interfaceorg.infinispan.commons.configuration.Self<RestServerConfigurationBuilder>
-
defaultCacheName
public RestServerConfigurationBuilder defaultCacheName(String defaultCacheName)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the cache to use as a default cache for the protocol- Specified by:
defaultCacheName
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
defaultCacheName
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
idleTimeout
public RestServerConfigurationBuilder idleTimeout(int idleTimeout)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Specifies the maximum time that connections from client will be kept open without activity- Specified by:
idleTimeout
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
idleTimeout
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
tcpNoDelay
public RestServerConfigurationBuilder tcpNoDelay(boolean tcpNoDelay)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Affects TCP NODELAY on the TCP stack. Defaults to enabled- Specified by:
tcpNoDelay
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
tcpNoDelay
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
tcpKeepAlive
public RestServerConfigurationBuilder tcpKeepAlive(boolean tcpKeepAlive)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Affects TCP KEEPALIVE on the TCP stack. Defaults to disabled- Specified by:
tcpKeepAlive
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
tcpKeepAlive
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
recvBufSize
public RestServerConfigurationBuilder recvBufSize(int recvBufSize)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the size of the receive buffer- Specified by:
recvBufSize
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
recvBufSize
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
sendBufSize
public RestServerConfigurationBuilder sendBufSize(int sendBufSize)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the size of the send buffer- Specified by:
sendBufSize
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
sendBufSize
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
workerThreads
public RestServerConfigurationBuilder workerThreads(int workerThreads)
Description copied from interface:ProtocolServerConfigurationChildBuilder
Sets the number of worker threads- Specified by:
workerThreads
in interfaceProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
- Overrides:
workerThreads
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
-