|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--adm.CDirectory
CDirectory is an invisible bean used to query the control system for
lists of devices, properties, or classes. It is an introspection
widget -- it doesn't monitor any value in the control system.
This bean is configured by specifing a regular expression for one or
more of class name, device name, or property name. Depending upon a
flag set by the user, an array of device names, property names or class
names can be retrieved. The property name retrived are all the properties
for the class. The property expression pattern match
(set/getPropertyExpression method) will not be included in this release
(0.4).
The setQueryType method must be called after set*Expression to trigger
the DirectoryEvent. The query type may be one of: CLASS_QUERY, DEVICE_QUERY
or PROPERTY_QUERY defined in CConstants class. When the query type is set
to CLASS_QUERY or PROPERTY_QUERY, the classExpression must be set using
setClassExpression. When the query type is DEVICE_QUERY, either
classExpression or deviceExpression need be set.
To receive the directory service response, an object must implement the
CDirectoryListener interface and add itself as a listener to this bean.
There is one method, receivedNames (CDirectoryEvent e), in the
CDirectoryListener interface. This method takes CDirectoryEvent as an
argument. By calling getNames() in the CDirectoryEvent class, the name
array (device names, property names or class names) can be obtained.
Constructor Summary | |
CDirectory()
Null Constructor |
Method Summary | |
void |
addDirectoryListener(CDirectoryListener dl)
Add the directory listener to receive the notification |
java.lang.String |
getClassExpression()
Return class expression. |
java.lang.String |
getDeviceExpression()
Return device expression. |
java.lang.String |
getPropertyExpression()
Return property expression. |
int |
getQueryType()
Return query type. |
void |
removeDirectoryListener(CDirectoryListener dl)
Remove the directory listener service |
void |
run()
Process the directory service and notify the listener |
void |
setClassExpression(java.lang.String s)
Set the class expression |
void |
setDeviceExpression(java.lang.String s)
Set the device expression |
void |
setPropertyExpression(java.lang.String s)
Set the property expression |
void |
setQueryType(int type_id)
Set the queryType. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CDirectory()
Method Detail |
public void setClassExpression(java.lang.String s)
s
- the regular expression for class namepublic java.lang.String getClassExpression()
public void setDeviceExpression(java.lang.String s)
s
- the regular expression for device namepublic java.lang.String getDeviceExpression()
public void setPropertyExpression(java.lang.String s)
s
- the regular expression for property namepublic java.lang.String getPropertyExpression()
public void setQueryType(int type_id)
type_id
- the query type, which may be one of:
public int getQueryType()
public void run()
public void addDirectoryListener(CDirectoryListener dl)
public void removeDirectoryListener(CDirectoryListener dl)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |