Class MainAppletContext
java.lang.Object
com.sun.javatest.util.MainAppletContext
This class provides a means whereby tools can temporarily give access
to a shared AppletContext and applet instance(s) which will be
used in AppletContext tests.
With hindsight, this code should probably be in com.sun.javatest.agent but the tests expect the class to be here in com.sun.javatest.util.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AppletGet the applet that has been identified as the JT Harness Agent applet.static AppletGet the applet that has been registered with a given name.static AppletContextGet the current AppletContext.Get an enumeration of all the names that have been used to register applets.static booleanCheck the flag that indicates whether the agent applet has been started.static voidRegister an applet in a table of applets.static voidsetAgentApplet(Applet applet) Set the applet to be identified as the JT Harness Agent applet.static voidSet the AppletContext in use, so that it might be shared.static voidsetStarted(boolean value) Set a flag to indicate that the agent applet has been started.
-
Constructor Details
-
MainAppletContext
public MainAppletContext()
-
-
Method Details
-
getAppletContext
Get the current AppletContext.- Returns:
- the current AppletContext, or null if it has been set.
- See Also:
-
setAppletContext
Set the AppletContext in use, so that it might be shared.- Parameters:
ctx- the AppletContext to be shared.- See Also:
-
putApplet
-
getApplet
-
getAppletNames
-
getAgentApplet
Get the applet that has been identified as the JT Harness Agent applet.- Returns:
- the Javatest Agent applet
- See Also:
-
setAgentApplet
Set the applet to be identified as the JT Harness Agent applet.- Parameters:
applet- the Javatest Agent applet- See Also:
-
isStarted
public static boolean isStarted()Check the flag that indicates whether the agent applet has been started.- Returns:
- a boolean value indicating whether the agent applet has been started or not.
-
setStarted
public static void setStarted(boolean value) Set a flag to indicate that the agent applet has been started.- Parameters:
value- a boolean value indicating whether the agent applet has been started or not.
-