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(Handler handler,
URI uri)
Creates a new
ConnectionFactory that map back and forth JSON resource objects to CHF objects. |
static Handler |
newHttpHandler(ConnectionFactory connectionFactory)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static Handler |
newHttpHandler(ConnectionFactory connectionFactory,
Context parentContext)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static Handler |
newHttpHandler(ConnectionFactory connectionFactory,
HttpContextFactory contextFactory)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static Handler |
newHttpHandler(CrestApplication application)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static Handler |
newHttpHandler(CrestApplication application,
Context context)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static Handler |
newHttpHandler(CrestApplication application,
HttpContextFactory factory)
Creates a new JSON resource HTTP handler with the provided CREST request handler.
|
static Handler |
newHttpHandler(RequestHandler handler)
Deprecated.
Use
newHttpHandler(CrestApplication) instead. |
static RequestHandler |
newRequestHandler(Handler handler,
URI uri)
Creates a new
RequestHandler that map back and forth JSON resource objects to CHF objects. |
@Deprecated public static Handler newHttpHandler(ConnectionFactory connectionFactory)
newHttpHandler(CrestApplication)
instead.connectionFactory
- The connection factory.Handler
.@Deprecated public static Handler newHttpHandler(ConnectionFactory connectionFactory, 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 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 Handler newHttpHandler(RequestHandler handler)
newHttpHandler(CrestApplication)
instead.handler
- The RequestHandler
.public static Handler newHttpHandler(CrestApplication application)
application
- The application.public static Handler newHttpHandler(CrestApplication application, HttpContextFactory factory)
application
- The application.factory
- A factory for creating parent HTTP Contexts.public static Handler newHttpHandler(CrestApplication application, Context context)
application
- The application.context
- The parent context to use for all contexts.public static RequestHandler newRequestHandler(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(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 © 2025 Open Identity Platform Community. All rights reserved.