public interface LocalAgentFactory
Ex: If we provide a java.awt.Component testobject we want to receive the LocalAgent that knows how to deal with this Component. Subclasses can provide alternate LocalAgents that are specific for the tool (like Abbot) that is going to be playing with the testobject.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_AGENT_NAME
'ComponentAgent'
Default agent name used to instantiate local agent helpers.
|
static java.lang.String |
DEFAULT_AGENT_PACKAGE
'org.safs.jvmagent'
Default package used to instantiate local agent helpers.
|
Modifier and Type | Method and Description |
---|---|
LocalAgent |
getAgent(java.lang.String agentname)
Locate and return the LocalAgent using the stored agentpackage and provided agentname.
|
LocalAgent |
getDefaultAgent()
Return the default LocalAgent for the current agent package.
|
LocalAgent |
getDerivedAgent(java.lang.Object testobject)
Locate and return the LocalAgent most appropriate for the testobject target.
|
LocalAgent |
getLocalAgent(java.lang.String fullclassname)
Return the LocalAgent for the fully specified agentclass.
|
void |
setAgentPackage(java.lang.String agentpackage)
Override the DEFAULT_AGENT_PACKAGE setting for instantiating local agent helpers.
|
void |
setDefaultAgentName(java.lang.String agentname)
Override the DEFAULT_AGENT_NAME setting for instantiating the default agent helper.
|
static final java.lang.String DEFAULT_AGENT_PACKAGE
static final java.lang.String DEFAULT_AGENT_NAME
void setAgentPackage(java.lang.String agentpackage)
void setDefaultAgentName(java.lang.String agentname)
LocalAgent getAgent(java.lang.String agentname) throws InvalidAgentException
InvalidAgentException
- if agent cannot be found/created/returned.LocalAgent getDerivedAgent(java.lang.Object testobject) throws InvalidAgentException
InvalidAgentException
- if agent cannot be found/created/returned.LocalAgent getDefaultAgent() throws InvalidAgentException
InvalidAgentException
- if agent cannot be found/created/returned.LocalAgent getLocalAgent(java.lang.String fullclassname) throws InvalidAgentException
fullclassname
- the full proper class name for the desired LocalAgent. The
internal agent package is ignored.InvalidAgentException
- if agent cannot be found/created/returned.Copyright © SAS Institute. All Rights Reserved.