com.ibm.broker.config.proxy

Class AdminQueueEntry



  • public class AdminQueueEntry
    extends AdministeredObject

    The AdminQueueEntry class represents an entry in the brokers administration work queue.

    com.ibm.broker.config.proxy.AdminQueueEntry

    Responsibilities Represents a single read-only entry from the Administration queue.
    Internal Collaborators None
    
     Change Activity:
     -------- ----------- -------------   ------------------------------------
     Reason:  Date:       Originator:     Comments:
     -------- ----------- -------------   ------------------------------------
     51619.40 2009-05-26  HDCAB           v7 Release
         3779 2012-05-10  HDCAB           v8 Release
                                          - Converted to an AdministeredObject
     
     
    • Method Detail

      • getWorkIdentifier

        public java.lang.String getWorkIdentifier()
        Returns the work identifier field for the current administration queue work entry
        Returns:
        String workIdentifier field
      • getCreationTimestamp

        public java.util.Date getCreationTimestamp()
        Returns the creationTimestamp field for the current administration queue work entry
        Returns:
        Date containing the creationTimestamp field as a Date
      • getLastStatusChangeTimestamp

        public java.util.Date getLastStatusChangeTimestamp()
        Returns the lastStatusChangeTimestamp field for the current administration queue work entry
        Returns:
        Date containing the lastStatusChangeTimestamp field as a Date
      • getStatus

        public CompletionCodeType getStatus()
        Returns the status field for the current administration queue work entry. The value returned has the following meaning: - initiated means the admin queue entry is being constructed - pending means the admin queue entry is queued - submitted means the broker is processing the request - failure means the administration request has failed - success means the administration request was succesful. - timedOut means a response was received to indicate that the broker did not complete the request in the expected timeframe - unknown means that no response has been received from the broker.
        Returns:
        CompletionCodeType representing the Completion Code
      • getDescription

        public java.lang.String getDescription()
        Returns the description field for the current administration queue work entry.
        Returns:
        String containing the description field
      • getUser

        public java.lang.String getUser()
        Returns the user field for the current administration queue work entry.
        Returns:
        String - user field
      • getOperationType

        public OperationType getOperationType()
        Returns the operationType field for the current administration queue work entry.
        Returns:
        OperationType - operationType field
      • getObjectName

        public java.lang.String getObjectName()
        Returns the affectedObject field for the current administration queue work entry.
        Returns:
        String - affectedObject field
      • getObjectType

        public ConfigurationObjectType getObjectType()
        Returns the affectedObjectType field for the current administration queue work entry.
        Returns:
        ConfigurationObjectType - affectedObjectTyped field
      • getParentName

        public java.lang.String getParentName()
        Returns the parentObject field for the current administration queue work entry.
        Returns:
        String - parentObject field, null if there is no parent.
      • getParentType

        public ConfigurationObjectType getParentType()
        Returns the parentObjectType field for the current administration queue work entry.
        Returns:
        ConfigurationObjectType - parentObjectType field, ConfigurationObjectType.unknown if there is no parent.
      • toString

        public java.lang.String toString()
        Displays information on the Administration queue entry (for trace)
        Overrides:
        toString in class AdministeredObject
        Returns:
        String Representation of the current object
      • equals

        public boolean equals(java.lang.Object obj)
        Compares this AdministeredObject with the Object passed in.

        Two instances of an AdministeredObject are equal if and only if they are both AdministeredObjects and they have the same ConfigurationObjectType and UUID.

        Overrides:
        equals in class AdministeredObject
        Parameters:
        obj - - the object that is to be compared with this one.
        Returns:
        true if the two AdministeredObjects are equal
      • getAdminQueueEntryFromString

        public static AdminQueueEntry getAdminQueueEntryFromString(java.lang.String encodedData)
        Returns a new AdminQueueEntry object that contains the information described in the encoded String. If the encodedData does not represent a valid admin queue entry, null is returned.
        Parameters:
        encodedData - String as stored in the relevant attribute of the AdminQueueProxy.
      • cancel

        public void cancel(AdminQueueProxy owningProxy)
                    throws ConfigManagerProxyLoggedException
        Removes the administration queue entry from the administration queue that matches the work identifier.
        Parameters:
        owningProxy - Proxy that can be used to route the delete request to the Broker.
        Throws:
        ConfigManagerProxyLoggedException - if the request to cancel the administration queue entry was unsuccessful. Asks the Configuration Manager to delete the supplied subscription.
      • hasBeenCompletedByBroker

        public boolean hasBeenCompletedByBroker(boolean waitIfNotUpdated)
        Returns true if and only if this AdminQueueEntry has received a completion code that indicates that the request is complete. The request may have been successful or failed.
        Parameters:
        waitIfNotUpdated - If set to true, this method will retry for the currently configured timeout period if the request has not been completed. If the request has not been completed after the timeout period has expired, false will be returned.
        Returns:
        boolean true if the request has been completed, else false is returned.
        See Also:
        BrokerProxy.setRetryCharacteristics(long)
      • registerListener

        public void registerListener(AdministeredObjectListener listener)
        Asks the broker to keep the caller informed of any changes to the current AdministeredObject.

        The listener will only be invoked after a message from the broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.

        In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.

        Overrides:
        registerListener in class AdministeredObject
        Parameters:
        listener - the object that will be notified of any events on the current AdministeredObject.
      • registerListener

        public void registerListener(AdvancedAdministeredObjectListener listener,
                                     boolean sendNotificationImmediately,
                                     java.lang.Object nextNotificationCorrelationID)
        Asks the broker to keep the caller informed of any changes to the current AdministeredObject, and ask to be provided with advanced notifications.

        Most applications will not need to use the information provided by the AdvancedAdministeredObjectListener and should therefore not call this method to register their listeners. Use registerListener(AdministeredObjectListener) if possible.

        The listener will only be invoked after a message from the broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.

        In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.

        Each AdvancedAdministeredObjectListener instance can have at most one correlationID for each AdministeredObject for which it is registered.

        Note: If the caller sets sendNotificationImmediately to false AND the object has not yet received its complete set of attributes from the broker, this method will pause until the complete attribute list has been provided; this is done in order to establish a viable baseline from which 'changed attributes' list can be calculated. In this case, if the complete attribute list is not provided by the time the configured timeout occurs, the first processModify() message for this object may include the complete set of attributes for the AdministeredObject when the attribute list finally does arrive.

        Overrides:
        registerListener in class AdministeredObject
        Parameters:
        listener - the object that will be notified of any events
        sendNotificationImmediately - If false, processModify() will only ever be called upon receipt of a modification message from the broker. If true, the method will additionally be called as soon as the listener is registered. This special notification will contain information on all of the object's attributes.
        nextNotificationCorrelationID - This is used to group together listeners that share notification information. Specifically, when a 'modify' or 'delete' notification occurs, advanced listeners are told an approximate time till the next notification to a listener with the same correlation identifier is expected. Specify null here to not use a correlation identifier for this listener.
      • registerListener

        public void registerListener(AdvancedAdministeredObjectListener listener)
        Asks the broker to keep the caller informed of any changes to the current AdministeredObject.

        The listener will only be invoked after a message from the broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.

        In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.

        After a successful completion of this call, no "object modified" notification will be sent to the listener until the next time a modification happens to occur on the object. Listeners that wish to receive an immediate notification (e.g. to provide a baseline for any future deltas) must call registerListener(listener, true, *) instead.

        Overrides:
        registerListener in class AdministeredObject
        Parameters:
        listener - the object that will be notified of any events on the current AdministeredObject.
      • deregisterListener

        public void deregisterListener(AdministeredObjectListener listener)
        Asks the IBM Integration API (CMP) to unsubscribe a previously registered AdministeredObjectListener, given the listener instance that was supplied during registration.

        If the supplied listener was registered with this AdministeredObject more than once, all registrations will be removed.

        If the supplied listener has not been registered with this administered object then this method does nothing.

        Overrides:
        deregisterListener in class AdministeredObject
        Parameters:
        listener - the object that will no longer be notified of any events
      • deregisterListener

        public void deregisterListener(AdvancedAdministeredObjectListener listener)
        Asks the IBM Integration API (CMP) to unsubscribe a previously registered AdvancedAdministeredObjectListener, given the listener instance that was supplied during registration.

        If the supplied listener was registered with this AdministeredObject more than once, all registrations will be removed.

        If the supplied listener has not been registered with this administered object then this method does nothing.

        Overrides:
        deregisterListener in class AdministeredObject
        Parameters:
        listener - the object that will no longer be notified of any events
      • setProperties

        public void setProperties(java.util.Properties suppliedProps)
                           throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the properties of the admininistration queue.
        Overrides:
        setProperties in class AdministeredObject
        Parameters:
        suppliedProps - the properties that the caller wishes to set.
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • getType

        public java.lang.String getType()
        Convenience method to return the type of this administered object. Where possible, use getConfigurationObjectType() instead, as it returns the type in a form that is more easily parsed.
        Overrides:
        getType in class AdministeredObject
        Returns:
        String The name of this AdministeredObject type.
      • setShortDescription

        public void setShortDescription(java.lang.String desc)
                                 throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the short description of an admininistration queue entry.
        Overrides:
        setShortDescription in class AdministeredObject
        Parameters:
        desc - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • setLongDescription

        public void setLongDescription(java.lang.String desc)
                                throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the long description of an admininistration queue entry.
        Overrides:
        setLongDescription in class AdministeredObject
        Parameters:
        desc - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • setName

        public void setName(java.lang.String name)
                     throws ConfigManagerProxyLoggedException
        This method overrides the base class implementation, so that an exception is thrown if this method is invoked against this class. It is not possible to change the name of an admininistration queue entry.
        Overrides:
        setName in class AdministeredObject
        Parameters:
        name - (this is ignored)
        Throws:
        ConfigManagerProxyLoggedException - to indicate this method should not be called.
      • refresh

        public void refresh()
                     throws ConfigManagerProxyLoggedException
        Forces this AdministeredObject to reregister itself with the broker and to re-receive the object's complete set of attributes. This call is not generally necessary, as the broker will keep the object's subscription active indefinitely and keep the application up to date with its latest information anyway.

        This method must not be called on AdministeredObject instances that do not yet exist on the broker (ie. objects initialized during a batch of creation requests).

        Overrides:
        refresh in class AdministeredObject
        Throws:
        ConfigManagerProxyLoggedException - if the request to refresh the object could not be sent to the broker.