public class Target extends com.kabira.platform.switchadmin.JavaCommand
configuration "ExampleTargetSecurity" version "1" type "security"
{
configure security
{
configure AccessControl
{
Rule
{
name = "com.kabira.platform.management.ExampleTarget";
lockAllElements = true;
accessRules = { };
}
Rule
{
name = "com.kabira.platform.management.ExampleTarget.examplecommand";
accessRules =
{
{
roleName = "switchmonitor";
permission = Execute;
}
};
};
};
};
};
| Constructor and Description |
|---|
Target() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRow(java.lang.String[] values)
Add a row to the result set
|
protected void |
commandComplete()
Indicate that the command has completed successfully.
|
protected void |
commandFailed(java.lang.String reason)
Indicate that the command has failed.
|
protected void |
execute(java.lang.String[] parameters)
Execute a command.
|
protected java.lang.String |
getActivePrincipalName()
Retrieve the name of the currently active Principal.
|
static void |
register(java.lang.Class<?> targetClass)
Register a Target.
|
protected void |
setColumnNames(java.lang.String[] names)
Set the names of the m_columns for the result set.
|
static void |
unregister(java.lang.String targetName)
Unregister a previously-registered target.
|
public Target()
public static void register(java.lang.Class<?> targetClass) throws TargetError
All commands associated with the target being registered will execute in the JVM in which register was called.
targetClass - the class of the target, e.g. MyTarget.classTargetError - The target failed registration audit.public static void unregister(java.lang.String targetName)
targetName - the name of the targetprotected final void commandComplete()
protected final void commandFailed(java.lang.String reason)
reason - The reason the command failed.protected final void setColumnNames(java.lang.String[] names) throws TargetError
names - The names of the m_columns for the result setTargetError - The method was called more than onceprotected final void addRow(java.lang.String[] values) throws TargetError
values - The list of values for this rowTargetError - The number of values does not match
the number of column names, or setColumnNames() has not been called yet.protected final void execute(java.lang.String[] parameters)
execute in class com.kabira.platform.switchadmin.JavaCommandparameters - the command parametersprotected final java.lang.String getActivePrincipalName()