Package net.sodacan.core.config
Class ActorMetadata
java.lang.Object
net.sodacan.core.config.ActorMetadata
Actor Metadata is gathered during configuration so that it can be static while the system is Active.
One instance per registered Actor type.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionActorMetadata
(Class<? extends Actor> actorClass, BiFunction<Config, ActorId, Actor> factory) -
Method Summary
Modifier and TypeMethodDescriptioncreateActor
(Config config, ActorId actorId) boolean
Determine if this ActorType has any fields with @Save annotation.boolean
protected void
Called from constructorvoid
Most Actors will declare one or more verbs that it can handle in the form of an enum.protected BiFunction
<Config, ActorId, Actor> toString()
-
Field Details
-
actorClass
-
saveFields
-
factory
-
generics
-
hostBound
protected boolean hostBound
-
-
Constructor Details
-
ActorMetadata
-
-
Method Details
-
getSaveFields
-
isHostBound
public boolean isHostBound() -
createActor
-
makeFactory
-
loadFieldMetadata
protected void loadFieldMetadata()Called from constructor -
loadVerbs
public void loadVerbs()Most Actors will declare one or more verbs that it can handle in the form of an enum. We find those verbs here so that when other actors send a message to this actor we know if it's valid or not. -
hasSaveFields
public boolean hasSaveFields()Determine if this ActorType has any fields with @Save annotation.- Returns:
- true if there are fields that need to be saved/restored.
-
getActorClass
-
toString
-