|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.phoenix_int.aserver.PHXSimpleSelfManager
public class PHXSimpleSelfManager
This is a class that implements most of the functionality of a self-managing components. The class provides utility functions for storing variables. These variables are then served to the Analysis Server automatically through the listProperites, getValue, and setValue functions.
| Constructor Summary | |
|---|---|
PHXSimpleSelfManager()
|
|
| Method Summary | |
|---|---|
protected void |
addMethod(java.lang.String name)
relay function for addMethod( String name, boolean isVisible=true ) |
protected void |
addMethod(java.lang.String name,
boolean isVisible)
relay function for addMethod( String name, String fullName = name, boolean isVisible ) |
protected void |
addMethod(java.lang.String name,
java.lang.String fullName)
relay function for addMethod( String name, String fullName, boolean isVisible=true ) |
protected void |
addMethod(java.lang.String name,
java.lang.String fullName,
boolean isVisible)
relay function for addMethod( String name, String fullName, boolean isVisible, boolean downloadInputs = false ) |
protected void |
addMethod(java.lang.String name,
java.lang.String fullName,
boolean isVisible,
boolean downloadInputs)
adds a method name to the object |
protected void |
addVariable(PHXVariableInfo varInfo)
adds a variable information object to the manager |
protected void |
addVariable(java.lang.String varName,
boolean isInput,
java.lang.Object var)
adds a variable object to the manager |
protected void |
addVariable(java.lang.String groupName,
PHXVariableInfo varInfo)
adds a variable information object to the manager |
protected void |
addVariable(java.lang.String groupName,
java.lang.String varName,
boolean isInput,
java.lang.Object var)
adds a variable object to the manager |
void |
forceSetValue(java.lang.String name,
java.lang.String value)
sets the value for a variable regardless of whether it's an input or an output |
protected PHXGroup |
getGroup(java.lang.String group)
retrieves a group. |
protected PHXMethodDescriptor |
getMethodDescriptor(java.lang.String name)
find the Method Descriptor associated with a given name |
PHXMethodDescriptor[] |
getMethodDescriptors()
retrieves a set of method descriptors for this object |
PHXPropertyDescriptor[] |
getPropertyDescriptors(java.lang.String name)
retrieves a set of property descriptors for the variables managed by this object or one of it's subobjects |
protected com.phoenix_int.aserver.Remainder |
getRemainder(java.lang.String varName)
retrieves the variable matching the specified name |
PHXGroup |
getRootGroup()
retrieves the root group |
java.lang.String |
getValue(java.lang.String name)
retrieves the value for the appropriate variable |
java.lang.Object |
getValue2(java.lang.String name)
retrieves the value for the appropriate variable |
java.lang.String |
getVariableFullName(java.lang.Object var)
gets the name of a variable |
PHXVariableInfo |
getVariableInfo(java.lang.Object var)
gets the information about a variable |
protected PHXVariableInfo |
getVariableInfo(java.lang.String fullVarName)
retrieves a variable information object from the manager |
protected PHXVariableInfo |
getVariableInfo(java.lang.String groupName,
java.lang.String varName)
retrieves a variable information object from the manager |
java.lang.String |
invoke(java.lang.String methodName)
Invokes a named method. |
PHXInvokeReturn |
invoke2(java.lang.String methodName)
Invokes a named method. |
protected PHXGroup |
makeGroup(java.lang.String group)
creates a group. |
protected boolean |
removeVariable(PHXVariableInfo varInfo)
removes a variable. |
void |
setValue(java.lang.String name,
java.lang.String value)
stores a value into the appropriate variable |
void |
setValue2(java.lang.String name,
PHXStringBuffer value)
stores a value into the appropriate variable |
void |
setValueActual(java.lang.String name,
java.lang.Object value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PHXSimpleSelfManager()
| Method Detail |
|---|
protected void addVariable(java.lang.String groupName,
java.lang.String varName,
boolean isInput,
java.lang.Object var)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
groupName - the group to store the variable in. May be
a dot-separated list of groupsvarName - the name of the variableisInput - true if the variable is an inputvar - the variable information to add
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addVariable(java.lang.String varName,
boolean isInput,
java.lang.Object var)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
varName - the name of the variableisInput - true if the variable is an inputvar - the variable information to add
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addVariable(PHXVariableInfo varInfo)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
varInfo - the variable information object
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addVariable(java.lang.String groupName,
PHXVariableInfo varInfo)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
groupName - the group to store the variable in. May be
a dot-separated list of groupsvarInfo - the variable information object
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid charactersprotected boolean removeVariable(PHXVariableInfo varInfo)
varInfo - the variable structure to remove
protected void addMethod(java.lang.String name,
java.lang.String fullName,
boolean isVisible,
boolean downloadInputs)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
name - the name of the methodfullName - the human readable nameisVisible - if true, the method is displayed using the
listMethods command. Invoking is handled by the derived
class, so it is up to it whether invisible methods may
be invoked.downloadInputs - if true, signal calling application that input
variable values need to be reread
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid charactersprotected PHXMethodDescriptor getMethodDescriptor(java.lang.String name)
protected void addMethod(java.lang.String name,
java.lang.String fullName,
boolean isVisible)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
name - the name of the methodfullName - the human readable nameisVisible - if true, the method is displayed using the
listMethods command. Invoking is handled by the derived
class, so it is up to it whether invisible methods may
be invoked.
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addMethod(java.lang.String name,
boolean isVisible)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
name - the name of the method
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addMethod(java.lang.String name,
java.lang.String fullName)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
name - the name of the method
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected void addMethod(java.lang.String name)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
name - the name of the method
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
protected PHXGroup makeGroup(java.lang.String group)
throws PHXNameAlreadyInUseException,
PHXInvalidNameException
group - the name of the group. This name follows the dot-syntax
format for the parent-child relationship
PHXNameAlreadyInUseException - thrown
if the name is already in use
PHXInvalidNameException - thrown
if the name has invalid characters
public java.lang.String getVariableFullName(java.lang.Object var)
throws PHXNoSuchObjectException
var - the variable object
PHXNoSuchObjectException
public PHXVariableInfo getVariableInfo(java.lang.Object var)
throws PHXNoSuchObjectException
var - the variable object
PHXNoSuchObjectException - thrown if the specified variable is not found
protected PHXVariableInfo getVariableInfo(java.lang.String fullVarName)
throws PHXNoSuchObjectException
fullVarName - The var name in format "group.group.name"
PHXNoSuchObjectException - thrown if the specified variable is not found
protected PHXVariableInfo getVariableInfo(java.lang.String groupName,
java.lang.String varName)
throws PHXNoSuchObjectException
groupName - the group to store the variable in. May be
a dot-separated list of groupsvarName - the name of the variable information object
PHXNoSuchObjectException - thrown if the specified variable is not found
protected PHXGroup getGroup(java.lang.String group)
throws PHXNoSuchObjectException
group - the name of the group. This name follows the dot-syntax
format for the parent-child relationship
PHXNoSuchObjectException - thrown if the specified group is not found
protected com.phoenix_int.aserver.Remainder getRemainder(java.lang.String varName)
throws PHXNoSuchObjectException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
varName - the name fo the variable
PHXNoSuchObjectException - thrown if the specified variable is not found
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetExceptionpublic PHXGroup getRootGroup()
public void setValue(java.lang.String name,
java.lang.String value)
throws PHXNoSuchObjectException,
PHXNoSuchWriteableObjectException,
java.lang.Exception
setValue in interface IPHXSelfManagername - the name of the variablevalue - the value to store
PHXNoSuchObjectException - thrown if the specified object does not exist
PHXNoSuchWriteableObjectException - thrown if the specified object cannot be written to
java.lang.Exception - thrown if the value cannot be set
public void setValue2(java.lang.String name,
PHXStringBuffer value)
throws PHXNoSuchObjectException,
PHXNoSuchWriteableObjectException,
java.lang.Exception
name - the name of the variablevalue - the value to store
PHXNoSuchObjectException - thrown if the specified object does not exist
PHXNoSuchWriteableObjectException - thrown if the specified object cannot be written to
java.lang.Exception - thrown if the value cannot be set
public void forceSetValue(java.lang.String name,
java.lang.String value)
throws PHXNoSuchObjectException,
java.lang.Exception
name - the name of the variablevalue - the value to store
PHXNoSuchObjectException - thrown if the specified object does not exist
java.lang.Exception - thrown if the value cannot be set
public void setValueActual(java.lang.String name,
java.lang.Object value)
throws PHXNoSuchObjectException,
PHXNoSuchWriteableObjectException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
PHXNoSuchObjectException
PHXNoSuchWriteableObjectException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public java.lang.String getValue(java.lang.String name)
throws PHXNoSuchObjectException,
java.lang.Exception
getValue in interface IPHXSelfManagername - the name of the variable
PHXNoSuchObjectException - thrown if the specified object does not exist
java.lang.Exception - thrown if the value cannot be retrieved
public java.lang.Object getValue2(java.lang.String name)
throws PHXNoSuchObjectException,
java.lang.Exception
name - the name of the variable
PHXNoSuchObjectException - thrown if the specified object does not exist
java.lang.Exception - thrown if the value cannot be retrieved
public PHXPropertyDescriptor[] getPropertyDescriptors(java.lang.String name)
throws PHXNoSuchObjectException,
java.lang.Exception
getPropertyDescriptors in interface IPHXSelfManagername - the name of the object to retrieve the property
descriptors. If the value is null, then the top level
is searched.
PHXNoSuchObjectException - thrown if the specified object does not exist
java.lang.Exception - thrown if the properties cannot
be retrieved
public PHXMethodDescriptor[] getMethodDescriptors()
throws java.lang.Exception
getMethodDescriptors in interface IPHXSelfManagerjava.lang.Exception - thrown if the properties cannot
be retrieved
public java.lang.String invoke(java.lang.String methodName)
throws java.lang.Exception
invoke in interface IPHXSelfManagermethodName - the name of the method to invoke on obj
java.lang.Exception - thrown if a problem occurs
invoking the method
public PHXInvokeReturn invoke2(java.lang.String methodName)
throws java.lang.Exception
methodName - the name of the method to invoke on obj
java.lang.Exception - thrown if a problem occurs
invoking the method
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||