Package org.opends.server.api
Class HttpEndpoint<C extends HttpEndpointCfg>
- java.lang.Object
-
- org.opends.server.api.HttpEndpoint<C>
-
- Type Parameters:
C
- Type of the configuration used by thisHttpEndpoint
- Direct Known Subclasses:
AdminEndpoint
,AliveEndpoint
,CrestMetricsEndpoint
,HealthyEndpoint
,PrometheusEndpoint
,Rest2LdapEndpoint
public abstract class HttpEndpoint<C extends HttpEndpointCfg> extends Object
Endpoint attach anHttpApplication
to an URI.
-
-
Field Summary
Fields Modifier and Type Field Description protected C
configuration
Configuration of this endpoint.protected ServerContext
serverContext
Context of this LDAP server.protected static Factory<org.forgerock.http.io.Buffer>
USE_DEFAULT_BUFFER_FACTORY
Use default buffer factory for creating temporary storage for handling requests.
-
Constructor Summary
Constructors Constructor Description HttpEndpoint(C configuration, ServerContext serverContext)
Create a newHttpEndpoint
with the given configuration.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
isConfigurationValid(List<LocalizableMessage> unacceptableReasons)
Check that the configuration of thisHttpEndpoint
is valid.abstract org.forgerock.http.HttpApplication
newHttpApplication()
Create a new HttpApplication.
-
-
-
Field Detail
-
USE_DEFAULT_BUFFER_FACTORY
protected static final Factory<org.forgerock.http.io.Buffer> USE_DEFAULT_BUFFER_FACTORY
Use default buffer factory for creating temporary storage for handling requests.
-
configuration
protected final C extends HttpEndpointCfg configuration
Configuration of this endpoint.
-
serverContext
protected final ServerContext serverContext
Context of this LDAP server.
-
-
Constructor Detail
-
HttpEndpoint
public HttpEndpoint(C configuration, ServerContext serverContext)
Create a newHttpEndpoint
with the given configuration.- Parameters:
configuration
- Configuration of thisHttpEndpoint
serverContext
- Context of this LDAP server
-
-
Method Detail
-
isConfigurationValid
public boolean isConfigurationValid(List<LocalizableMessage> unacceptableReasons)
Check that the configuration of thisHttpEndpoint
is valid. This default implementation try to instantiate and start the underlyingHttpApplication
.- Parameters:
unacceptableReasons
- A list that can be used to hold messages about why the configuration is not acceptable.- Returns:
- true if the configuration is valid.
-
newHttpApplication
public abstract org.forgerock.http.HttpApplication newHttpApplication() throws InitializationException
Create a new HttpApplication.- Returns:
- an
HttpApplication
configured and ready to be started. - Throws:
InitializationException
- If the application cannot be created.
-
-