{"action":"created","issue":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/314","labels_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/314/comments","events_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/314/events","html_url":"https://github.com/mohiva/play-silhouette/pull/314","id":62080131,"number":314,"title":"Extract EventBus trait","user":{"login":"igorbernstein","id":71188,"avatar_url":"https://avatars.githubusercontent.com/u/71188?v=3","gravatar_id":"","url":"https://api.github.com/users/igorbernstein","html_url":"https://github.com/igorbernstein","followers_url":"https://api.github.com/users/igorbernstein/followers","following_url":"https://api.github.com/users/igorbernstein/following{/other_user}","gists_url":"https://api.github.com/users/igorbernstein/gists{/gist_id}","starred_url":"https://api.github.com/users/igorbernstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorbernstein/subscriptions","organizations_url":"https://api.github.com/users/igorbernstein/orgs","repos_url":"https://api.github.com/users/igorbernstein/repos","events_url":"https://api.github.com/users/igorbernstein/events{/privacy}","received_events_url":"https://api.github.com/users/igorbernstein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-03-16T13:19:31Z","updated_at":"2015-03-17T14:41:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mohiva/play-silhouette/pulls/314","html_url":"https://github.com/mohiva/play-silhouette/pull/314","diff_url":"https://github.com/mohiva/play-silhouette/pull/314.diff","patch_url":"https://github.com/mohiva/play-silhouette/pull/314.patch"},"body":"This PR addresses #312.  It:\r\n- renames `com.mohiva.play.silhouette.api.EventBus` to `com.mohiva.play.silhouette.impl.util.AkkaEventBus`\r\n- creates a new trait `com.mohiva.play.silhouette.api.EventBus`\r\n- adds a noop `com.mohiva.play.silhouette.test.FakeEventBus`\r\n- simplifies SilhouetteSpec to use Mockito mocks & verifications instead of an Akka TestProbe"},"comment":{"url":"https://api.github.com/repos/mohiva/play-silhouette/issues/comments/82388271","html_url":"https://github.com/mohiva/play-silhouette/pull/314#issuecomment-82388271","issue_url":"https://api.github.com/repos/mohiva/play-silhouette/issues/314","id":82388271,"user":{"login":"rfranco","id":399203,"avatar_url":"https://avatars.githubusercontent.com/u/399203?v=3","gravatar_id":"","url":"https://api.github.com/users/rfranco","html_url":"https://github.com/rfranco","followers_url":"https://api.github.com/users/rfranco/followers","following_url":"https://api.github.com/users/rfranco/following{/other_user}","gists_url":"https://api.github.com/users/rfranco/gists{/gist_id}","starred_url":"https://api.github.com/users/rfranco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfranco/subscriptions","organizations_url":"https://api.github.com/users/rfranco/orgs","repos_url":"https://api.github.com/users/rfranco/repos","events_url":"https://api.github.com/users/rfranco/events{/privacy}","received_events_url":"https://api.github.com/users/rfranco/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T14:41:11Z","updated_at":"2015-03-17T14:41:11Z","body":"I agreed with @akkie. \r\nMy opinion is that Silhouette is a Play's library and Play use native Akka so it should use Akka EventBus. What can be done is create a trait EventBus that extends akka.EventBus then implement some types of eventbus with different Classifier and Subscriber. \r\n\r\nExample\r\n```scala\r\ntrait EventBus extends akka.event.EventBus {\r\n  type Event = SilhouetteEvent\r\n  type Classifier = Class[_ <: SilhouetteEvent]\r\n}\r\n\r\nclass ActorEventBus extends EventBus with  akka.event.ActorEventBus {\r\n....\r\n}\r\n```\r\n\r\nAnd dont make sense move akka implemetation to other project if Play use that.\r\nMaybe `Events` and `EventBus` can be move to a new package `com.mohiva.play.silhouette.api.events`.\r\n\r\n@akkie WDYT?\r\n"}}