Oracle

weblogic.management.utils
Interface ListerMBean

All Known Subinterfaces:
GroupEditorMBean, GroupMemberListerMBean, GroupReaderMBean, GroupUserListerMBean, MemberGroupListerMBean, NameListerMBean, PKICredentialMapEditorMBean, PKICredentialMapReaderMBean, PolicyListerMBean, PolicyStoreMBean, PropertiesListerMBean, RoleListerMBean, UserEditorMBean, UserPasswordCredentialMapEditorMBean, UserPasswordCredentialMapExtendedReaderMBean, UserPasswordCredentialMapReaderMBean, UserReaderMBean

public interface ListerMBean

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);

Deprecation of MBeanHome and Type-Safe Interfaces

In addition to being used as a base class that provides functionality to security provider MBeans, JMX applications can use this class directly as a type-safe interface. When used as a type-safe interface, a JMX application imports this class and accesses it through weblogic.management.MBeanHome. As of 9.0, the MBeanHome interface and all type-safe interfaces for WebLogic Server MBeans are deprecated. Instead, JMX applications that interact with WebLogic Server MBeans should use standard JMX design patterns in which clients use the javax.management.MBeanServerConnection interface to discover MBeans, attributes, and attribute types at runtime. For more information, see "Developing Manageable Applications with JMX" on http://edocs.bea.com.


Method Summary
 void advance(String cursor)
          Advances the list to the next element in the list.
 void close(String cursor)
          Indicates that the caller is finished using the list, and that the resources held on behalf of the list may be released.
 boolean haveCurrent(String cursor)
          Returns true if there are more objects in the list, and false otherwise.
 

Method Detail

haveCurrent

boolean haveCurrent(String cursor)
                    throws InvalidCursorException
Returns true if there are more objects in the list, and false otherwise.

Parameters:
cursor - - The cursor returned from a previous list method.
Throws:
InvalidCursorException

advance

void advance(String cursor)
             throws InvalidCursorException
Advances the list to the next element in the list.

Parameters:
cursor - - The cursor returned from a previous list method.
Throws:
InvalidCursorException

close

void close(String cursor)
           throws InvalidCursorException
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.

Parameters:
cursor - - The cursor returned from a previous list method.
Throws:
InvalidCursorException

Documentation is available at
http://download.oracle.com/docs/cd/E12839_01/web.1111
Copyright 1996,2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Part Number E13941-01
Oracle WebLogic Server 10.3.1 API Reference