fipaos.platform.dfgui.swing
Class SwingDFGUIAgent

fipaos.agent.FIPAOSAgent
  |
  +--fipaos.platform.dfgui.DFGUIAgent
        |
        +--fipaos.platform.dfgui.swing.SwingDFGUIAgent

public class SwingDFGUIAgent
extends DFGUIAgent

This is the DF GUI agent that uses Java Swing GUI to display controls
for DF(s).


Inner classes inherited from class fipaos.agent.FIPAOSAgent
FIPAOSAgent.TopLevelHandlerTask

Fields inherited from class fipaos.agent.FIPAOSAgent
_registered_with, _state

Constructor Summary
SwingDFGUIAgent(String platform_profile, String name, String owner)
          Creates new SwingDFGUI.

Method Summary
 voidactivate()
          Invoked when GUI should be shown
 voidderegistered(AgentID aid, DFAgentDescription description)
          Notification from the super class when agent has deregistered.
 (package private) booleanderegisterRequest(String agent)
          Deregisters a certain agent from a DF.
 (package private) voiddropDF(String df_name)
          Method envoced by the GUI that a particular DF should no longer be monitored.
 (package private) MaplistAgentsRequest(AgentID df)
          Lists all agents on a certain DF.
 (package private) MaplistAgentsRequest(String df)
          All agents registered on a certain DF.
 voidmodified(AgentID aid, DFAgentDescription description)
          Notification from the super class when agent has been modified.
 (package private) booleanmodifyRequest(String agent)
          Modifies a certain agent's df-agent-description.
 (package private) booleanregisterDFRequest(AgentID new_df, String old_df)
          Request for the GUI that DF should be registered with another DF.
 voidregistered(AgentID aid, DFAgentDescription description)
          Notification from the super class when agent has been registered.
 (package private) booleanregisterRequest(String agent)
          Registers an agent with a DF.
 voidshutdown()
          Method to cleanly kill off Agent

Methods inherited from class fipaos.platform.dfgui.DFGUIAgent
federatedSearch

Methods inherited from class fipaos.agent.FIPAOSAgent
forward, forward, getAID, getCurrentConversation, getHAP, getLocalAMS, getLocalAMSAID, getLocalDF, getLocalDFAID, getNewConversation, getOwnership, getPlatformProfile, getProfile, getState, isShutdown, notify, notify, notifyDone, notifyError, notifyMessageInEndedConversation, notifyMessageUndeliverable, notifyTimeout, sendNotUnderstood, sendNotUnderstood, setMessageSender, waitForPushLock

Constructor Detail

SwingDFGUIAgent

public SwingDFGUIAgent(String platform_profile, String name, String owner)
Creates new SwingDFGUI.
Instansiates a DFGUIFrame that will start up the actual GUI.
Parameters:
platform_profile - location of the platform profile
name - name of the agent
owner - owner of the agent
Method Detail

activate

public void activate()
Invoked when GUI should be shown

deregistered

public void deregistered(AgentID aid, DFAgentDescription description)
Notification from the super class when agent has deregistered.
Parameters:
aid - AID of the DF this agent has deregisted from
description - description of the agent deregistered

deregisterRequest

boolean deregisterRequest(String agent)
Deregisters a certain agent from a DF. Not yet implemented.
Parameters:
agent - name of the agent to be deregistered
Returns: if the operation was successful

dropDF

void dropDF(String df_name)
Method envoced by the GUI that a particular DF should no longer be monitored.
Parameters:
df_name - name of the DF to be dropped

listAgentsRequest

Map listAgentsRequest(AgentID df)
Lists all agents on a certain DF.
Parameters:
df - AID for the DF
Returns: all the agents registered

listAgentsRequest

Map listAgentsRequest(String df)
All agents registered on a certain DF.
Parameters:
df - name of the DF
Returns: all the agents registered

modified

public void modified(AgentID aid, DFAgentDescription description)
Notification from the super class when agent has been modified.
Parameters:
aid - AID of the DF the agent has been modified on
description - the description of the modified agent

modifyRequest

boolean modifyRequest(String agent)
Modifies a certain agent's df-agent-description. Not yet implemented.
Parameters:
agent - name of the agent to be modified
Returns: if the operation was successful

registerDFRequest

boolean registerDFRequest(AgentID new_df, String old_df)
Request for the GUI that DF should be registered with another DF. This method
is temporary, since DF GUI agent will actually pretend to be the DF requesting
the registration - more permanent solution in the next release.
Parameters:
new_df - DF the other DF will be registered on
old_df - DF requesting registration
Returns: if the operation was successful

registered

public void registered(AgentID aid, DFAgentDescription description)
Notification from the super class when agent has been registered.
Parameters:
aid - AID of the DF this happens with
description - the description of the agent registered

registerRequest

boolean registerRequest(String agent)
Registers an agent with a DF. Not implemented, and never will be. This
DF GUI doesn't allow user to register agents, since all the agents that are
registered with a DF monitored will always show in the GUI. Therefore there
is no need to be able to register "ghost" agents.
Parameters:
agent - name of the agent to be registed
Returns: if the operation was successful

shutdown

public void shutdown()
Method to cleanly kill off Agent

Association Links

to Class fipaos.platform.dfgui.swing.DFGUIFrame