Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.config.proxy.AdministeredObject

java.lang.Object
        com.ibm.broker.config.proxy.AdministeredObject

public abstract class AdministeredObject
extends Object

This is the abstract superclass from which all Proxy-type objects inherit. The class provides a set of methods common to all these types, such as the setting and getting of common attributes and the ability to traverse and manipulate the object hierarchy.

com.ibm.broker.config.proxy.AdministeredObject

Responsibilities Provides a means of manipulating arbitrary managed objects within the Configuration Manager domain. This includes object creation, object deletion, object modification, and listener registration/deregistration.

Instances are responsible for maintaining information about the objects they represent locally.

AdministeredObjects have a collection of String based properties that describe the object's attributes, such as their name, and also any managed subcomponents of the AdministeredObject- for example, Execution Groups within a Broker.

AdministeredObjects may have listeners registered against them, which are informed of any changes to the AdministeredObject's state.

Internal Collaborators com.ibm.broker.config.proxy.AdministeredObjectListener


Lifecycle of an AdministeredObject

  1. The caller of the API asks for a reference to the object. Note that BrokerProxy is a subclass of AdministeredObject.
        BrokerProxy b = topol.getBrokerByName("myBroker");
  2. At this point, the Configuration Manager Proxy will ask the Configuration Manager for details of the requested object, and asks it to keep the Proxy informed of any subsequent changes to the object. While this communication takes place, the caller may work with the AdministeredObject returned to it, although if the caller asks for information which is not yet available to the Configuration Manager Proxy (because the Configuration Manager has not yet supplied it) a pause may occur while the requested information is obtained. An example of information being requested is:
         boolean showGreenLight = b.isRunning();
     
  3. The caller may also wish to be kept up to date of any changes to the object, by supplying a user-written implementor of AdministeredObjectListener.
         AdministeredObjectListener myListener = new MyAdministeredObjectListener();
         // Interested in changes to broker 'b'
         b.registerListener( myListener );
     
  4. When finished with the object, the caller must first deregister any listeners.
         // After this call, myListener will no longer be informed of any changes to 'b'.
         b.deregisterListener( myListener );
     
  5. The caller need not do anything else with the object, and at some point the AdministeredObject goes out of scope. AdministeredObjects with registered listeners will never go out of scope.

  6. At some point, an internal Configuration Manager Proxy thread is told by the JVM that the object has gone out of scope. The Configuration Manager Proxy then tidies up any resources associated with the object and asks the Configuration Manager to unsubscribe the Proxy from further notifications regarding the object.

  7. If the application wishes to make use of the object after this point, the process restarts.


 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 f25103.1 2004-03-18  HDMPL           v6 Release

 

