Class ActorMetadata

java.lang.Object
net.sodacan.core.config.ActorMetadata

public class ActorMetadata extends Object
Actor Metadata is gathered during configuration so that it can be static while the system is Active. One instance per registered Actor type.
  • Field Details

  • Constructor Details

  • Method Details

    • getSaveFields

      public Map<String,Field> getSaveFields()
    • isHostBound

      public boolean isHostBound()
    • createActor

      public Actor createActor(Config config, ActorId actorId)
    • makeFactory

      protected BiFunction<Config,ActorId,Actor> 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

      public Class<? extends Actor> getActorClass()
    • toString

      public String toString()
      Overrides:
      toString in class Object