|
|||||||||
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 device name, class 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. In the current release, only device
name is implemented. The set/getPropertyExpression and
set/getClassExpression methods are provided for a future release.
The setQueryType method must be called after set*Expression to trigger
the DirectoryEvent. Again the query Type must equal
CConstants.DEVICE_QUERY in this release. When the full services are
implemented in a later version, the query type may be one of:
DEVICE_QUERY, PROPERTY_QUERY or CLASS_QUERY defined in CConstants
class.
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 |