Method Index
Method Description
void deregisterListener(AdministeredObjectListener) Asks the Configuration Manager Proxy to unsubscribe a previously registered AdministeredObjectListener, given the listener instance that was supplied during registration.
void deregisterListener(AdvancedAdministeredObjectListener) Asks the Configuration Manager Proxy to unsubscribe a previously registered AdvancedAdministeredObjectListener, given the listener instance that was supplied during registration.
int elements(String) For groups of attributes (such as subcomponents) this method returns the largest number for which an attribute exists in the current object.
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.
Vector getLastBIPMessages() Returns the last vector of BIP messages that are associated with this object.
CompletionCodeType getLastCompletionCode() Returns the completion code of the last operation that was performed by this connection to the Configuration Manager on the object that this AdministeredObject represents.
String getLastUpdateUser() Returns the userid of the person who caused the last modification message to be sent for this object.
String getLongDescription() Helper method to return the long description field for the current Administered Object.
AdministeredObject getManagedSubcomponent(Properties) Returns the first object that has the requested properties.
AdministeredObject getManagedSubcomponentFromStringRepresentation(String) Returns the object which has the current object as a parent that has the supplied string representation.
Enumeration getManagedSubcomponents(Properties) Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker).
Enumeration getManagedSubcomponents(Properties, boolean) Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker).
Enumeration getManagedSubcomponents(Properties, boolean, Properties) Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker).
String getName() Returns the name of the object
int getNumberOfSubcomponents() Returns the number of subcomponents that are directly owned by this object.
AdministeredObject getParent() Returns the AdministeredObject that logically owns this object.
Vector getPredictedNewSubcomponents() Returns a clone of the predictedNewSubcomponents vector.
Properties getProperties() Returns a clone of the complete local attribute list for the current object, based on information supplied solely from the Config Manager.
String getProperty(String) Returns the local value of the supplied attribute.
String getProperty(String, boolean) Returns the local value of the supplied attribute.
String getProperty(String, int) For properties that end in a number (for example, subcomponent properties) this method returns the value of the property that ends in the supplied number, waiting if the information is not available.
String getProperty(String, int, boolean) For properties that end in a number (for example, subcomponent properties) this method returns the value of the property that ends in the supplied number, optionally waiting if the information is not available.
Date getRepositoryTimestamp() Returns the most recent repository timestamp associated with this object.
String getShortDescription() Helper method to return the short description field for the Administered Object.
GregorianCalendar getTimeOfLastCompletionCode() Returns the time that the completion code field was last updated, as a result of a request that was sent out by this connection to the Configuration Manager.
GregorianCalendar getTimeOfLastUpdate() Returns the time that the object was last updated by a Configuration Manager publication.
String getType() Convenience method to return the type of this administered object.
String getUUID() Convenience method to return the unique identifier of this administered object.
boolean hasBeenRestrictedByConfigManager() Returns true if and only if the proxy has been told by the Configuration Manager that the object is not available for use by the current user.
boolean hasBeenRestrictedByConfigManager(boolean) Returns true if and only if the proxy has been told by the Configuration Manager that the object is not available for use by the current user.
boolean hasBeenUpdatedByConfigManager() Returns true if and only if this object handle has received at least one update publication from the Configuration Manager.
boolean hasBeenUpdatedByConfigManager(boolean) Returns true if and only if this object handle has received at least one update publication from the Configuration Manager.
boolean isAwaitingSubmissionForCreation() Returns true if and only if the current object has been created as part of the current batch, but the batch has not yet been sent to the Configuration Manager.
boolean isDeployed() Returns true if and only if the object that this AdministeredObject represents exists in the deployed section of the Configuration Manager database.
boolean isShared() Returns true if and only if the object that this AdministeredObject represents exists in the shared section of the Configuration Manager database.
void refresh() Forces this AdministeredObject to reregister itself with the Configuration Manager and to re-receive the object's complete set of attributes.
void registerListener(AdministeredObjectListener) Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject.
void registerListener(AdvancedAdministeredObjectListener) Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject.
void registerListener(AdvancedAdministeredObjectListener, boolean, Object) Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject, and ask to be provided with advanced notifications.
void setAccessControlEntries(AccessControlEntry[]) Sets the complete list of access control entries that applies to this object.
void setLongDescription(String) Helper method to set the long description field of the current Administered Object.
void setName(String) Helper method to set the name of the Administered Object.
void setProperties(Properties) Asks the Configuration Manager to update a set of attributes for the current object.
void setShortDescription(String) Helper method to set the short description field of the Administered Object.
String toString() Displays the type and UUID of the current object (or the name if it is available).
String toVerboseString() Displays the list of all properties currently associated with this administered object.
void unsubscribeFromConfigurationManagerUpdates() Asks the Proxy to explicitly unsubscribe the current AdministeredObject from receiving future Configuration Manager updates.
Properties withName(String) Returns a new Properties object that has the name attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used.
Properties withUUID(String) Returns a new Properties object that has the UUID attribute set to the supplied String, and (for subclass implementations) the type attribute to be the name of the subclass of AdministeredObject being used.

Methods

deregisterListener

public void deregisterListener(AdministeredObjectListener listener) 

Asks the Configuration Manager Proxy 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.

deregisterListener

public void deregisterListener(AdvancedAdministeredObjectListener listener) 

Asks the Configuration Manager Proxy 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.

elements

public int elements(String key) throws ConfigManagerProxyPropertyNotInitializedException

For groups of attributes (such as subcomponents) this method returns the largest number for which an attribute exists in the current object. For instance, if the attributes "subcomponent.1" and "subcomponent.2" exist in the current object but "subcomponent.3" does not, elements("subcomponent.") will return 2.

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.

getConfigurationObjectType

