WBI BrokersTM
Config Manager Proxy API

com.ibm.broker.config.proxy
Interface AdvancedAdministeredObjectListener

All Superinterfaces:
com.ibm.broker.config.proxy.ListenerParent

public interface AdvancedAdministeredObjectListener
extends com.ibm.broker.config.proxy.ListenerParent

User-written classes that extend this class are stating that they can receive notifications from the Config 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.

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

    Responsibilities States that the extending class is able to receive notifications from the Config Manager Proxy. Classes extending AdvancedAdministeredObjectListener wish to receive extra information from the Config Manager Proxy.
    Internal Collaborators None
    
     Change Activity:
     ---------- ----------- -------------  -------------------------------
     Reason:    Date:       Originator:    Comments:
     ---------- ----------- -------------  -------------------------------
     25103.3    2004-06-30  HDMPL          v6 Release
    
     


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

    Method Detail

    processActionResponse

    public void processActionResponse(AdministeredObject affectedObject,
                                      CompletionCodeType ccType,
                                      List bipMessages,
                                      Properties referenceProperties,
                                      int batchCorrelationID,
                                      boolean lastActionResponseInBatch)
    States that the Config Manager has processed a request that previously originated from the current connection to the Config 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 - an unmodifiable list of com.ibm.broker.config.proxy.LogEntry classes that contains any localized BIP Messages associated with the action.
    referenceProperties - Properties of the Request that caused this Action Response.
    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 with this correlation ID (assuming that correlation IDs are unique). Note that the lastActionResponseInBatch flag will never be set to true if the AdministeredObjectListener is not registered with the last affected object in the batch.

    processDelete

    public void processDelete(AdministeredObject deletedObject,
                              long timeTillNextNotificationMs)
    States the the supplied Config Manager Administered Object has been deleted on the server.

    Parameters:
    deletedObject - 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 supplied correlation identifier.

    processModify

    public void processModify(AdministeredObject affectedObject,
                              List changedAttributes,
                              List newChildren,
                              List removedChildren,
                              long timeTillNextNotificationMs)
    States that the supplied Config Manager Administered Object 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. It is forbidden for AdministeredObjectListeners to modify the contents of this Vector.
    newChildren - An unmodifiable list of Strings containing the object's subcomponents that were added by the latest change. Each entry is of the form "componenttype+UUID" such as "Broker+123-123-123". A list of valid component types can be found in the typedef-enumeration com.ibm.broker.config.proxy.ConfigurationObjectType. It is forbidden for AdministeredObjectListeners to modify the contents of this Vector.
    removedChildren - An unmodifiable list of Strings containing the object's subcomponents that were removed by the latest change. Same format as the newChildren List.
    timeTillNextNotificationMs - The estimated amount of time, in milliseconds, till a delete or modify notification will next be sent to a listener with the supplied correlation identifier.

    WBI BrokersTM
    Config Manager Proxy API