Package jade.tools.applet
Class DFAppletCommunicator
- java.lang.Object
-
- jade.tools.applet.DFAppletCommunicator
-
- All Implemented Interfaces:
DFGUIAdapter
public class DFAppletCommunicator extends Object implements DFGUIAdapter
This class is used by DFApplet in order to communicate with the DF agent via a socket connection. The socket server is implemented by the agent jade.tools.SocketProxyAgent.- Version:
- $Date$ $Revision$
- Author:
- Fabio Bellifemine - CSELT - 25/8/1999
- See Also:
SocketProxyAgent
-
-
Field Summary
-
Fields inherited from interface jade.domain.DFGUIAdapter
CLOSEGUI, DEREGISTER, EXIT, FEDERATE, MODIFY, REFRESHAPPLET, REGISTER, SEARCH
-
-
Constructor Summary
Constructors Constructor Description DFAppletCommunicator(Applet applet)Create a socket to communicate with a server on port 6789 of the host that the applet's code is on.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoDelete()shows the message not authorized and does nothing.DFAgentDescriptiongetDescriptionOfThisDF()This method returns the description of this df.DFAgentDescriptiongetDescriptionOfThisDF(AID df)This method returns the description used by the df to federate with a given parent DF.DFAgentDescriptiongetDFAgentDsc(AID name)This method requests the df the DFAgentDescription of a specific agent.StringgetName()returns "df" that is the name of the default DF.voidpostGuiEvent(GuiEvent event)According to the event generatated by the applet, this method performes the needed actions.voidrefreshDFGUI()Refresh the gui of the applet.
-
-
-
Constructor Detail
-
DFAppletCommunicator
public DFAppletCommunicator(Applet applet)
Create a socket to communicate with a server on port 6789 of the host that the applet's code is on. Create streams to use with the socket. Finally, gets the value of the parameterJADEAddressfrom the HTML file.
-
-
Method Detail
-
doDelete
public void doDelete()
shows the message not authorized and does nothing.
-
getName
public String getName()
returns "df" that is the name of the default DF. In fact, so far this applet can be used only to interact with the default DF.
-
postGuiEvent
public void postGuiEvent(GuiEvent event)
According to the event generatated by the applet, this method performes the needed actions.- Specified by:
postGuiEventin interfaceDFGUIAdapter
-
refreshDFGUI
public void refreshDFGUI()
Refresh the gui of the applet. First of all makes a search for all agent registered with the df, then updates the federate view, requesting the parents to the df.
-
getDFAgentDsc
public DFAgentDescription getDFAgentDsc(AID name) throws FIPAException
This method requests the df the DFAgentDescription of a specific agent.- Specified by:
getDFAgentDscin interfaceDFGUIAdapter- Parameters:
name- The AID of the agent.- Throws:
FIPAException
-
getDescriptionOfThisDF
public DFAgentDescription getDescriptionOfThisDF()
Description copied from interface:DFGUIAdapterThis method returns the description of this df.- Specified by:
getDescriptionOfThisDFin interfaceDFGUIAdapter
-
getDescriptionOfThisDF
public DFAgentDescription getDescriptionOfThisDF(AID df)
Description copied from interface:DFGUIAdapterThis method returns the description used by the df to federate with a given parent DF.- Specified by:
getDescriptionOfThisDFin interfaceDFGUIAdapter
-
-