public abstract ConfigurationObjectType getConfigurationObjectType() 

Returns the ConfigurationObjectType associated with this AdministeredObject type. For example, for ExecutionGroupProxy, ConfigurationObjectType.executiongroup is returned.

getConfigurationObjectTypeOfParent

public abstract ConfigurationObjectType getConfigurationObjectTypeOfParent() 

Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. For example, for ExecutionGroupProxy, ConfigurationObjectType.broker is returned.

getLastBIPMessages

public Vector getLastBIPMessages() 

Returns the last vector of BIP messages that are associated with this object. These are set when a previously submitted action completes and the response is received by the Configuration Manager Proxy.

getLastCompletionCode

public CompletionCodeType getLastCompletionCode() 

Returns the completion code of the last operation that was performed by this connection to the Configuration Manager on the object that this AdministeredObject represents. As requests are processed asynchronously, this method should be used in conjunction with getTimeOfLastCompletionCode() to ensure that the completion code refers to the correct operation. For example:

   GregorianCalendar oldCCTime = topology.getTimeOfLastCompletionCode();
   BrokerProxy b = topology.createBroker("fred");
   GregorianCalendar newCCTime = oldCCTime;
   while (oldCCTime.equals(newCCTime)) {
     newCCTime = topology.getTimeOfLastCompletionCode();
   }
   CompletionCodeType ccType = topology.getLastCompletionCode();
   // ccType refers to the results of the broker create
 
Note, this is not very efficient code because it hangs the caller's thread and does not check for timeouts. The preferred way of getting back results of operations is to use the listener mechanism. See registerListener() for more information.

getLastUpdateUser

public String getLastUpdateUser() 

Returns the userid of the person who caused the last modification message to be sent for this object. The field is only set after at least one modification has been received in the lifetime of this connection. If this value is null, the object has never had an update.

Note that there are circumstances in which the user that caused the last update will be unknown; for example, if the runstate of an object happens to change.

getLongDescription

public String getLongDescription() throws ConfigManagerProxyPropertyNotInitializedException

Helper method to return the long description field for the current Administered Object.

getManagedSubcomponent

public AdministeredObject getManagedSubcomponent(Properties props) throws ConfigManagerProxyPropertyNotInitializedException

Returns the first object that has the requested properties. If the search yields multiple matches an arbitrary match is returned, although an object that is "awaiting submission for creation" will be returned in preference to one that is not.

getManagedSubcomponentFromStringRepresentation

public AdministeredObject getManagedSubcomponentFromStringRepresentation(String representation) throws ConfigManagerProxyPropertyNotInitializedException

Returns the object which has the current object as a parent that has the supplied string representation. The String must be in the form "ObjectType+UUID", for example: ExecutionGroup+34d49ca0-fb00-0000-0080-f4ea5a35573b This is a convenience method to get objects from processModify() notifications, which uses this format to notify AdministeredObjectListeners of new objects.

Note that the delimiter ('+') is specified in AttributeConstants.UUID_DELIMITER.

getManagedSubcomponents

public Enumeration getManagedSubcomponents(Properties filter) throws ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker). This method takes a Properties object which will be used to filter the results, to allow commands of the form "give me all the Execution Groups with the following property". The enumeration will only contain those objects that are accessible to the current user.

For example:

 Properties p = new Properties();
 p.setProperty(AttributeConstants.OBJECT_RUNSTATE_PROPERTY,
                           AttributeConstants.OBJECT_RUNSTATE_RUNNING);
 Enumeration e = eg.getManagedSubcomponents(p);
 
will return an Enumeration of AdministeredObjects for which the runstate property is true (i.e. if applied to a MessageFlowProxy, the enumeration will contain all MessageFlowProxys that are running).

Note: If a batch of requests is being formed, the search is broadened to include all objects being created by the batch. This is so that new objects can be manipulated before they actually exist within the object hierarchy.

getManagedSubcomponents

public Enumeration getManagedSubcomponents(Properties filter,
                                           boolean returnContainsStrings) throws ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker). This method takes a Properties object which will be used to filter the results, to allow commands of the form "give me all the Execution Groups with the following property". The enumeration will only contain those objects that are accessible to the current user.

