|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.broker.config.proxy.AdministeredObject
public abstract class AdministeredObject
This is the abstract superclass from which most domain object representations 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. The recommended approach to working with domain objects is similar for all administered object types:
BrokerProxy b = topol.getBrokerByName("myBroker");
boolean showGreenLight = b.isRunning();
b.setShortDescription("Test broker"); b.startMessageFlows();The Configuration Manager processes these requests asynchronously. In order to benefit from the flexibility of this asynchronous design, methods to change these properties will return to the caller as soon as the requests are sent to the Configuration Manager, not when they have been necessarily processed. Applications must interrogate the time and value of the last completion code (getTimeOfLastCompletionCode() and getLastCompletionCode() respectively) to determine when requests have completed, or (preferably) use the AdministeredObjectListener mechanism. Or, for methods that initiate deployment, a third option is to instruct the Configuration Manager Proxy to only return when a response to the deployment has been successfully received from the affected broker(s).
DeployResult dr = b.deploy(60 * 1000); // wait up to one minute if (dr.getCompletionCode() == CompletionCodeType.success) { // broker has responded successfully }
AdministeredObjectListener myListener = new MyAdministeredObjectListener(); // Interested in changes to broker 'b' b.registerListener( myListener );
// After this call, myListener will no longer be informed of any changes to 'b'. b.deregisterListener( myListener );
Note that administered objects that have AdministeredObjectListener instances registered will not get tidied in this way until either they are deregistered, the Configuration Manager Proxy is disconnected from the Configuration Manager or the application ends.
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 |
Method Summary | |
---|---|
void |
deregisterListener(AdministeredObjectListener listener)
Asks the Configuration Manager Proxy to unsubscribe a previously registered AdministeredObjectListener, given the listener instance that was supplied during registration. |
void |
deregisterListener(AdvancedAdministeredObjectListener listener)
Asks the Configuration Manager Proxy to unsubscribe a previously registered AdvancedAdministeredObjectListener, given the listener instance that was supplied during registration. |
int |
elements(java.lang.String key)
For groups of attributes (such as subcomponents) this method returns the largest number for which an attribute exists in the current object. |
abstract ConfigurationObjectType |
getConfigurationObjectType()
Returns the ConfigurationObjectType associated with this AdministeredObject type. |
abstract ConfigurationObjectType |
getConfigurationObjectTypeOfParent()
Returns the ConfigurationObjectType associated with the logical parent of this AdministeredObject type. |
java.util.Vector<LogEntry> |
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. |
java.lang.String |
getLastUpdateUser()
Returns the userid of the person who caused the last modification message to be sent for this object. |
java.lang.String |
getLongDescription()
Helper method to return the long description field for the current Administered Object. |
AdministeredObject |
getManagedSubcomponent(java.util.Properties props)
Returns the first object that has the requested properties. |
AdministeredObject |
getManagedSubcomponentFromStringRepresentation(java.lang.String representation)
Returns the object which has the current object as a parent that has the supplied string representation. |
java.util.Enumeration<AdministeredObject> |
getManagedSubcomponents(java.util.Properties filter)
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). |
java.util.Enumeration |
getManagedSubcomponents(java.util.Properties filter,
boolean returnContainsStrings)
Deprecated. Because the returned Enumeration cannot be checked for type-safety, this method should no longer be used. To return an enumeration of AdministeredObject subcomponents, use getManagedSubcomponents(Properties). To return an enumeration of strings, use the method getManagedSubcomponentsAsStrings(Properties). |
java.util.Enumeration |
getManagedSubcomponents(java.util.Properties filter,
boolean returnContainsStrings,
java.util.Properties initialPropertiesOfNewObject)
Deprecated. Because the returned Enumeration cannot be checked for type-safety, this method should no longer be used. To return an enumeration of AdministeredObject subcomponents, use getManagedSubcomponents(Properties, Properties). To return an enumeration of strings, use the method getManagedSubcomponentsAsStrings(Properties, Properties). |
java.util.Enumeration<AdministeredObject> |
getManagedSubcomponents(java.util.Properties filter,
java.util.Properties initialPropertiesOfNewObject)
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). |
java.util.Enumeration<java.lang.String> |
getManagedSubcomponentsAsStrings(java.util.Properties filter)
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). |
java.util.Enumeration<java.lang.String> |
getManagedSubcomponentsAsStrings(java.util.Properties filter,
java.util.Properties initialPropertiesOfNewObject)
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). |
java.lang.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. |
java.util.Properties |
getProperties()
Returns a clone of the complete local attribute list for the current object, based on information supplied solely from the Config Manager. |
java.lang.String |
getProperty(java.lang.String key)
Returns the local value of the supplied attribute. |
java.lang.String |
getProperty(java.lang.String key,
boolean waitIfNotAvailable)
Returns the local value of the supplied attribute. |
java.lang.String |
getProperty(java.lang.String key,
int element)
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. |
java.lang.String |
getProperty(java.lang.String key,
int element,
boolean waitIfNotAvailable)
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. |
java.util.Date |
getRepositoryTimestamp()
Returns the most recent repository timestamp associated with this object. |
java.lang.String |
getShortDescription()
Helper method to return the short description field for the Administered Object. |
java.util.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. |
java.util.GregorianCalendar |
getTimeOfLastUpdate()
Returns the time that the object was last updated by a Configuration Manager publication. |
java.lang.String |
getType()
Convenience method to return the type of this administered object. |
java.lang.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 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. |
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 waitIfNotUpdated)
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 |
isAwaitingSubmissionForDeletion()
Returns true if and only if the current object has been deleted 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 listener)
Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject. |
void |
registerListener(AdvancedAdministeredObjectListener listener)
Asks the Configuration Manager to keep the caller informed of any changes to the current AdministeredObject. |
void |
registerListener(AdvancedAdministeredObjectListener listener,
boolean sendNotificationImmediately,
java.lang.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. |
void |
setLongDescription(java.lang.String desc)
Helper method to set the long description field of the current Administered Object. |
void |
setName(java.lang.String name)
Helper method to set the name of the Administered Object. |
void |
setProperties(java.util.Properties suppliedProps)
Asks the Configuration Manager to update a set of attributes for the current object. |
void |
setShortDescription(java.lang.String desc)
Helper method to set the short description field of the Administered Object. |
java.lang.String |
toString()
Displays the type and UUID of the current object (or the name if it is available). |
java.lang.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. |
static java.util.Properties |
withName(java.lang.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. |
static java.util.Properties |
withUUID(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void registerListener(AdministeredObjectListener listener)
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.
listener
- the object that will be notified of any events
on the current AdministeredObject.public void registerListener(AdvancedAdministeredObjectListener listener, boolean sendNotificationImmediately, java.lang.Object nextNotificationCorrelationID)
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.
listener
- the object that will be notified of any eventssendNotificationImmediately
- If false, processModify()
will only ever be called upon receipt of a modification message from the
Configuration Manager. 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.public void registerListener(AdvancedAdministeredObjectListener listener)
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.
listener
- the object that will be notified of any events
on the current AdministeredObject.public void unsubscribeFromConfigurationManagerUpdates()
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.
public void deregisterListener(AdministeredObjectListener listener)
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.
listener
- the object that will no longer be notified of any eventspublic void deregisterListener(AdvancedAdministeredObjectListener listener)
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.
listener
- the object that will no longer be notified of any eventspublic void setProperties(java.util.Properties suppliedProps) throws ConfigManagerProxyLoggedException
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.
suppliedProps
- the attributes that the caller wishes to set
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager.public java.util.Properties getProperties()
public java.util.Enumeration<AdministeredObject> getManagedSubcomponents(java.util.Properties filter) throws ConfigManagerProxyPropertyNotInitializedException
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 MessageFlowProxy objects 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.
filter
- the filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.util.Enumeration getManagedSubcomponents(java.util.Properties filter, boolean returnContainsStrings) throws ConfigManagerProxyPropertyNotInitializedException
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.
filter
- The filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.returnContainsStrings
- Describes the format of the
returned enumeration (see below).
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.util.Enumeration<java.lang.String> getManagedSubcomponentsAsStrings(java.util.Properties filter) throws ConfigManagerProxyPropertyNotInitializedException
For example:
Properties p = new Properties(); p.setProperty(AttributeConstants.OBJECT_RUNSTATE_PROPERTY, AttributeConstants.OBJECT_RUNSTATE_RUNNING); Enumeration e = eg.getManagedSubcomponentsAsStrings(p);will return an Enumeration of Strings that describe objects for which the runstate property is true (i.e. if applied to a MessageFlowProxy, the enumerated strings will describe all MessageFlowProxy objects that are running).
The benefit of returning an enumeration of String objects is that it avoids needlessly instantiating AdministeredObject types that may not actually be required. The strings can be turned into AdministeredObjects by using the getManagedSubcomponentFromStringRepresentation(String) method.
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.
filter
- The filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.util.Enumeration<java.lang.String> getManagedSubcomponentsAsStrings(java.util.Properties filter, java.util.Properties initialPropertiesOfNewObject) throws ConfigManagerProxyPropertyNotInitializedException
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 benefit of returning an enumeration of String objects is that it avoids needlessly instantiating AdministeredObject types that may not actually be required. The strings can be turned into AdministeredObjects by using the getManagedSubcomponentFromStringRepresentation(String) method.
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.
filter
- The filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.initialPropertiesOfNewObject
- If new AdministeredObjects
have to be created, this parameter can be used to describe
any default attributes of the new objects. May be null if no
default attributes are required (but consider using another
variant of getManagedSubcomponents() instead).
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.util.Enumeration getManagedSubcomponents(java.util.Properties filter, boolean returnContainsStrings, java.util.Properties initialPropertiesOfNewObject) throws ConfigManagerProxyPropertyNotInitializedException
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.
filter
- The filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.returnContainsStrings
- Describes the format of the
returned enumeration (see below).initialPropertiesOfNewObject
- If new AdministeredObjects
have to be created, this parameter can be used to describe
any default attributes of the new objects. May be null if no
default attributes are required (but consider using another
variant of getManagedSubcomponents() instead).
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.util.Enumeration<AdministeredObject> getManagedSubcomponents(java.util.Properties filter, java.util.Properties initialPropertiesOfNewObject) throws ConfigManagerProxyPropertyNotInitializedException
For example:
Properties p = new Properties(); p.setProperty(AttributeConstants.OBJECT_RUNSTATE_PROPERTY, AttributeConstants.OBJECT_RUNSTATE_RUNNING); Enumeration e = eg.getManagedSubcomponents(p, new Properties());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.
filter
- The filter which will be used to identify the
required objects. Each key is an attribute name of the required object
and each value is the required value of the attribute. A null or
empty Properties object will match all subcomponents.initialPropertiesOfNewObject
- If new AdministeredObjects
have to be created, this parameter can be used to describe
any default attributes of the new objects. May be null if no
default attributes are required (but consider using another
variant of getManagedSubcomponents() instead).
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public AdministeredObject getManagedSubcomponentFromStringRepresentation(java.lang.String representation) throws ConfigManagerProxyPropertyNotInitializedException
Note that the delimiter ('+') is specified in AttributeConstants.UUID_DELIMITER.
representation
- String of the form "ObjectType+UUID".
ConfigManagerProxyPropertyNotInitializedException
- if this object's subcomponent information had not been supplied
by the Configuration Manager before a timeout occurred.public AdministeredObject getManagedSubcomponent(java.util.Properties props) throws ConfigManagerProxyPropertyNotInitializedException
props
- the filter which will be used to identify the
required objects. A null or empty object will match an arbitrary
subcomponent.
ConfigManagerProxyPropertyNotInitializedException
- if the list of
available subcomponents could not be determined because the Config
Manager has not yet supplied them.public java.lang.String getType()
public java.lang.String getUUID()
public java.lang.String getName() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the property could not be determined because the Config
Manager has not yet supplied the relevant information.public static java.util.Properties withUUID(java.lang.String uuid)
uuid
-
public static java.util.Properties withName(java.lang.String name)
name
-
public java.lang.String getProperty(java.lang.String key) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.
ConfigManagerProxyPropertyNotInitializedException
- if the value of the property is unknown because
the information has not yet been supplied by the
Configuration Manager. If this is the case, this method will
issue retries in accordance with the retry characteristics set
by the ConfigManagerProxy.setRetryCharacteristics()
method. Only after these retries have been exhausted
will the ConfigManagerProxyPropertyNotInitializedException
be thrown.public java.lang.String getProperty(java.lang.String key, boolean waitIfNotAvailable) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.waitIfNotAvailable
- if set to true, if the
object has not yet been updated by the Configuration Manager
the method will wait for the length of time
described by ConfigManagerProxy.setRetryCharacteristics()
for the information to become available.
If set to false, the method will return immediately
if the information is available, or throw a
ConfigManagerProxyPropertyNotInitializedException if
the information is not available.
ConfigManagerProxyPropertyNotInitializedException
- if the value of the property is unknown because
the information has not yet been supplied by the
Configuration Manager. If this is the case, AND the value
of waitIfNotAvailable is true, this method will
issue retries in accordance with the retry characteristics set
by the ConfigManagerProxy.setRetryCharacteristics()
method. Only after these retries have been exhausted
will the ConfigManagerProxyPropertyNotInitializedException
be thrown. If the information has not yet been supplied
by the Configuration Manager and the value of
waitIfNotAvailable is false, this method will throw
a ConfigManagerProxyPropertyNotInitializedException
immediately.public java.lang.String getProperty(java.lang.String key, int element) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.element
- The number of the property
to find and return.
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.elements(java.lang.String)
public java.lang.String getProperty(java.lang.String key, int element, boolean waitIfNotAvailable) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.element
- The number of the property
to find and returnwaitIfNotAvailable
- if set to true, if the
object has not yet been updated by the Configuration Manager
the method will wait for the length of time
described by ConfigManagerProxy.setRetryCharacteristics()
for the information to become available.
If set to false, the method will return immediately.
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.elements(java.lang.String)
public boolean isAwaitingSubmissionForCreation()
ConfigManagerProxy.beginUpdates()
public boolean isAwaitingSubmissionForDeletion()
ConfigManagerProxy.beginUpdates()
public boolean isShared() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the required information has not been supplied by the
Configuration Manager.public boolean isDeployed() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the required information has not been supplied by the
Configuration Manager.public AdministeredObject getParent() throws ConfigManagerProxyLoggedException
ConfigManagerProxyLoggedException
- if the parent
object is not immediately available and has to be
requested from the Configuration Manager, but the
request could not be sent to the Configuration Manager.public java.util.Date getRepositoryTimestamp() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if a timestamp might exist, but the object's
information has not yet been supplied by the
Configuration Manager.public int elements(java.lang.String key) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.public void setLongDescription(java.lang.String desc) throws ConfigManagerProxyLoggedException
desc
- New description string.
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager.public java.lang.String getLongDescription() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.public void setShortDescription(java.lang.String desc) throws ConfigManagerProxyLoggedException
desc
- New description string.
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager.public java.lang.String getShortDescription() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the requested property is not yet known.public void setName(java.lang.String name) throws ConfigManagerProxyLoggedException
name
- New name.
ConfigManagerProxyLoggedException
- if the request could not be
sent to the Configuration Manager.public CompletionCodeType getLastCompletionCode()
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 createNote, 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.
public java.util.GregorianCalendar getTimeOfLastCompletionCode()
getLastCompletionCode()
public java.util.Vector<LogEntry> getLastBIPMessages()
public java.util.GregorianCalendar getTimeOfLastUpdate()
public java.lang.String getLastUpdateUser()
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.
public int getNumberOfSubcomponents() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the required information had not been supplied by
the Configuration Manager by the time a timeout occurred.public boolean hasBeenUpdatedByConfigManager()
public boolean hasBeenUpdatedByConfigManager(boolean waitIfNotUpdated)
waitIfNotUpdated
- If set to true, this method
will retry for the currently configured timeout
period if the object has not been updated. If the
object has not been updated after the timeout
period has expired, false will be returned.
ConfigManagerProxy.setRetryCharacteristics(int,int,int)
public boolean hasBeenRestrictedByConfigManager()
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).
public boolean hasBeenRestrictedByConfigManager(boolean waitIfNotUpdated)
waitIfNotUpdated
- If this is set to true and
the administered object has not yet received an
update from the Configuration Manager, the call will block
until an update is received (or the timeout configured
in ConfigManagerProxy.setRetryCharacteristics() occurs).
This parameter allows the caller to ensure correctness
of the returned value (if the value of the restriction
flag is sought before the 'this object has been restricted'
response from the Configuration Manager has necessarily been returned,
that this method may return 'false' even though the object
is not accessible to the user. This is because it is the
receipt of a negative response from the Configuration Manager that
triggers the flag to be set.).
If the parameter is set to false, or the object has already
received at least one message from the Configuration
Manager, the call will return immediately.
public void refresh() throws ConfigManagerProxyLoggedException
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).
ConfigManagerProxyLoggedException
- if the request
to refresh the object could not be sent to the
Configuration Manager.public abstract ConfigurationObjectType getConfigurationObjectType()
public abstract ConfigurationObjectType getConfigurationObjectTypeOfParent()
public java.lang.String toVerboseString()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |