Class HelplineAgent

  • All Implemented Interfaces:
    IHelpline

    public class HelplineAgent
    extends java.lang.Object
    implements IHelpline
    Helpline component for a single person of interest.
    • Field Detail

      • person

        protected java.lang.String person
        The name of the person of interest.
      • infos

        protected java.util.Set<InformationEntry> infos
        The information about the person.
    • Constructor Detail

      • HelplineAgent

        public HelplineAgent()
    • Method Detail

      • addInformation

        public IFuture<java.lang.Void> addInformation​(java.lang.String info)
        Add new information about a person, e.g. from GUI.
        Specified by:
        addInformation in interface IHelpline
        Parameters:
        info - The information text.
      • getInformation

        public IFuture<java.util.Set<InformationEntry>> getInformation()
        Receive all locally stored information about a person (i.e. pull).
        Specified by:
        getInformation in interface IHelpline
        Returns:
        Future that contains all currently known information in a set of records.
      • forwardInformation

        public IFuture<java.lang.Void> forwardInformation​(InformationEntry entry)
        Forward existing information to this service, e.g. from other helpline nodes (i.e. push).
        Specified by:
        forwardInformation in interface IHelpline
        Parameters:
        entry - The information record.
      • postInformation

        protected void postInformation​(InformationEntry entry)
        Asynchronously post new information to interested parties.
        Parameters:
        entry - The new information.