diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-10-30 15:56:42 +0100 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2018-10-30 15:56:42 +0100 |
commit | 5535f8740060e3f237cc12124dd892565d6d2814 (patch) | |
tree | a48fd3ba604d3757f002f914dd4520618dedbdbd /exampleSite/content/docs/dropwizard-configuration.md | |
parent | b571e84efd027d047166125c38ee935c6171e305 (diff) |
Fill example site with Lorem Ipsum
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 |