Interface HttpConnectionHandlerCfgClient
- All Superinterfaces:
ConfigurationClient
,ConnectionHandlerCfgClient
HTTP Connection Handlers provide HTTP services built on top of the underlying LDAP directory.
-
Method Summary
Modifier and TypeMethodDescriptionManagedObjectDefinition<? extends HttpConnectionHandlerCfgClient,
? extends HttpConnectionHandlerCfg> Get the configuration definition associated with this HTTP Connection Handler.Gets the "accept-backlog" property.SortedSet<ValueOrExpression<com.forgerock.opendj.util.Host>>
Gets the "advertised-listen-address" property.Gets the "buffer-size" property.Gets the "java-class" property.Gets the "key-manager-provider" property.SortedSet<ValueOrExpression<com.forgerock.opendj.util.Host>>
Gets the "listen-address" property.Gets the "listen-port" property.Gets the "max-blocked-write-time-limit" property.Gets the "max-concurrent-ops-per-connection" property.Gets the "max-request-size" property.Gets the "num-request-handlers" property.Gets the "ssl-cert-nickname" property.Gets the "ssl-cipher-suite" property.Gets the "ssl-client-auth-policy" property.Gets the "ssl-protocol" property.Gets the "trust-manager-provider" property.Gets the "allow-tcp-reuse-address" property.Gets the "api-descriptor-enabled" property.Gets the "keep-stats" property.isUseSsl()
Gets the "use-ssl" property.Gets the "use-tcp-keep-alive" property.Gets the "use-tcp-no-delay" property.void
setAcceptBacklog
(ValueOrExpression<Integer> value) Sets the "accept-backlog" property.void
setAdvertisedListenAddress
(Collection<ValueOrExpression<com.forgerock.opendj.util.Host>> values) Sets the "advertised-listen-address" property.void
Sets the "allow-tcp-reuse-address" property.void
Sets the "api-descriptor-enabled" property.void
setBufferSize
(ValueOrExpression<Long> value) Sets the "buffer-size" property.void
setJavaClass
(ValueOrExpression<String> value) Sets the "java-class" property.void
setKeepStats
(ValueOrExpression<Boolean> value) Sets the "keep-stats" property.void
Sets the "key-manager-provider" property.void
setListenAddress
(Collection<ValueOrExpression<com.forgerock.opendj.util.Host>> values) Sets the "listen-address" property.void
setListenPort
(ValueOrExpression<Integer> value) Sets the "listen-port" property.void
Sets the "max-blocked-write-time-limit" property.void
Sets the "max-concurrent-ops-per-connection" property.void
setMaxRequestSize
(ValueOrExpression<Long> value) Sets the "max-request-size" property.void
Sets the "num-request-handlers" property.void
setSslCertNickname
(Collection<ValueOrExpression<String>> values) Sets the "ssl-cert-nickname" property.void
setSslCipherSuite
(Collection<ValueOrExpression<String>> values) Sets the "ssl-cipher-suite" property.void
Sets the "ssl-client-auth-policy" property.void
setSslProtocol
(Collection<ValueOrExpression<String>> values) Sets the "ssl-protocol" property.void
Sets the "trust-manager-provider" property.void
setUseSsl
(ValueOrExpression<Boolean> value) Sets the "use-ssl" property.void
Sets the "use-tcp-keep-alive" property.void
setUseTcpNoDelay
(ValueOrExpression<Boolean> value) Sets the "use-tcp-no-delay" property.Methods inherited from interface org.forgerock.opendj.config.ConfigurationClient
commit, properties
Methods inherited from interface org.forgerock.opendj.server.config.client.ConnectionHandlerCfgClient
getAllowedClient, getDeniedClient, getRestrictedClient, getRestrictedClientConnectionLimit, isEnabled, setAllowedClient, setDeniedClient, setEnabled, setRestrictedClient, setRestrictedClientConnectionLimit
-
Method Details
-
definition
ManagedObjectDefinition<? extends HttpConnectionHandlerCfgClient,? extends HttpConnectionHandlerCfg> definition()Get the configuration definition associated with this HTTP Connection Handler.- Specified by:
definition
in interfaceConfigurationClient
- Specified by:
definition
in interfaceConnectionHandlerCfgClient
- Returns:
- Returns the configuration definition associated with this HTTP Connection Handler.
-
getAcceptBacklog
ValueOrExpression<Integer> getAcceptBacklog()Gets the "accept-backlog" property.Specifies the maximum number of pending connection attempts that are allowed to queue up in the accept backlog before the server starts rejecting new connection attempts.
This is primarily an issue for cases in which a large number of connections are established to the server in a very short period of time (for example, a benchmark utility that creates a large number of client threads that each have their own connection to the server) and the connection handler is unable to keep up with the rate at which the new connections are established.
Default value:
128
- Returns:
- Returns the value of the "accept-backlog" property.
-
setAcceptBacklog
Sets the "accept-backlog" property.Specifies the maximum number of pending connection attempts that are allowed to queue up in the accept backlog before the server starts rejecting new connection attempts.
This is primarily an issue for cases in which a large number of connections are established to the server in a very short period of time (for example, a benchmark utility that creates a large number of client threads that each have their own connection to the server) and the connection handler is unable to keep up with the rate at which the new connections are established.
- Parameters:
value
- The value of the "accept-backlog" property.- Throws:
PropertyException
- If the new value is invalid.
-
getAdvertisedListenAddress
@MandatoryProperty SortedSet<ValueOrExpression<com.forgerock.opendj.util.Host>> getAdvertisedListenAddress()Gets the "advertised-listen-address" property.The advertised address(es) which clients should use for connecting to this HTTP Connection Handler.
Multiple addresses may be provided as separate values for this attribute. The meta-address 0.0.0.0 is not permitted.
Default value is inherited from another property
- Returns:
- Returns the values of the "advertised-listen-address" property.
-
setAdvertisedListenAddress
@MandatoryProperty void setAdvertisedListenAddress(Collection<ValueOrExpression<com.forgerock.opendj.util.Host>> values) throws PropertyException Sets the "advertised-listen-address" property.The advertised address(es) which clients should use for connecting to this HTTP Connection Handler.
Multiple addresses may be provided as separate values for this attribute. The meta-address 0.0.0.0 is not permitted.
- Parameters:
values
- The values of the "advertised-listen-address" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
isAllowTcpReuseAddress
ValueOrExpression<Boolean> isAllowTcpReuseAddress()Gets the "allow-tcp-reuse-address" property.Indicates whether the HTTP Connection Handler should reuse socket descriptors.
If enabled, the SO_REUSEADDR socket option is used on the server listen socket to potentially allow the reuse of socket descriptors for clients in a TIME_WAIT state. This may help the server avoid temporarily running out of socket descriptors in cases in which a very large number of short-lived connections have been established from the same client system.
Default value:
true
- Returns:
- Returns the value of the "allow-tcp-reuse-address" property.
-
setAllowTcpReuseAddress
Sets the "allow-tcp-reuse-address" property.Indicates whether the HTTP Connection Handler should reuse socket descriptors.
If enabled, the SO_REUSEADDR socket option is used on the server listen socket to potentially allow the reuse of socket descriptors for clients in a TIME_WAIT state. This may help the server avoid temporarily running out of socket descriptors in cases in which a very large number of short-lived connections have been established from the same client system.
- Parameters:
value
- The value of the "allow-tcp-reuse-address" property.- Throws:
PropertyException
- If the new value is invalid.
-
isApiDescriptorEnabled
ValueOrExpression<Boolean> isApiDescriptorEnabled()Gets the "api-descriptor-enabled" property.Indicates whether the HTTP Connection Handler should publish Swagger and CREST API descriptors.
When enabled, API descriptors facilitate development of new client applications. The API descriptors are not protected and are not recommended for production systems."
Default value:
true
- Returns:
- Returns the value of the "api-descriptor-enabled" property.
-
setApiDescriptorEnabled
Sets the "api-descriptor-enabled" property.Indicates whether the HTTP Connection Handler should publish Swagger and CREST API descriptors.
When enabled, API descriptors facilitate development of new client applications. The API descriptors are not protected and are not recommended for production systems."
- Parameters:
value
- The value of the "api-descriptor-enabled" property.- Throws:
PropertyException
- If the new value is invalid.
-
getBufferSize
ValueOrExpression<Long> getBufferSize()Gets the "buffer-size" property.Specifies the size in bytes of the HTTP response message write buffer.
This property specifies write buffer size allocated by the server for each client connection and used to buffer HTTP response messages data when writing.
Default value:
4096 bytes
- Returns:
- Returns the value of the "buffer-size" property.
-
setBufferSize
Sets the "buffer-size" property.Specifies the size in bytes of the HTTP response message write buffer.
This property specifies write buffer size allocated by the server for each client connection and used to buffer HTTP response messages data when writing.
- Parameters:
value
- The value of the "buffer-size" property.- Throws:
PropertyException
- If the new value is invalid.
-
getJavaClass
Gets the "java-class" property.Specifies the fully-qualified name of the Java class that provides the HTTP Connection Handler implementation.
Default value:
org.opends.server.protocols.http.HTTPConnectionHandler
- Specified by:
getJavaClass
in interfaceConnectionHandlerCfgClient
- Returns:
- Returns the value of the "java-class" property.
-
setJavaClass
Sets the "java-class" property.Specifies the fully-qualified name of the Java class that provides the HTTP Connection Handler implementation.
- Specified by:
setJavaClass
in interfaceConnectionHandlerCfgClient
- Parameters:
value
- The value of the "java-class" property.- Throws:
PropertyException
- If the new value is invalid.
-
isKeepStats
ValueOrExpression<Boolean> isKeepStats()Gets the "keep-stats" property.Indicates whether the HTTP Connection Handler should keep statistics.
If enabled, the HTTP Connection Handler maintains statistics about the number and types of operations requested over HTTP and the amount of data sent and received.
Default value:
true
- Returns:
- Returns the value of the "keep-stats" property.
-
setKeepStats
Sets the "keep-stats" property.Indicates whether the HTTP Connection Handler should keep statistics.
If enabled, the HTTP Connection Handler maintains statistics about the number and types of operations requested over HTTP and the amount of data sent and received.
- Parameters:
value
- The value of the "keep-stats" property.- Throws:
PropertyException
- If the new value is invalid.
-
getKeyManagerProvider
ValueOrExpression<String> getKeyManagerProvider()Gets the "key-manager-provider" property.Specifies the name of the key manager that should be used with this HTTP Connection Handler .
Default value is undefined
- Returns:
- Returns the value of the "key-manager-provider" property.
-
setKeyManagerProvider
Sets the "key-manager-provider" property.Specifies the name of the key manager that should be used with this HTTP Connection Handler .
- Parameters:
value
- The value of the "key-manager-provider" property.- Throws:
PropertyException
- If the new value is invalid.
-
getListenAddress
SortedSet<ValueOrExpression<com.forgerock.opendj.util.Host>> getListenAddress()Gets the "listen-address" property.The network interface(s) on which this HTTP Connection Handler should listen for incoming client connections.
Multiple addresses may be provided as separate values for this attribute. If no values are provided, then the directory server will listen on all interfaces.
Default value is inherited from another property
- Returns:
- Returns the values of the "listen-address" property.
-
setListenAddress
void setListenAddress(Collection<ValueOrExpression<com.forgerock.opendj.util.Host>> values) throws PropertyException Sets the "listen-address" property.The network interface(s) on which this HTTP Connection Handler should listen for incoming client connections.
Multiple addresses may be provided as separate values for this attribute. If no values are provided, then the directory server will listen on all interfaces.
- Parameters:
values
- The values of the "listen-address" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
getListenPort
Gets the "listen-port" property.Specifies the port number on which the HTTP Connection Handler will listen for connections from clients.
Only a single port number may be provided.
- Returns:
- Returns the value of the "listen-port" property.
-
setListenPort
Sets the "listen-port" property.Specifies the port number on which the HTTP Connection Handler will listen for connections from clients.
Only a single port number may be provided.
- Parameters:
value
- The value of the "listen-port" property.- Throws:
PropertyException
- If the new value is invalid.
-
getMaxBlockedWriteTimeLimit
ValueOrExpression<Long> getMaxBlockedWriteTimeLimit()Gets the "max-blocked-write-time-limit" property.Specifies the maximum length of time that attempts to write data to HTTP clients should be allowed to block.
If an attempt to write data to a client takes longer than this length of time, then the client connection is terminated.
Default value:
30 seconds
- Returns:
- Returns the value of the "max-blocked-write-time-limit" property.
-
setMaxBlockedWriteTimeLimit
Sets the "max-blocked-write-time-limit" property.Specifies the maximum length of time that attempts to write data to HTTP clients should be allowed to block.
If an attempt to write data to a client takes longer than this length of time, then the client connection is terminated.
- Parameters:
value
- The value of the "max-blocked-write-time-limit" property.- Throws:
PropertyException
- If the new value is invalid.
-
getMaxConcurrentOpsPerConnection
ValueOrExpression<Integer> getMaxConcurrentOpsPerConnection()Gets the "max-concurrent-ops-per-connection" property.Specifies the maximum number of internal operations that each HTTP client connection can execute concurrently.
This property allow to limit the impact that each HTTP request can have on the whole server by limiting the number of internal operations that each HTTP request can execute concurrently. A value of 0 means that no limit is enforced.
- Returns:
- Returns the value of the "max-concurrent-ops-per-connection" property.
-
setMaxConcurrentOpsPerConnection
Sets the "max-concurrent-ops-per-connection" property.Specifies the maximum number of internal operations that each HTTP client connection can execute concurrently.
This property allow to limit the impact that each HTTP request can have on the whole server by limiting the number of internal operations that each HTTP request can execute concurrently. A value of 0 means that no limit is enforced.
- Parameters:
value
- The value of the "max-concurrent-ops-per-connection" property.- Throws:
PropertyException
- If the new value is invalid.
-
getMaxRequestSize
ValueOrExpression<Long> getMaxRequestSize()Gets the "max-request-size" property.Specifies the size in bytes of the largest HTTP request message that will be allowed by the HTTP Connection Handler.
This can help prevent denial-of-service attacks by clients that indicate they send extremely large requests to the server causing it to attempt to allocate large amounts of memory.
Default value:
5 megabytes
- Returns:
- Returns the value of the "max-request-size" property.
-
setMaxRequestSize
Sets the "max-request-size" property.Specifies the size in bytes of the largest HTTP request message that will be allowed by the HTTP Connection Handler.
This can help prevent denial-of-service attacks by clients that indicate they send extremely large requests to the server causing it to attempt to allocate large amounts of memory.
- Parameters:
value
- The value of the "max-request-size" property.- Throws:
PropertyException
- If the new value is invalid.
-
getNumRequestHandlers
ValueOrExpression<Integer> getNumRequestHandlers()Gets the "num-request-handlers" property.Specifies the number of request handlers that are used to read requests from clients.
The HTTP Connection Handler uses one thread to accept new connections from clients, but uses one or more additional threads to read requests from existing client connections. This ensures that new requests are read efficiently and that the connection handler itself does not become a bottleneck when the server is under heavy load from many clients at the same time.
- Returns:
- Returns the value of the "num-request-handlers" property.
-
setNumRequestHandlers
Sets the "num-request-handlers" property.Specifies the number of request handlers that are used to read requests from clients.
The HTTP Connection Handler uses one thread to accept new connections from clients, but uses one or more additional threads to read requests from existing client connections. This ensures that new requests are read efficiently and that the connection handler itself does not become a bottleneck when the server is under heavy load from many clients at the same time.
- Parameters:
value
- The value of the "num-request-handlers" property.- Throws:
PropertyException
- If the new value is invalid.
-
getSslCertNickname
SortedSet<ValueOrExpression<String>> getSslCertNickname()Gets the "ssl-cert-nickname" property.Specifies the nicknames (also called the aliases) of the keys or key pairs that the HTTP Connection Handler should use when performing SSL communication.
The property can be used multiple times (referencing different nicknames) when server certificates with different public key algorithms are used in parallel (for example, RSA, DSA, and ECC-based algorithms). When a nickname refers to an asymmetric (public/private) key pair, the nickname for the public key certificate and associated private key entry must match exactly. A single nickname is used to retrieve both the public key and the private key. This is only applicable when the HTTP Connection Handler is configured to use SSL.
- Returns:
- Returns the values of the "ssl-cert-nickname" property.
-
setSslCertNickname
Sets the "ssl-cert-nickname" property.Specifies the nicknames (also called the aliases) of the keys or key pairs that the HTTP Connection Handler should use when performing SSL communication.
The property can be used multiple times (referencing different nicknames) when server certificates with different public key algorithms are used in parallel (for example, RSA, DSA, and ECC-based algorithms). When a nickname refers to an asymmetric (public/private) key pair, the nickname for the public key certificate and associated private key entry must match exactly. A single nickname is used to retrieve both the public key and the private key. This is only applicable when the HTTP Connection Handler is configured to use SSL.
- Parameters:
values
- The values of the "ssl-cert-nickname" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
getSslCipherSuite
SortedSet<ValueOrExpression<String>> getSslCipherSuite()Gets the "ssl-cipher-suite" property.Specifies the names of the SSL cipher suites that are allowed for use in SSL communication.
- Returns:
- Returns the values of the "ssl-cipher-suite" property.
-
setSslCipherSuite
Sets the "ssl-cipher-suite" property.Specifies the names of the SSL cipher suites that are allowed for use in SSL communication.
- Parameters:
values
- The values of the "ssl-cipher-suite" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
getSslClientAuthPolicy
ValueOrExpression<HttpConnectionHandlerCfgDefn.SslClientAuthPolicy> getSslClientAuthPolicy()Gets the "ssl-client-auth-policy" property.Specifies the policy that the HTTP Connection Handler should use regarding client SSL certificates. Clients can use the SASL EXTERNAL mechanism only if the policy is set to "optional" or "required".
This is only applicable if clients are allowed to use SSL.
Default value:
optional
- Returns:
- Returns the value of the "ssl-client-auth-policy" property.
-
setSslClientAuthPolicy
void setSslClientAuthPolicy(ValueOrExpression<HttpConnectionHandlerCfgDefn.SslClientAuthPolicy> value) throws PropertyException Sets the "ssl-client-auth-policy" property.Specifies the policy that the HTTP Connection Handler should use regarding client SSL certificates. Clients can use the SASL EXTERNAL mechanism only if the policy is set to "optional" or "required".
This is only applicable if clients are allowed to use SSL.
- Parameters:
value
- The value of the "ssl-client-auth-policy" property.- Throws:
PropertyException
- If the new value is invalid.
-
getSslProtocol
SortedSet<ValueOrExpression<String>> getSslProtocol()Gets the "ssl-protocol" property.Specifies the names of the SSL protocols that are allowed for use in SSL communication.
- Returns:
- Returns the values of the "ssl-protocol" property.
-
setSslProtocol
Sets the "ssl-protocol" property.Specifies the names of the SSL protocols that are allowed for use in SSL communication.
- Parameters:
values
- The values of the "ssl-protocol" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
getTrustManagerProvider
SortedSet<ValueOrExpression<String>> getTrustManagerProvider()Gets the "trust-manager-provider" property.Specifies the name(s) of the trust manager(s) that should be used with the HTTP Connection Handler.
Default value is undefined
- Returns:
- Returns the values of the "trust-manager-provider" property.
-
setTrustManagerProvider
Sets the "trust-manager-provider" property.Specifies the name(s) of the trust manager(s) that should be used with the HTTP Connection Handler.
- Parameters:
values
- The values of the "trust-manager-provider" property.- Throws:
PropertyException
- If one or more of the new values are invalid.
-
isUseSsl
ValueOrExpression<Boolean> isUseSsl()Gets the "use-ssl" property.Indicates whether the HTTP Connection Handler should use SSL.
If enabled, the HTTP Connection Handler will use SSL to encrypt communication with the clients.
Default value:
false
- Returns:
- Returns the value of the "use-ssl" property.
-
setUseSsl
Sets the "use-ssl" property.Indicates whether the HTTP Connection Handler should use SSL.
If enabled, the HTTP Connection Handler will use SSL to encrypt communication with the clients.
- Parameters:
value
- The value of the "use-ssl" property.- Throws:
PropertyException
- If the new value is invalid.
-
isUseTcpKeepAlive
ValueOrExpression<Boolean> isUseTcpKeepAlive()Gets the "use-tcp-keep-alive" property.Indicates whether the HTTP Connection Handler should use TCP keep-alive.
If enabled, the SO_KEEPALIVE socket option is used to indicate that TCP keepalive messages should periodically be sent to the client to verify that the associated connection is still valid. This may also help prevent cases in which intermediate network hardware could silently drop an otherwise idle client connection, provided that the keepalive interval configured in the underlying operating system is smaller than the timeout enforced by the network hardware.
Default value:
true
- Returns:
- Returns the value of the "use-tcp-keep-alive" property.
-
setUseTcpKeepAlive
Sets the "use-tcp-keep-alive" property.Indicates whether the HTTP Connection Handler should use TCP keep-alive.
If enabled, the SO_KEEPALIVE socket option is used to indicate that TCP keepalive messages should periodically be sent to the client to verify that the associated connection is still valid. This may also help prevent cases in which intermediate network hardware could silently drop an otherwise idle client connection, provided that the keepalive interval configured in the underlying operating system is smaller than the timeout enforced by the network hardware.
- Parameters:
value
- The value of the "use-tcp-keep-alive" property.- Throws:
PropertyException
- If the new value is invalid.
-
isUseTcpNoDelay
ValueOrExpression<Boolean> isUseTcpNoDelay()Gets the "use-tcp-no-delay" property.Indicates whether the HTTP Connection Handler should use TCP no-delay.
If enabled, the TCP_NODELAY socket option is used to ensure that response messages to the client are sent immediately rather than potentially waiting to determine whether additional response messages can be sent in the same packet. In most cases, using the TCP_NODELAY socket option provides better performance and lower response times, but disabling it may help for some cases in which the server sends a large number of entries to a client in response to a search request.
Default value:
true
- Returns:
- Returns the value of the "use-tcp-no-delay" property.
-
setUseTcpNoDelay
Sets the "use-tcp-no-delay" property.Indicates whether the HTTP Connection Handler should use TCP no-delay.
If enabled, the TCP_NODELAY socket option is used to ensure that response messages to the client are sent immediately rather than potentially waiting to determine whether additional response messages can be sent in the same packet. In most cases, using the TCP_NODELAY socket option provides better performance and lower response times, but disabling it may help for some cases in which the server sends a large number of entries to a client in response to a search request.
- Parameters:
value
- The value of the "use-tcp-no-delay" property.- Throws:
PropertyException
- If the new value is invalid.
-