{"action":"created","issue":{"url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/24","repository_url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets","labels_url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/24/comments","events_url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/24/events","html_url":"https://github.com/LivePersonInc/dropwizard-websockets/issues/24","id":335211314,"node_id":"MDU6SXNzdWUzMzUyMTEzMTQ=","number":24,"title":"Websocket Bundle cannot be initialised with zero arg constructor","user":{"login":"tomaytotomato","id":971697,"node_id":"MDQ6VXNlcjk3MTY5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/971697?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaytotomato","html_url":"https://github.com/tomaytotomato","followers_url":"https://api.github.com/users/tomaytotomato/followers","following_url":"https://api.github.com/users/tomaytotomato/following{/other_user}","gists_url":"https://api.github.com/users/tomaytotomato/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaytotomato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaytotomato/subscriptions","organizations_url":"https://api.github.com/users/tomaytotomato/orgs","repos_url":"https://api.github.com/users/tomaytotomato/repos","events_url":"https://api.github.com/users/tomaytotomato/events{/privacy}","received_events_url":"https://api.github.com/users/tomaytotomato/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-24T21:02:07Z","updated_at":"2018-06-28T13:53:45Z","closed_at":null,"author_association":"NONE","body":"Dropwizard 1.3.0\r\nDropwizard-websockets 1.3.2\r\n\r\nIn the docs it shows the possibility to create a Websocket bundle object in the Dropwizard Application class as a property.\r\n\r\nThen in the `run()` and `initialize()` stages you can add Websocket endpoints.\r\n\r\nHowever the WebsocketBundle class does not have a zero arg constructor. To hack it and make it work you have to provide a Websocket class.\r\nThis is not ideal if you are wanting to programmatically control the websocket instance. Therefore a `DummyWebsocket` was used as an argument, and is ignored by the application, like so.\r\n\r\npublic class ServiceApplication extends Application<ServiceConfiguration> {\r\n\r\n    private WebsocketBundle websocketBundle;\r\n\r\n    public static void main(final String[] args) throws Exception {\r\n        new ServiceApplication().run(args);\r\n    }\r\n\r\n\r\n    @Override\r\n    public void initialize(final Bootstrap<ServiceConfiguration> bootstrap) {\r\n\r\n        websocketBundle = new WebsocketBundle(DummyWebsocket.class);\r\n        bootstrap.addBundle(websocketBundle);\r\n\r\n    }\r\n\r\n    @Override\r\n    public void run(final ServiceConfiguration config,\r\n                    final Environment environment) {\r\n\r\n        //websocket - queue handler\r\n        final ServerEndpointConfig wsConfig = BasicServerEndpointConfig.Builder.create(WebsocketQueueHandler.class, \"/websocket\").build();\r\n        websocketBundle.addEndpoint(wsConfig);\r\n\r\n    }\r\n\r\nCan we have support to create a WebsocketBundle instance without any constructor arguments?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/comments/401042784","html_url":"https://github.com/LivePersonInc/dropwizard-websockets/issues/24#issuecomment-401042784","issue_url":"https://api.github.com/repos/LivePersonInc/dropwizard-websockets/issues/24","id":401042784,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTA0Mjc4NA==","user":{"login":"tomaytotomato","id":971697,"node_id":"MDQ6VXNlcjk3MTY5Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/971697?v=4","gravatar_id":"","url":"https://api.github.com/users/tomaytotomato","html_url":"https://github.com/tomaytotomato","followers_url":"https://api.github.com/users/tomaytotomato/followers","following_url":"https://api.github.com/users/tomaytotomato/following{/other_user}","gists_url":"https://api.github.com/users/tomaytotomato/gists{/gist_id}","starred_url":"https://api.github.com/users/tomaytotomato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomaytotomato/subscriptions","organizations_url":"https://api.github.com/users/tomaytotomato/orgs","repos_url":"https://api.github.com/users/tomaytotomato/repos","events_url":"https://api.github.com/users/tomaytotomato/events{/privacy}","received_events_url":"https://api.github.com/users/tomaytotomato/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T13:53:45Z","updated_at":"2018-06-28T13:53:45Z","author_association":"NONE","body":"Updated details"}}
{"actor":{"display_login":"tomaytotomato"}}