The ListerMBean interface provides a general mechanism for returning lists.
Derived MBeans extend this interface to add methods that access the data of the current object in the list. This is different from the iterator model (where the next method returns the next object in the list) because creating MBeans for each object returned in a list (for example, one MBean per user) is too expensive. In addition, it is not appropriate to return non-MBean or non-primitive types from an MBean.
The general iteration pattern is as follows:
FooListerMBean fooLister = ...;
String cursor = lister.listFoo(...);
try {
while (fooLister.haveCurrent(cursor)) {
Foo currentVal = fooLister.getCurrentFoo(cursor);
fooLister.advance(cursor);
}
} finally {
fooLister.close(cursor);
This section describes the following operations:
Advances the list to the next element in the list.
Operation Name | "advance" |
Parameters | Object [] { cursor }
where:
|
Signature | String [] {
"java.lang.String" } |
Returns |
void
|
Exceptions |
|
Indicates that the caller is finished using the list, and that the resources held on behalf of the list may be released. If the caller traverses through all the elements in the list, the caller need not call this method. In other words, it is used to let the caller close the list without reading each element that is returned.
Operation Name | "close" |
Parameters | Object [] { cursor }
where:
|
Signature | String [] {
"java.lang.String" } |
Returns |
void
|
Exceptions |
|
Returns true if there are more objects in the list, and false otherwise.
Operation Name | "haveCurrent" |
Parameters | Object [] { cursor }
where:
|
Signature | String [] {
"java.lang.String" } |
Returns |
boolean
|
Exceptions |
|
Returns true if the specified attribute has been set explicitly in this MBean instance.
Operation Name | "isSet" |
Parameters | Object [] { propertyName }
where:
|
Signature | String [] {
"java.lang.String" } |
Returns |
boolean
|
Exceptions |
|
Restore the given property to its default value.
Operation Name | "unSet" |
Parameters | Object [] { propertyName }
where:
|
Signature | String [] {
"java.lang.String" } |
Returns |
void
|
Exceptions |
|
Returns the display name of an MBean.
Deprecated 9.0.0.0
Operation Name | "wls_getDisplayName" |
Parameters | null |
Signature | null |
Returns | String
|