org.safs.jvmagent
Interface LocalAgentFactoryUser

All Known Implementing Classes:
ComponentAgent, ComponentAgent, ContainerAgent, ContainerAgent, FrameAgent, FrameAgent, JCheckBoxAgent, JCheckBoxAgent, JChildlessAgent, JComboBoxAgent, JComboBoxAgent, JComponentAgent, JComponentAgent, JFrameAgent, JFrameAgent, JLabelAgent, JLabelAgent, JListAgent, JListAgent, JMenuAgent, JMenuAgent, JMenuBarAgent, JMenuBarAgent, JScrollBarAgent, JScrollBarAgent, JScrollPaneAgent, JScrollPaneAgent, JTableAgent, JTableAgent, JTableHeaderAgent, JTableHeaderAgent, JTextAreaAgent, JTextAreaAgent, JTextFieldAgent, JTextFieldAgent, JTreeAgent, JTreeAgent, ObjectAgent, ObjectAgent, WindowAgent, WindowAgent

public interface LocalAgentFactoryUser

This interface is generally intended to be a flag used by LocalAgents to indicate they request a reference to the instance of the LocalAgentFactory that instantiated them. This allows these classes to retrieve other related LocalAgents without creating additional instances of them. Why, do you ask?

Use a JFrameAgent as an example. There is a JFrameAgent in the org.safs.jvmagent package which is a subclass of the FrameAgent in the same jvmagent package. The org.safs.abbot.JFrameAgent is a subclass of this org.safs.jvmagent.JFrameAgent class. However, when the abbot.JFrameAgent wishes to invoke certain functions for component processing on a "superclass" like JComponentAgent it does not want to go up its true jvmagent superclass hierarchy, it wants to go up the abbot superclass hierarchy of which it is not a true descendant.

Consequently, this class would implement the LocalAgentFactoryUser interface and the LocalAgentFactory will provide a reference so that the class can issue callbacks for the abbot superclass instance it desires.

Since:
Mar 31, 2005

Method Summary
 LocalAgentFactory getLocalAgentFactory()
          Retrieve any LocalAgentFactory set for this object.
 void setLocalAgentFactory(LocalAgentFactory factory)
          Set the LocalAgentFactory used by the class instance.
 

Method Detail

setLocalAgentFactory

void setLocalAgentFactory(LocalAgentFactory factory)
Set the LocalAgentFactory used by the class instance. This is normally set by the LocalAgentFactory itself when the User is instanced.


getLocalAgentFactory

LocalAgentFactory getLocalAgentFactory()
Retrieve any LocalAgentFactory set for this object. May be null if not set.