|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.websphere.command.TargetPolicyDefault
The TargetPolicyDefault class provides an implementation of the TargetPolicy interface. It provides serveral way to specify the target for a command, and it implements an evaluation routine for retrieving the target in its implementation of the getCommandTarget() method.
The TargetPolicyDefault class allows a client to set the target of a command in several ways:
The getCommandTarget() method implements the following ordered steps for determining the target that to be returned for a given command. The getCommandTarget() method stops when it finds a target.
The class sets the default target name to the LocalTarget class.
Field Summary | |
---|---|
protected CommandTarget |
defaultTarget
The default target object, used if no other target is found. |
protected java.lang.String |
defaultTargetName
The default target name, used if no other target is found. |
protected java.util.Dictionary |
mapping
Contains the registered mappings between commands and targets. |
protected java.util.Hashtable |
targetTable
Contains active targets. |
Constructor Summary | |
---|---|
TargetPolicyDefault()
|
Method Summary | |
---|---|
CommandTarget |
getCommandTarget(TargetableCommand command)
The getCommandTarget() method implements the method in the TargetPolicy interface. |
java.util.Dictionary |
listMappings()
Lists all the command-to-target mappings. |
void |
registerCommand(java.lang.String commandBeanName,
java.lang.String targetBeanName)
Registers a single command-to-target mapping. |
void |
setDefaultTargetName(java.lang.String defaultTargetName)
Sets the default target name, used if no other target is found. |
void |
unregisterCommand(java.lang.String commandBeanName)
Unregisters a single command-to-target mapping. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Dictionary mapping
protected java.util.Hashtable targetTable
protected java.lang.String defaultTargetName
protected transient CommandTarget defaultTarget
Constructor Detail |
public TargetPolicyDefault()
Method Detail |
public CommandTarget getCommandTarget(TargetableCommand command)
getCommandTarget
in interface TargetPolicy
command
- The TargetableCommand whose CommandTarget is needed.public java.util.Dictionary listMappings()
public void registerCommand(java.lang.String commandBeanName, java.lang.String targetBeanName)
commandBeanName
- The name of the command.targetBeanName
- The name of the target.public void setDefaultTargetName(java.lang.String defaultTargetName)
defaultTargetName
- The name of the default target.public void unregisterCommand(java.lang.String commandBeanName)
commandBeanName
- The name of the command.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |