Class RestServerConfigurationBuilder
- java.lang.Object
-
- org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
- org.infinispan.rest.configuration.RestServerConfigurationBuilder
-
- All Implemented Interfaces:
Builder<RestServerConfiguration>
,Self<RestServerConfigurationBuilder>
,ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public class RestServerConfigurationBuilder extends ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder> implements Builder<RestServerConfiguration>
RestServerConfigurationBuilder.- Since:
- 5.3
- Author:
- Tristan Tarrant
-
-
Field Summary
-
Fields inherited from class org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder
attributes, ipFilter, 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)
AuthenticationConfigurationBuilder
authentication()
RestServerConfiguration
build()
Builds a configuration objectRestServerConfiguration
build(boolean validate)
RestServerConfigurationBuilder
compressionLevel(int compressLevel)
RestServerConfigurationBuilder
contextPath(String contextPath)
CorsConfigurationBuilder
cors()
RestServerConfiguration
create()
Create the configuration beanRestServerConfigurationBuilder
defaultCacheName(String defaultCacheName)
Specifies the cache to use as a default cache for the protocolEncryptionConfigurationBuilder
encryption()
RestServerConfigurationBuilder
extendedHeaders(ExtendedHeaders extendedHeaders)
RestServerConfigurationBuilder
idleTimeout(int idleTimeout)
Specifies the maximum time that connections from client will be kept open without activityRestServerConfigurationBuilder
maxContentLength(int maxContentLength)
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
staticResources(Path dir)
RestServerConfigurationBuilder
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 bean-
Methods inherited from class org.infinispan.server.core.configuration.ProtocolServerConfigurationBuilder
adminOperationsHandler, host, host, implicitConnector, ioThreads, ipFilter, name, name, port, port, socketBinding, socketBinding, ssl, startTransport, startTransport, workerThreads
-
-
-
-
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)
-
encryption
public EncryptionConfigurationBuilder encryption()
-
addAll
public RestServerConfigurationBuilder addAll(List<io.netty.handler.codec.http.cors.CorsConfig> corsConfig)
-
staticResources
public RestServerConfigurationBuilder staticResources(Path dir)
-
authentication
public AuthenticationConfigurationBuilder authentication()
-
cors
public CorsConfigurationBuilder cors()
-
validate
public void validate()
Description copied from interface:Builder
Validate the data in this builder before building the configuration bean- Specified by:
validate
in interfaceBuilder<RestServerConfiguration>
- Overrides:
validate
in classProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
-
create
public RestServerConfiguration create()
Description copied from interface:Builder
Create the configuration bean- Specified by:
create
in interfaceBuilder<RestServerConfiguration>
- Returns:
-
read
public Builder<?> read(RestServerConfiguration template)
Description copied from interface: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 interfaceBuilder<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 interfaceSelf<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>
-
-