abstract class ExtensionKey[T <: Extension] extends ExtensionId[T] with ExtensionIdProvider
This is a one-stop-shop if all you want is an extension which is constructed with the ExtendedActorSystem as its only constructor argument:
object MyExt extends ExtensionKey[Ext] class Ext(system: ExtendedActorSystem) extends Extension { ... }
Java API:
public class MyExt extends Extension { public static final ExtensionKey<MyExt> key = new ExtensionKey<MyExt>(MyExt.class); public MyExt(ExtendedActorSystem system) { ... } }
Note: Don't use this class if the extension is written in Scala and consumed in
Eclipse Java projects. JDT has problems resolving correct type for the
get
method.
- Source
- Extension.scala
- Alphabetic
- By Inheritance
- ExtensionKey
- ExtensionIdProvider
- ExtensionId
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to any2stringadd[ExtensionKey[T]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (ExtensionKey[T], B)
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to ArrowAssoc[ExtensionKey[T]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(system: ActorSystem): T
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance.
- Definition Classes
- ExtensionId
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
createExtension(system: ExtendedActorSystem): T
Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.
Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.
- Definition Classes
- ExtensionKey → ExtensionId
-
def
ensuring(cond: (ExtensionKey[T]) ⇒ Boolean, msg: ⇒ Any): ExtensionKey[T]
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to Ensuring[ExtensionKey[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ExtensionKey[T]) ⇒ Boolean): ExtensionKey[T]
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to Ensuring[ExtensionKey[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ExtensionKey[T]
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to Ensuring[ExtensionKey[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ExtensionKey[T]
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to Ensuring[ExtensionKey[T]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
equals(other: Any): Boolean
- Definition Classes
- ExtensionId → AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to StringFormat[ExtensionKey[T]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
get(system: ActorSystem): T
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used used from Java also, this method should be overridden to get correct return type.
override def get(system: ActorSystem): TheExtension = super.get(system)
- Definition Classes
- ExtensionId
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
hashCode(): Int
- Definition Classes
- ExtensionId → AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lookup(): ExtensionId[T]
Returns the canonical ExtensionId for this Extension
Returns the canonical ExtensionId for this Extension
- Definition Classes
- ExtensionKey → ExtensionIdProvider
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
→[B](y: B): (ExtensionKey[T], B)
- Implicit
- This member is added by an implicit conversion from ExtensionKey[T] to ArrowAssoc[ExtensionKey[T]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc