Java (Eclipse) compatibility of extensions, see #3469
* Eclipse JDT showed compilation error "The method get(ActorSystem) is ambiguous for the type..." for extensions defined with ExtensionKey
This commit is contained in:
parent
32a37ac96a
commit
9b3be181cf
11 changed files with 107 additions and 11 deletions
|
|
@ -21,6 +21,7 @@ class CountExtensionImpl extends Extension {
|
|||
//#extension
|
||||
|
||||
//#extensionid
|
||||
import akka.actor.ActorSystem
|
||||
import akka.actor.ExtensionId
|
||||
import akka.actor.ExtensionIdProvider
|
||||
import akka.actor.ExtendedActorSystem
|
||||
|
|
@ -37,6 +38,11 @@ object CountExtension
|
|||
//This method will be called by Akka
|
||||
// to instantiate our Extension
|
||||
override def createExtension(system: ExtendedActorSystem) = new CountExtensionImpl
|
||||
|
||||
/**
|
||||
* Java API: retrieve the Count extension for the given system.
|
||||
*/
|
||||
override def get(system: ActorSystem): CountExtensionImpl = super.get(system)
|
||||
}
|
||||
//#extensionid
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue