public class RestServerConfigurationBuilder extends ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder> implements Builder<RestServerConfiguration>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_COMPRESS_LEVEL |
static String |
DEFAULT_CONTEXT_PATH |
static int |
DEFAULT_MAX_CONTENT_LENGTH |
static String |
DEFAULT_NAME |
static int |
DEFAULT_PORT |
adminOperationsHandler, defaultCacheName, host, idleTimeout, ignoredCaches, name, port, recvBufSize, sendBufSize, ssl, startTransport, tcpNoDelay, workerThreads
Constructor and Description |
---|
RestServerConfigurationBuilder() |
Modifier and Type | Method and Description |
---|---|
RestServerConfigurationBuilder |
addAll(List<io.netty.handler.codec.http.cors.CorsConfig> corsConfig) |
RestServerConfiguration |
build()
Builds a configuration object
|
RestServerConfiguration |
build(boolean validate) |
RestServerConfigurationBuilder |
compressionLevel(int compressLevel) |
RestServerConfigurationBuilder |
contextPath(String contextPath) |
RestServerConfigurationBuilder |
corsAllowForLocalhost(String scheme,
int port) |
RestServerConfiguration |
create()
Create the configuration bean
|
RestServerConfigurationBuilder |
defaultCacheName(String defaultCacheName)
Specifies the cache to use as a default cache for the protocol
|
RestServerConfigurationBuilder |
extendedHeaders(ExtendedHeaders extendedHeaders) |
RestServerConfigurationBuilder |
idleTimeout(int idleTimeout)
Specifies the maximum time that connections from client will be kept open without activity
|
RestServerConfigurationBuilder |
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 buffer
|
RestServerConfigurationBuilder |
self() |
RestServerConfigurationBuilder |
sendBufSize(int sendBufSize)
Sets the size of the send buffer
|
RestServerConfigurationBuilder |
tcpNoDelay(boolean tcpNoDelay)
Affects TCP NODELAY on the TCP stack.
|
void |
validate()
Validate the data in this builder before building the configuration bean
|
RestServerConfigurationBuilder |
workerThreads(int workerThreads)
Sets the number of worker threads
|
adminOperationsHandler, host, ignoredCaches, name, name, port, ssl, startTransport
public static final String DEFAULT_CONTEXT_PATH
public static final int DEFAULT_PORT
public static final String DEFAULT_NAME
public static final int DEFAULT_MAX_CONTENT_LENGTH
public static final int DEFAULT_COMPRESS_LEVEL
public RestServerConfigurationBuilder extendedHeaders(ExtendedHeaders extendedHeaders)
public RestServerConfigurationBuilder contextPath(String contextPath)
public RestServerConfigurationBuilder maxContentLength(int maxContentLength)
public RestServerConfigurationBuilder compressionLevel(int compressLevel)
public RestServerConfigurationBuilder corsAllowForLocalhost(String scheme, int port)
public RestServerConfigurationBuilder addAll(List<io.netty.handler.codec.http.cors.CorsConfig> corsConfig)
public void validate()
Builder
validate
in interface Builder<RestServerConfiguration>
validate
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfiguration create()
Builder
create
in interface Builder<RestServerConfiguration>
public Builder<?> read(RestServerConfiguration template)
Builder
read
in interface Builder<RestServerConfiguration>
read
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
template
- the configuration from which to "clone" this config if needed.public RestServerConfiguration build()
ProtocolServerConfigurationChildBuilder
build
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfiguration build(boolean validate)
public RestServerConfigurationBuilder self()
self
in interface Self<RestServerConfigurationBuilder>
public RestServerConfigurationBuilder defaultCacheName(String defaultCacheName)
ProtocolServerConfigurationChildBuilder
defaultCacheName
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
defaultCacheName
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfigurationBuilder idleTimeout(int idleTimeout)
ProtocolServerConfigurationChildBuilder
idleTimeout
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
idleTimeout
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfigurationBuilder tcpNoDelay(boolean tcpNoDelay)
ProtocolServerConfigurationChildBuilder
tcpNoDelay
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
tcpNoDelay
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfigurationBuilder recvBufSize(int recvBufSize)
ProtocolServerConfigurationChildBuilder
recvBufSize
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
recvBufSize
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfigurationBuilder sendBufSize(int sendBufSize)
ProtocolServerConfigurationChildBuilder
sendBufSize
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
sendBufSize
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
public RestServerConfigurationBuilder workerThreads(int workerThreads)
ProtocolServerConfigurationChildBuilder
workerThreads
in interface ProtocolServerConfigurationChildBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
workerThreads
in class ProtocolServerConfigurationBuilder<RestServerConfiguration,RestServerConfigurationBuilder>
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.