For example:

 Properties p = new Properties();
 p.setProperty(AttributeConstants.OBJECT_RUNSTATE_PROPERTY,
                           AttributeConstants.OBJECT_RUNSTATE_RUNNING);
 Enumeration e = eg.getManagedSubcomponents(p, false);
 
will return an Enumeration of AdministeredObjects for which the runstate property is true (i.e. if applied to a MessageFlowProxy, the enumeration will contain all MessageFlowProxys that are running).

The type of object inside the returned enumeration is determined by the value of the boolean returnContainsStrings parameter. The benefit of a true value here is that it avoids needlessly instantiating AdministeredObject types that may not actually be required.

Note: If a batch of requests is being formed, the search is broadened to include all objects being created by the batch. This is so that new objects can be manipulated before they actually exist within the object hierarchy.

getManagedSubcomponents

public Enumeration getManagedSubcomponents(Properties filter,
                                           boolean returnContainsStrings,
                                           Properties initialPropertiesOfNewObject) throws ConfigManagerProxyPropertyNotInitializedException

Asks the Configuration Manager to return an enumeration of all the existing objects that logically belong directly within the current administered object (for example, the execution groups within a broker). This method takes a Properties object which will be used to filter the results, to allow commands of the form "give me all the Execution Groups with the following property". The enumeration will only contain those objects that are accessible to the current user.

For example:

 Properties p = new Properties();
 p.setProperty(AttributeConstants.OBJECT_RUNSTATE_PROPERTY,
                           AttributeConstants.OBJECT_RUNSTATE_RUNNING);
 Enumeration e = eg.getManagedSubcomponents(p, false, null);
 
will return an Enumeration of AdministeredObjects for which the runstate property is true (i.e. if applied to a MessageFlowProxy, the enumeration will contain all MessageFlowProxys that are running).

The type of object inside the returned enumeration is determined by the value of the boolean returnContainsStrings parameter. The benefit of a true value here is that it avoids needlessly instantiating AdministeredObject types that may not actually be required.

Note: If a batch of requests is being formed, the search is broadened to include all objects being created by the batch. This is so that new objects can be manipulated before they actually exist within the object hierarchy.

getName

public String getName() throws ConfigManagerProxyPropertyNotInitializedException

Returns the name of the object

getNumberOfSubcomponents

public int getNumberOfSubcomponents() throws ConfigManagerProxyPropertyNotInitializedException

Returns the number of subcomponents that are directly owned by this object.

getParent

public AdministeredObject getParent() throws ConfigManagerProxyLoggedException

Returns the AdministeredObject that logically owns this object. If invoked on the root of the object hierarchy, this method returns null.

getPredictedNewSubcomponents

public Vector getPredictedNewSubcomponents() 

Returns a clone of the predictedNewSubcomponents vector. This vector contains handles to all Administered Object subcomponents of the current object that are yet to be submitted for creation in the current batch.

getProperties

public Properties getProperties() 

Returns a clone of the complete local attribute list for the current object, based on information supplied solely from the Config Manager. Modifying any properties in the returned object will not modify the object itself, unless it is subsequently supplied to the setProperties() method.

getProperty

public String getProperty(String key) throws ConfigManagerProxyPropertyNotInitializedException

Returns the local value of the supplied attribute. The information returned will be incorrect if the Configuration Manager has recently modified the required property and the Configuration Manager Proxy has not yet received notification of the change.

getProperty

public String getProperty(String key,
                          boolean waitIfNotAvailable) throws ConfigManagerProxyPropertyNotInitializedException

Returns the local value of the supplied attribute. The information returned will be incorrect if the Configuration Manager has recently modified the required property and the Configuration Manager Proxy has not yet received notification of the change.

getProperty

public String getProperty(String key,
                          int element) throws ConfigManagerProxyPropertyNotInitializedException

For properties that end in a number (for example, subcomponent properties) this method returns the value of the property that ends in the supplied number, waiting if the information is not available.

getProperty

public String getProperty(String key,
                          int element,
                          boolean waitIfNotAvailable) throws ConfigManagerProxyPropertyNotInitializedException

For properties that end in a number (for example, subcomponent properties) this method returns the value of the property that ends in the supplied number, optionally waiting if the information is not available.

getRepositoryTimestamp

