Class 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
    • 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 parameter JADEAddress from 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:
        postGuiEvent in interface DFGUIAdapter
      • 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.