com.ibm.broker.config.proxy
Class LogProxy

java.lang.Object
  extended by com.ibm.broker.config.proxy.AdministeredObject
      extended by com.ibm.broker.config.proxy.LogProxy

public class LogProxy
extends AdministeredObject

The LogProxy represents the selection of broker log entries for the current user.

In order to use LogProxy objects, applications must first obtain handles to them. Here is an example of how to do this:

     ConfigManagerConnectionParameters cmcp =
         new MQConfigManagerConnectionParameters("localhost", 1414, "QMGR");
     ConfigManagerProxy cmp = ConfigManagerProxy.getInstance(cmcp);
     LogProxy l = cmp.getLog();
 

com.ibm.broker.config.proxy.LogProxy extends com.ibm.broker.config.proxy.AdministeredObject

Responsibilities Represents a collection of Log Entries.
Internal Collaborators com.ibm.broker.config.proxy.LogEntry

 Change Activity:
 --------   ----------- -------------   ------------------------------------
 Reason:    Date:       Originator:     Comments:
 --------   ----------- -------------   ------------------------------------
 25103.1    2004-03-29  HDMPL           v6 Release
 44739.7    2007-07-30  HDMPL           v6.1 Release:
                                           Methods now return genericized types where relevant

 

Version:
Config/com/ibm/broker/config/proxy/LogProxy.java, CMP, S000 1.22

Method Summary
 void clear()
          Removes all log entries associated with this LogProxy (that is, clears the log of all of this user's messages).
 java.util.Enumeration<LogEntry> elements()
          Returns an Enumeration of all LogEntry objects available to the user in the log.
 ConfigurationObjectType getConfigurationObjectType()
          Returns the ConfigurationObjectType associated with this AdministeredObject type.
 ConfigurationObjectType getConfigurationObjectTypeOfParent()
          Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.
 LogEntry getLogEntry(int position)
          Returns the LogEntry at the supplied position in the log,
 java.lang.String getName()
          Returns the name of the object
 int getSize()
          Returns the number of LogEntry objects available to the user.
 java.lang.String toString()
          Displays the type and UUID of the current object (or the name if it is available).
 
Methods inherited from class com.ibm.broker.config.proxy.AdministeredObject
deregisterListener, deregisterListener, elements, getLastBIPMessages, getLastCompletionCode, getLastUpdateUser, getLongDescription, getManagedSubcomponent, getManagedSubcomponentFromStringRepresentation, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponents, getManagedSubcomponentsAsStrings, getManagedSubcomponentsAsStrings, getNumberOfSubcomponents, getParent, getProperties, getProperty, getProperty, getProperty, getProperty, getRepositoryTimestamp, getShortDescription, getTimeOfLastCompletionCode, getTimeOfLastUpdate, getType, getUUID, hasBeenRestrictedByConfigManager, hasBeenRestrictedByConfigManager, hasBeenUpdatedByConfigManager, hasBeenUpdatedByConfigManager, isAwaitingSubmissionForCreation, isAwaitingSubmissionForDeletion, isDeployed, isShared, refresh, registerListener, registerListener, registerListener, setLongDescription, setName, setProperties, setShortDescription, toVerboseString, unsubscribeFromConfigurationManagerUpdates, withName, withUUID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSize

public int getSize()
            throws ConfigManagerProxyPropertyNotInitializedException
Returns the number of LogEntry objects available to the user.

Returns:
int Number of LogEntry objects viewable in the log
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the requested property is not yet known.

getLogEntry

public LogEntry getLogEntry(int position)
                     throws java.lang.ArrayIndexOutOfBoundsException,
                            ConfigManagerProxyPropertyNotInitializedException
Returns the LogEntry at the supplied position in the log,

Parameters:
position - Number of the LogEntry to return. The minimum value is 1, the maximum value is determined by getSize().
Returns:
LogEntry The entry at the given element
Throws:
java.lang.ArrayIndexOutOfBoundsException - if the value of the supplied position is less than one or greater than the number of viewable entries.
ConfigManagerProxyPropertyNotInitializedException - if the requested property is not yet known.

elements

public java.util.Enumeration<LogEntry> elements()
                                         throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all LogEntry objects available to the user in the log.

Returns:
Enumeration of available LogEntry objects
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the requested property is not yet known.

clear

public void clear()
           throws ConfigManagerProxyLoggedException
Removes all log entries associated with this LogProxy (that is, clears the log of all of this user's messages).

Throws:
ConfigManagerProxyLoggedException - if the request to clear the log could not be sent to the Configuration Manager.

getConfigurationObjectType

public ConfigurationObjectType getConfigurationObjectType()
Returns the ConfigurationObjectType associated with this AdministeredObject type.

Specified by:
getConfigurationObjectType in class AdministeredObject
Returns:
ConfigurationObjectType associated with this class.

getConfigurationObjectTypeOfParent

public ConfigurationObjectType getConfigurationObjectTypeOfParent()
Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.

Specified by:
getConfigurationObjectTypeOfParent in class AdministeredObject
Returns:
ConfigurationObjectType associated with the logical parent of this class.

getName

public java.lang.String getName()
                         throws ConfigManagerProxyPropertyNotInitializedException
Returns the name of the object

Overrides:
getName in class AdministeredObject
Returns:
String name of the current object.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if the property could not be determined because the Config Manager has not yet supplied the relevant information.

toString

public java.lang.String toString()
Displays the type and UUID of the current object (or the name if it is available). The format is not guaranteed, and therefore should not be parsed programatically.

Overrides:
toString in class AdministeredObject
Returns:
String Representation of the current object