public final class CrestHttp extends Object
A CREST HTTP utility class which creates instances of the HttpAdapter
to handle CREST HTTP requests.
Instances must be provided with a ConnectionFactory
in order to
operate and optionally a HttpContextFactory
.
Modifier and Type | Method and Description |
---|---|
static ConnectionFactory |
newConnectionFactory(org.forgerock.http.Handler handler,
URI uri)
Creates a new
ConnectionFactory that map back and forth JSON resource objects to CHF objects. |
static org.forgerock.http.Handler |
newHttpHandler(ConnectionFactory connectionFactory)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static org.forgerock.http.Handler |
newHttpHandler(ConnectionFactory connectionFactory,
org.forgerock.services.context.Context parentContext)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static org.forgerock.http.Handler |
newHttpHandler(ConnectionFactory connectionFactory,
HttpContextFactory contextFactory)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static org.forgerock.http.Handler |
newHttpHandler(CrestApplication application)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static org.forgerock.http.Handler |
newHttpHandler(CrestApplication application,
org.forgerock.services.context.Context context)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static org.forgerock.http.Handler |
newHttpHandler(CrestApplication application,
HttpContextFactory factory)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static org.forgerock.http.Handler |
newHttpHandler(RequestHandler handler)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static RequestHandler |
newRequestHandler(org.forgerock.http.Handler handler,
URI uri)
Creates a new
RequestHandler that map back and forth JSON resource objects to CHF objects. |
@Deprecated public static org.forgerock.http.Handler newHttpHandler(ConnectionFactory connectionFactory)
newHttpHandler(CrestApplication)
instead.connectionFactory
- The connection factory.Handler
.@Deprecated public static org.forgerock.http.Handler newHttpHandler(ConnectionFactory connectionFactory, org.forgerock.services.context.Context parentContext)
newHttpHandler(CrestApplication)
instead.connectionFactory
- The connection factory.parentContext
- The parent request context which should be used as the parent
context of each request context.@Deprecated public static org.forgerock.http.Handler newHttpHandler(ConnectionFactory connectionFactory, HttpContextFactory contextFactory)
newHttpHandler(CrestApplication)
instead.connectionFactory
- The connection factory.contextFactory
- The context factory which will be used to obtain the parent
context of each request context.@Deprecated public static org.forgerock.http.Handler newHttpHandler(RequestHandler handler)
newHttpHandler(CrestApplication)
instead.handler
- The RequestHandler
.public static org.forgerock.http.Handler newHttpHandler(CrestApplication application)
application
- The application.public static org.forgerock.http.Handler newHttpHandler(CrestApplication application, HttpContextFactory factory)
application
- The application.factory
- A factory for creating parent HTTP Contexts.public static org.forgerock.http.Handler newHttpHandler(CrestApplication application, org.forgerock.services.context.Context context)
application
- The application.context
- The parent context to use for all contexts.public static RequestHandler newRequestHandler(org.forgerock.http.Handler handler, URI uri)
RequestHandler
that map back and forth JSON resource objects to CHF objects.handler
- HTTP Handler
responsible for emitting the HTTP request build from JSON resource Request
s.uri
- base URI used to build the target URI for built HTTP messageRequestHandler
public static ConnectionFactory newConnectionFactory(org.forgerock.http.Handler handler, URI uri)
ConnectionFactory
that map back and forth JSON resource objects to CHF objects.
Convenience method. Note that ConnectionFactory is going to be removed soon, so you may not need this.
handler
- HTTP Handler
responsible for emitting the HTTP request build from JSON resource Request
s.uri
- base URI used to build the target URI for built HTTP messageRequestHandler
Copyright 2010-2018 ForgeRock AS.