<commit_before>Websocket (JSR 356) bundle for Dropwizard
==========
[![Build Status](https://travis-ci.org/TomCools/dropwizard-websocket-jee7-bundle.png?branch=master)](https://travis-ci.org/TomCools/dropwizard-websocket-jee7-bundle)

*Adding some Websocket-magic to Dropwizard.*

This repository contains a Bundle to be used with Dropwizard.
For more information about Dropwizard, please visit: [dropwizard.io](http://www.dropwizard.io).

The goal of the bundle was to add support for the JSR 356 Websocket specification.
(Lookup since when Jetty supports this functionality).

How does the bundle work?
---
Add the maven dependency: 

    Currently this is work in progress.

Add the WebsocketBundle object to the Application.class and add the Endpoint classes you want to load:

    public class IntegrationTestApplication extends Application<IntegrationTestConfiguration> {
        private WebsocketBundle websocket = new WebsocketBundle();
    
        @Override
        public void initialize(Bootstrap<IntegrationTestConfiguration> bootstrap) {
            super.initialize(bootstrap);
            bootstrap.addBundle(websocket);
        }
    
        @Override
        public void run(IntegrationTestConfiguration configuration, Environment environment) throws Exception {
            websocket.addEndpoint(PingPongServerEndpoint.class);
        }
    }

Start your server. During startup, all registered Websocket-endpoints will be logged in the same way other resources are logged.

    INFO  [2015-05-08 22:07:22,980] be.tomcools.dropwizard.websocket.handling.WebsocketContainer: Registered websocket endpoints: 
    
    	GET		/pingpong (be.tomcools.dropwizard.websocket.integrationtest.annotatedjavaee.PingPongServerEndpoint)
    

    
Need help? Found an issue? Want extra functionality?<commit_msg>Updated readme file to include the new Maven Central dependency.<commit_after>Websocket (JSR 356) bundle for Dropwizard
==========
[![Build Status](https://travis-ci.org/TomCools/dropwizard-websocket-jee7-bundle.png?branch=master)](https://travis-ci.org/TomCools/dropwizard-websocket-jee7-bundle)

*Adding some Websocket-magic to Dropwizard.*

This repository contains a Bundle to be used with Dropwizard.
For more information about Dropwizard, please visit: [dropwizard.io](http://www.dropwizard.io).

The goal of the bundle was to add support for the JSR 356 Websocket specification.
(Lookup since when Jetty supports this functionality).

How does the bundle work?
---
Add the maven dependency: 

    <dependency>
      <groupId>be.tomcools</groupId>
      <artifactId>dropwizard-websocket-jee7-bundle</artifactId>
      <version>1.0.0</version>
    </dependency>

Add the WebsocketBundle object to the Application.class and add the Endpoint classes you want to load:

    public class IntegrationTestApplication extends Application<IntegrationTestConfiguration> {
        private WebsocketBundle websocket = new WebsocketBundle();
    
        @Override
        public void initialize(Bootstrap<IntegrationTestConfiguration> bootstrap) {
            super.initialize(bootstrap);
            bootstrap.addBundle(websocket);
        }
    
        @Override
        public void run(IntegrationTestConfiguration configuration, Environment environment) throws Exception {
            //Annotated endpoint
            websocket.addEndpoint(PingPongServerEndpoint.class);
    
            //programmatic endpoint
            ServerEndpointConfig serverEndpointConfig = ServerEndpointConfig.Builder.create(ProgrammaticServerEndpoint.class, "/programmatic").build();
            websocket.addEndpoint(serverEndpointConfig);
        }
    }

Start your server. During startup, all registered Websocket-endpoints will be logged in the same way other resources are logged.

    INFO  [2015-05-16 18:18:04,230] be.tomcools.dropwizard.websocket.handling.WebsocketContainer: Registered websocket endpoints: 
    
    	GET		/programmatic (be.tomcools.dropwizard.websocket.integrationtest.programmaticjavaee.ProgrammaticServerEndpoint)
    	GET		/pingpong (be.tomcools.dropwizard.websocket.integrationtest.annotatedjavaee.PingPongServerEndpoint)
    

    
Need help? Found an issue? Want extra functionality?
{'fraction_non_alphanumeric': 0.08048433048433049, 'fraction_numerical': 0.01282051282051282, 'mean_word_length': 3.91025641025641, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1935227', 'n_tokens_mistral': 1203, 'n_tokens_neox': 1114, 'n_words': 315}