diff options
Diffstat (limited to 'exampleSite/content/docs/dropwizard-configuration.md')
-rw-r--r-- | exampleSite/content/docs/dropwizard-configuration.md | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/exampleSite/content/docs/dropwizard-configuration.md b/exampleSite/content/docs/dropwizard-configuration.md deleted file mode 100644 index 9bfdb70..0000000 --- a/exampleSite/content/docs/dropwizard-configuration.md +++ /dev/null @@ -1,35 +0,0 @@ -## Dropwizard configuration - -Use provided `RxJerseyBundle` -```java -@Override -public void initialize(Bootstrap<RxJerseyConfiguration> bootstrap) { - bootstrap.addBundle(new RxJerseyBundle<RxJerseyConfiguration>() - .setClientConfigurationProvider(config -> config.client) - .register(HeaderInterceptor.class) - ); -} -``` - -Alternatively you can directly configure and register Jersey feature -```java -public void run(RxJerseyConfiguration configuration, Environment environment) throws Exception { - JerseyEnvironment jersey = environment.jersey(); - - Client client = new JerseyClientBuilder(environment) - .using(configuration.client) - .using(new GrizzlyConnectorProvider()) - .buildRx("Client", RxObservableInvoker.class); - - RxJerseyServerFeature rxJerseyServerFeature = new RxJerseyServerFeature() - .register(HeaderInterceptor.class); - - RxJerseyClientFeature rxJerseyClientFeature = new RxJerseyClientFeature() - .register(client); - - jersey.register(rxJerseyServerFeature); - jersey.register(rxJerseyClientFeature); -} -``` - -#### [See example](https://github.com/alex-shpak/rx-jersey/tree/master/example) for more information
\ No newline at end of file |