Class HelplineAgent
- java.lang.Object
-
- jadex.micro.examples.helplinemega.HelplineAgent
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected java.util.Set<InformationEntry>infosThe information about the person.protected java.lang.StringpersonThe name of the person of interest.
-
Constructor Summary
Constructors Constructor Description HelplineAgent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>addInformation(java.lang.String info)Add new information about a person, e.g.IFuture<java.lang.Void>forwardInformation(InformationEntry entry)Forward existing information to this service, e.g.IFuture<java.util.Set<InformationEntry>>getInformation()Receive all locally stored information about a person (i.e.protected voidpostInformation(InformationEntry entry)Asynchronously post new information to interested parties.IIntermediateFuture<InformationEntry>searchInformation()Search for information about a person in the network (i.e.
-
-
-
Field Detail
-
person
protected java.lang.String person
The name of the person of interest.
-
agent
protected IInternalAccess agent
The agent.
-
infos
protected java.util.Set<InformationEntry> infos
The information about the person.
-
-
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:
addInformationin interfaceIHelpline- 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:
getInformationin interfaceIHelpline- 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:
forwardInformationin interfaceIHelpline- Parameters:
entry- The information record.
-
searchInformation
public IIntermediateFuture<InformationEntry> searchInformation()
Search for information about a person in the network (i.e. pull). The information is stored locally.- Specified by:
searchInformationin interfaceIHelpline- Returns:
- All information that can currently be found.
-
postInformation
protected void postInformation(InformationEntry entry)
Asynchronously post new information to interested parties.- Parameters:
entry- The new information.
-
-