Package org.sdase.commons.client.jersey
Class JerseyClientBundle<C extends io.dropwizard.Configuration>
- java.lang.Object
-
- org.sdase.commons.client.jersey.JerseyClientBundle<C>
-
- All Implemented Interfaces:
io.dropwizard.ConfiguredBundle<C>
public class JerseyClientBundle<C extends io.dropwizard.Configuration> extends java.lang.Object implements io.dropwizard.ConfiguredBundle<C>
A bundle that provides Jersey clients with appropriate configuration for the SDA Platform.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JerseyClientBundle.Builder<C extends io.dropwizard.Configuration>
static interface
JerseyClientBundle.ConsumerTokenProvider<C extends io.dropwizard.Configuration>
Provides the consumer token that is added to outgoing requests from the configuration.static interface
JerseyClientBundle.FinalBuilder<C extends io.dropwizard.Configuration>
static interface
JerseyClientBundle.InitialBuilder<C extends io.dropwizard.Configuration>
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JerseyClientBundle.InitialBuilder<io.dropwizard.Configuration>
builder()
ClientFactory
getClientFactory()
void
initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
void
run(C configuration, io.dropwizard.setup.Environment environment)
-
-
-
Method Detail
-
builder
public static JerseyClientBundle.InitialBuilder<io.dropwizard.Configuration> builder()
-
initialize
public void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
- Specified by:
initialize
in interfaceio.dropwizard.ConfiguredBundle<C extends io.dropwizard.Configuration>
-
run
public void run(C configuration, io.dropwizard.setup.Environment environment)
- Specified by:
run
in interfaceio.dropwizard.ConfiguredBundle<C extends io.dropwizard.Configuration>
-
getClientFactory
public ClientFactory getClientFactory()
- Returns:
- a factory to build clients that can be either used to call within the SDA platform or to call external services
- Throws:
java.lang.IllegalStateException
- if called beforeApplication.run(Configuration, Environment)
because the factory has to be initialized withinConfiguredBundle.run(Object, Environment)
-
-