com.ibm.broker.config.proxy
Interface AdvancedAdministeredObjectListener


public interface AdvancedAdministeredObjectListener

User-written classes that extend this class are stating that they can receive notifications from the Configuration Manager Proxy that contain more information than is provided by the basic AdministeredObjectListener interface.

Most user applications will not require the information provided by this advanced listener, and should implement the AdministeredObjectListener interface instead.

The extra information provided by this advanced interface is as follows:

  • Advanced processActionResponse() notifications include parameters to correlate batches of requests sent using ConfigManagerProxy.sendUpdates(). Notifications include any correlation identifier that was passed during the sendUpdates() call, and also a boolean to describe whether any further responses can be expected for the current batch.
  • Advanced processModify() notifications include parameters that suggest to the listener whether another notification is imminent. Listeners may choose to make use of this information if they can improve performance by holding off starting a task as a result (for example, choosing to not refresh the screen until all updates are received).
  • Advanced processDelete() notifications also include parameters that suggest to the listener whether another notification is imminent.
  • Advanced listeners can also elect to receive an immediate processModify() notification as soon as the listener is first registered.

    In order to receive notifications, applications must first register their listener with each administered object for which they wish to receive notifications. Here is an example of how to do this:

         ConfigManagerConnectionParameters cmcp =
             MQConfigManagerConnectionParameters("localhost", 1414, "QMGR");
         ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
         TopologyProxy t = cmp.getTopology();
         Object obj = new Object();
     
         AdvancedAdministeredObjectListener l =
             new MyAdvancedAdministeredObjectListener();
         t.registerListener(l, true, obj);
     

    Classes that implement both the AdministeredObjectListener interface and the AdvancedAdministeredObjectListener interface will always receive advanced notifications, regardless of the registerListener() variant that is called.


    See the AdministeredObjectListener documentation for detailed information on object listeners.


    interface com.ibm.broker.config.proxy.AdvancedAdministeredObjectListener

    Responsibilities States that the extending class is able to receive notifications from the Configuration Manager Proxy. Classes extending AdvancedAdministeredObjectListener wish to receive extra information from the Configuration Manager Proxy.
    Internal Collaborators None
    
     Change Activity:
     ---------- ----------- -------------  -------------------------------
     Reason:    Date:       Originator:    Comments:
     ---------- ----------- -------------  -------------------------------
     25103.3    2004-06-30  HDMPL          v6 Release
     44739.7    2007-07-30  HDMPL          v6.1 release:
                                               Methods now take genericized types where relevant
    
     

    Version:
    Config/com/ibm/broker/config/proxy/AdvancedAdministeredObjectListener.java, CMP, S000 1.10

    Method Summary
     void processActionResponse(AdministeredObject affectedObject, CompletionCodeType ccType, java.util.List<LogEntry> bipMessages, java.util.Properties referenceProperties, int batchCorrelationID, boolean lastActionResponseInBatch)
              States that the Configuration Manager has processed a request that previously originated from the current connection to the Configuration Manager.
     void processDelete(AdministeredObject deletedObject, long timeTillNextNotificationMs)
              States that the supplied AdministeredObject has been deleted on the Configuration Manager.
     void processModify(AdministeredObject affectedObject, java.util.List<java.lang.String> changedAttributes, java.util.List<java.lang.String> newChildren, java.util.List<java.lang.String> removedChildren, long timeTillNextNotificationMs)
              States that the supplied AdministeredObject has been modified by the current or another application.
     

    Method Detail

    processActionResponse

    void processActionResponse(AdministeredObject affectedObject,
                               CompletionCodeType ccType,
                               java.util.List<LogEntry> bipMessages,
                               java.util.Properties referenceProperties,
                               int batchCorrelationID,
                               boolean lastActionResponseInBatch)
    States that the Configuration Manager has processed a request that previously originated from the current connection to the Configuration Manager. The parameters of this method call indicate the result of the command that was sent, and the original command for reference.

    Parameters:
    affectedObject - The object on which a command was attempted.
    ccType - The overall completion code of the action
    bipMessages - The unmodifiable list of LogEntry instances that contains any localized BIP Messages associated with the action.
    referenceProperties - Properties of the Request that caused this Action Response. See the AttributeConstants documentation for information regarding the set of properties that may be supplied here.
    batchCorrelationID - If this response refers to an element from a batch of requests that was sent using ConfigManagerProxy.sendUpdates(), this is the value of the correlation ID that was supplied to this method.
    lastActionResponseInBatch - If this response refers to an element from a batch of requests that was sent using ConfigManagerProxy.sendUpdates(), this flag is set to true if and only if this is the last action response notification with this correlation ID (assuming that correlation IDs are unique). Note that the lastActionResponseInBatch flag will never be set to true if the listener is not registered with the last affected object in the batch.

    processDelete

    void processDelete(AdministeredObject deletedObject,
                       long timeTillNextNotificationMs)
    States that the supplied AdministeredObject has been deleted on the Configuration Manager.

    Parameters:
    deletedObject - The AdministeredObject that has been deleted.
    timeTillNextNotificationMs - The estimated amount of time, in milliseconds, till a delete or modify notification will next be sent to a listener with the previously supplied correlation identifier.

    processModify

    void processModify(AdministeredObject affectedObject,
                       java.util.List<java.lang.String> changedAttributes,
                       java.util.List<java.lang.String> newChildren,
                       java.util.List<java.lang.String> removedChildren,
                       long timeTillNextNotificationMs)
    States that the supplied AdministeredObject has been modified by the current or another application.

    Parameters:
    affectedObject - The object which has changed. The attributes of the object will already have been updated to contain the new information.
    changedAttributes - An unmodifiable list of Strings containing the attribute key names that have changed. See the AttributeConstants documentation for a list of valid key names.
    newChildren - An unmodifiable list of Strings containing the object's subcomponents that were added by the latest change. To avoid the needless creation of expensive AdministeredObject instances, each entry is a String that describes one AdministeredObject. The String can be converted into an AdministeredObject instance using the affectedObject.getManagedSubcomponentFromStringRepresentation(String) method.
    removedChildren - An unmodifiable list of Strings containing the object's subcomponents that were removed by the latest change. To avoid the needless creation of expensive AdministeredObject instances, each entry is a String that describes one AdministeredObject. The String can be converted into an AdministeredObject instance using the affectedObject.getManagedSubcomponentFromStringRepresentation(String) method.
    timeTillNextNotificationMs - The estimated amount of time, in milliseconds, till a delete or modify notification will next be sent to a listener with the previously supplied correlation identifier.