com.ibm.broker.config.proxy
Class TopicRootProxy

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

public class TopicRootProxy
extends TopicProxy

Represents the root of the topic hierarchy.

In order to use TopicRootProxy 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);
     TopicRootProxy t = cmp.getTopicRoot();
 

com.ibm.broker.config.proxy.TopicRootProxy extends com.ibm.broker.config.proxy.TopicProxy

Responsibilities Represents the root node in the topic tree. Is also a container of topics. Sub-topics are also represented as TopicProxy objects, and the result is a Topic hierarchy.
Internal Collaborators None

 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 25103.1  2004-03-22  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/TopicRootProxy.java, CMP, S000 1.29

Nested Class Summary
 
Nested classes/interfaces inherited from class com.ibm.broker.config.proxy.TopicProxy
TopicProxy.Policy, TopicProxy.QoP
 
Method Summary
 void addAccessControlEntries(AccessControlEntry[] accessControlList)
          Adds this list to the list of access control entries that applies to this object.
 void addDefaultPolicy(TopicProxy.Policy defaultPolicy)
          Does nothing when applied to the topic root.
 void deploy()
          Deploys any changes to the topic tree to all brokers
 void deploy(boolean isDelta)
          Deploys the topic tree to all brokers.
 DeployResult deploy(boolean isDelta, long timeToWaitMs)
          Deploys the topic tree to the brokers
 AccessControlEntry[] getAccessControlEntries()
          Creates and returns a set of AccessControlEntry objects that describes the set of (principal,permission) tuples that have been applied specifically to this object.
 ConfigurationObjectType getConfigurationObjectType()
          Returns the ConfigurationObjectType associated with this AdministeredObject type.
 ConfigurationObjectType getConfigurationObjectTypeOfParent()
          Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type.
 java.util.Enumeration getGroups()
          Returns an Enumeration of all group principals known to the User Name Server.
 java.util.Enumeration getPublicGroups()
          Returns an Enumeration of all public group principals known to the User Name Server.
 java.util.Enumeration getUsers()
          Returns an Enumeration of all user principals known to the User Name Server.
 void removeAccessControlEntries(AccessControlEntry[] accessControlList)
          Deletes this list from the list of access control entries that applies to this object.
 void removeDefaultPolicy()
          Does nothing when applied to the topic root.
 void setAccessControlEntries(AccessControlEntry[] accessControlList)
          Sets the complete list of access control entries that apply to this object.
 java.lang.String toString()
          Displays the name of the object
 
Methods inherited from class com.ibm.broker.config.proxy.TopicProxy
addPolicies, createChildTopic, deleteChildTopic, getChildTopic, getChildTopicByName, getChildTopics, getDefaultPolicy, getMulticastEnabled, getMulticastEncrypted, getMulticastIPv4GroupAddress, getMulticastIPv6GroupAddress, getMulticastQualityOfService, getNumberOfPolicies, getPolicies, getQualityOfProtectionLevel, getTopicName, moveTopic, removePolicies, setDefaultPolicy, setMulticastEnabled, setMulticastEncrypted, setMulticastGroupAddress, setMulticastQualityOfService, setQualityOfProtectionLevel, withName, withUUID
 
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, getName, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getConfigurationObjectType

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

Overrides:
getConfigurationObjectType in class TopicProxy
Returns:
ConfigurationObjectType associated with this class.

getConfigurationObjectTypeOfParent

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

Overrides:
getConfigurationObjectTypeOfParent in class TopicProxy
Returns:
ConfigurationObjectType associated with the logical parent of this class.

deploy

public void deploy()
            throws ConfigManagerProxyLoggedException
Deploys any changes to the topic tree to all brokers

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

deploy

public void deploy(boolean isDelta)
            throws ConfigManagerProxyLoggedException
Deploys the topic tree to all brokers. The method returns as soon as the deploy request is enqueued for sending to the Configuration Manager.

Parameters:
isDelta - If true, only changes to the deployed topic hierarchy will be submitted to brokers. Otherwise, the complete topic tree will be deployed.
Throws:
ConfigManagerProxyLoggedException - if the request could not be sent to the Configuration Manager.

deploy

public DeployResult deploy(boolean isDelta,
                           long timeToWaitMs)
                    throws ConfigManagerProxyLoggedException
Deploys the topic tree to the brokers

Parameters:
isDelta - If true, only changes to the deployed topic hierarchy will be submitted to brokers. Otherwise, the complete topic tree will be deployed.
timeToWaitMs - A positive value describes the maximum length of time to wait for broker responses (in milliseconds) before returning the DeployResult. Alternatively:
  • A value of 0 causes the method to return immediately after the message has been successfully sent to the Configuration Manager.
  • A value of AttributeConstants.DEPLOYRESULT_SUPPRESSION causes the method to return null immediately after the message has been successfully sent to the Configuration Manager. DeployResult objects are relatively expensive to create and maintain, and so supplying this constant should be used if the DeployResult is not parsed, or if performance of the Configuration Manager Proxy application is critical.
  • A value of AttributeConstants.DEPLOYRESULT_WAIT_INDEFINITELY causes the method to wait until responses have been received from all brokers affected by the deploy.
  • If batch mode is enabled the method returns immediately regardless of the value of this parameter. All completion codes in the returned DeployResult object will be 'pending' unless the value of timeToWaitMs is AttributeConstants.DEPLOYRESULT_SUPPRESSION, in which case the DeployResult will be null (as usual).