public Date getRepositoryTimestamp() throws ConfigManagerProxyPropertyNotInitializedException

Returns the most recent repository timestamp associated with this object. The timestamp is updated whenever the record associated with the object is updated inside the Configuration Manager's internal repository.

getShortDescription

public String getShortDescription() throws ConfigManagerProxyPropertyNotInitializedException

Helper method to return the short description field for the Administered Object.

getTimeOfLastCompletionCode

public GregorianCalendar getTimeOfLastCompletionCode() 

Returns the time that the completion code field was last updated, as a result of a request that was sent out by this connection to the Configuration Manager. If this field is null, this object has never received such a completion code.

getTimeOfLastUpdate

public GregorianCalendar getTimeOfLastUpdate() 

Returns the time that the object was last updated by a Configuration Manager publication. The request that caused the successful update did not necessarily originate from this JVM. If this value is null, the object has never had an update.

getType

public 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 parseable.

getUUID

public String getUUID() 

Convenience method to return the unique identifier of this administered object.

hasBeenRestrictedByConfigManager

public boolean hasBeenRestrictedByConfigManager() 

Returns true if and only if the proxy has been told by the Configuration Manager that the object is not available for use by the current user. If the object has not yet received any update from the Configuration Manager, the call will block until the first update or 'object has been restricted' message is received (or the timeout configured in ConfigManagerProxy.setRetryCharacteristics() occurs).

Note that the timeout condition will result in the response of false being returned, correctly indicating that no 'object-restricted' response has been received. Callers wishing to programmatically detect the timeout condition should use hasBeenUpdatedByConfigManager(true).

hasBeenRestrictedByConfigManager

public boolean hasBeenRestrictedByConfigManager(boolean waitIfNotUpdated) 

Returns true if and only if the proxy has been told by the Configuration Manager that the object is not available for use by the current user.

hasBeenUpdatedByConfigManager

public boolean hasBeenUpdatedByConfigManager() 

Returns true if and only if this object handle has received at least one update publication from the Configuration Manager. This call returns immediately. If this method returns false, it means that requests for attributes of this AdministeredObject are likely to cause a pause while the information is discovered.

hasBeenUpdatedByConfigManager

public boolean hasBeenUpdatedByConfigManager(boolean waitIfNotUpdated) 

Returns true if and only if this object handle has received at least one update publication from the Configuration Manager. If no updates have been received, this method optionally waits for the first update to arrive.

isAwaitingSubmissionForCreation

public boolean isAwaitingSubmissionForCreation() 

Returns true if and only if the current object has been created as part of the current batch, but the batch has not yet been sent to the Configuration Manager.

isDeployed

public boolean isDeployed() throws ConfigManagerProxyPropertyNotInitializedException

Returns true if and only if the object that this AdministeredObject represents exists in the deployed section of the Configuration Manager database. Deployed objects have been the subject of a deployment action at least once- that is, have been deployed to brokers.

isShared

public boolean isShared() throws ConfigManagerProxyPropertyNotInitializedException

Returns true if and only if the object that this AdministeredObject represents exists in the shared section of the Configuration Manager database. Shared objects can be viewed or modified by the user of any Configuration Manager Proxy application that has the relevant authority.

refresh

public void refresh() throws ConfigManagerProxyLoggedException

Forces this AdministeredObject to reregister itself with the Configuration Manager and to re-receive the object's complete set of attributes. This call is not generally necessary, as the Configuration Manager will keep the object's subscription active indefinitely and keep the Proxy up to date with its latest information anyway.

This method must not be called on Administered Objects that do not yet exist on the Configuration Manager (ie. objects initialized during a batch of creation requests).

registerListener

public void registerListener(AdministeredObjectListener listener) 

Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject.

The listener will only be invoked after a message from the Configuration Manager is received by the Configuration Manager Proxy that states the current object has been modified or deleted, or if a previous action involving this object and originated by this Configuration Manager Proxy 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.

registerListener

public void registerListener(AdvancedAdministeredObjectListener listener) 

Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject.

The listener will only be invoked after a message from the Configuration Manager is received by the Configuration Manager Proxy that states the current object has been modified or deleted, or if a previous action involving this object and originated by this Configuration Manager Proxy 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.