Returns:
DeployResult object that can be used to query the results of the deployment.
Throws:
ConfigManagerProxyLoggedException - if the request could not be sent to the Configuration Manager.

addDefaultPolicy

public void addDefaultPolicy(TopicProxy.Policy defaultPolicy)
                      throws ConfigManagerProxyLoggedException
Does nothing when applied to the topic root.

Overrides:
addDefaultPolicy in class TopicProxy
Parameters:
defaultPolicy - Not used
Throws:
ConfigManagerProxyLoggedException - Never thrown for the topic root.

removeDefaultPolicy

public void removeDefaultPolicy()
                         throws ConfigManagerProxyLoggedException
Does nothing when applied to the topic root.

Overrides:
removeDefaultPolicy in class TopicProxy
Throws:
ConfigManagerProxyLoggedException - Never thrown for the topic root.

getUsers

public java.util.Enumeration getUsers()
                               throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all user principals known to the User Name Server.

Returns:
Enumeration Each element is a String containing a single userid.
Throws:
ConfigManagerProxyPropertyNotInitializedException - If the user information has not been supplied to us from the Configuration Manager.

getGroups

public java.util.Enumeration getGroups()
                                throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all group principals known to the User Name Server.

Returns:
Enumeration Each element is a String containing a single group.
Throws:
ConfigManagerProxyPropertyNotInitializedException - If the user information has not been supplied to us from the Configuration Manager.

getPublicGroups

public java.util.Enumeration getPublicGroups()
                                      throws ConfigManagerProxyPropertyNotInitializedException
Returns an Enumeration of all public group principals known to the User Name Server.

Returns:
Enumeration Each element is a String containing a single public group.
Throws:
ConfigManagerProxyPropertyNotInitializedException - If the user information has not been supplied to us from the Configuration Manager.

toString

public java.lang.String toString()
Displays the name of the object

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

getAccessControlEntries

public AccessControlEntry[] getAccessControlEntries()
Creates and returns a set of AccessControlEntry objects that describes the set of (principal,permission) tuples that have been applied specifically to this object.

This method does not return details of permissions that have been implicitly granted by inherited access control entries.

Returns:
AccessControlEntry[] array of AccessControlEntry objects that apply to this object.
Throws:
ConfigManagerProxyPropertyNotInitializedException - if this objects list of Access Control Entries was not supplied by the Configuration Manager before a timeout occurred.

setAccessControlEntries

public void setAccessControlEntries(AccessControlEntry[] accessControlList)
                             throws ConfigManagerProxyLoggedException
Sets the complete list of access control entries that apply to this object. Null elements in the array are ignored. If the array itself is null or empty, all access control entries for this object are removed.

This method submits only changed access control entries to the Configuration Manager. It converts the supplied array into a set of access control entries to add and a set of access control entries to remove, based on the information currently supplied from the Configuration Manager. The add and remove operations are processed separately by the Configuration Manager as two atomic, transactional requests.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

Parameters:
accessControlList - Array of access control entries which are to apply to this object.
Throws:
ConfigManagerProxyLoggedException - if the request to update the object could not be sent to the Configuration Manager.
ConfigManagerProxyPropertyNotInitializedException - if this objects current list of Access Control Entries was not supplied by the Configuration Manager before a timeout occurred.

addAccessControlEntries

public void addAccessControlEntries(AccessControlEntry[] accessControlList)
                             throws ConfigManagerProxyLoggedException
Adds this list to the list of access control entries that applies to this object. Null elements in the array are ignored.

This operation is completely transactional. If the Configuration Manager successfully processes this request, all access control entries from the supplied array will be associated with this administered object. If not, the access control list for this object will have not been modified.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

Parameters:
accessControlList - Array of access control entries which are to be added to this object.
Throws:
ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException - if the request to update the object could not be sent to the Configuration Manager.

removeAccessControlEntries

public void removeAccessControlEntries(AccessControlEntry[] accessControlList)
                                throws ConfigManagerProxyLoggedException
Deletes this list from the list of access control entries that applies to this object. Null elements in the array are ignored. In addition, if any elements of the array are not associated with the administered object, they will be ignored.

This operation is completely transactional. If the Configuration Manager successfully processes this request, no access control entries from the supplied array will be associated with this administered object. If not, the access control list for this object will have not been modified.

If the Configuration Manager to which the Configuration Manager Proxy is connected is of a version less than v6, this method will have no effect.

Parameters:
accessControlList - Array of access control entries which are to be removed from this object.
Throws:
ConfigManagerProxyLoggedException - if the request to update the object could not be sent to the Configuration Manager.