registerListener

public void registerListener(AdvancedAdministeredObjectListener listener,
                             boolean sendNotificationImmediately,
                             Object nextNotificationCorrelationID) 

Asks the Configuration Manager 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 Configuration Manager is received by the Configuration Manager Proxy that states the current object has been modified or deleted, or if a previous action involving this object and originated by this Configuration Manager Proxy 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 Configuration Manager, 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.

setAccessControlEntries

public void setAccessControlEntries(AccessControlEntry[] accessControlList) throws ConfigManagerProxyLoggedException

Sets the complete list of access control entries that applies 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.

setLongDescription

public void setLongDescription(String desc) throws ConfigManagerProxyLoggedException

Helper method to set the long description field of the current Administered Object. If this method returns successfully the request will have been sent to the Configuration Manager (or batched for sending if a batch is in progress) but not necessarily processed by the Configuration Manager. Use an AdministeredObjectListener to discover the outcome of this request.

setName

public void setName(String name) throws ConfigManagerProxyLoggedException

Helper method to set the name of the Administered Object. If this method returns successfully the request will have been sent to the Configuration Manager (or batched for sending if a batch is in progress) but not necessarily processed by the Configuration Manager. Use an AdministeredObjectListener to discover the outcome of this request.

setProperties

public void setProperties(Properties suppliedProps) throws ConfigManagerProxyLoggedException

Asks the Configuration Manager to update a set of attributes for the current object. The Configuration Manager will be asked to set all attributes for which a key exists in the supplied Properties object, to the values associated with each key.

For example:

 Properties p = new Properties();
 p.setProperty(AttributeConstants.NAME_PROPERTY, "B1");
 p.setProperty(AttributeConstants.LONG_DESCRIPTION_PROPERTY, "hello");
 broker1.setProperties(p);
 
will attempt to set the name and the long description of the administered object described by broker1.

Upon returning from this method, the request will have been sent to the Configuration Manager (or added to a batch if batch mode is enabled) but it will not have been necessarily serviced by the Configuration Manager. Callers should use AdministeredObjectListener instances to discover the results of this request.

setShortDescription

public void setShortDescription(String desc) throws ConfigManagerProxyLoggedException

Helper method to set the short description field of the Administered Object. If this method returns successfully the request will have been sent to the Configuration Manager (or batched for sending if a batch is in progress) but not necessarily processed by the Configuration Manager. Use an AdministeredObjectListener to discover the outcome of this request.

toString

public 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.

toVerboseString

public String toVerboseString() 

Displays the list of all properties currently associated with this administered object.

unsubscribeFromConfigurationManagerUpdates

public void unsubscribeFromConfigurationManagerUpdates() 

Asks the Proxy to explicitly unsubscribe the current AdministeredObject from receiving future Configuration Manager updates. When this method completes, ALL AdministeredObjectListeners for this object will stop receiving messages regarding this object, and so this method should only be called if updates to the object are definitely NOT required by all callers using this ConfigManagerProxy connection.

After calling this method this AdministeredObject instance can no longer be used. If the logical parent of this object (e.g. the TopologyProxy if this object is a BrokerProxy) subsequently tries to retrieve the object to which this AdministeredObject refers, a new instance of the object will be returned which will be subscribed to updates from the Configuration Manager.

Using this method is not necessary for most applications, as objects are automatically unsubscribed when they go out of scope and are tidied by the JVM.

withName

public static Properties withName(String name) 

Returns a new Properties object that has the name attribute set to the supplied String, and the type attribute to be the name of the subclass of AdministeredObject being used. This provides an easy way of supplying filters to the get*() calls. For example, broker1.getExecutionGroup(ExecutionGroup.withName("eg1")); will return the Execution Group with Name "eg1" that exists in broker1.

withUUID

public static Properties withUUID(String uuid) 

Returns a new Properties object that has the UUID attribute set to the supplied String, and (for subclass implementations) the type attribute to be the name of the subclass of AdministeredObject being used. This provides an easy way of supplying filters to the get*() calls. For example, broker1.getExecutionGroup(ExecutionGroup.withUUID("1234")); will return the Execution Group with UUID "1234" that exists in broker1.

Class Hierarchy All Classes All Fields and Methods