public abstract class AdministeredObject
extends java.lang.Object
ExecutionGroupProxy e = b.getExecutionGroupByName("myEG");
boolean showGreenLight = e.isRunning();
e.setShortDescription("Test execution group"); e.startMessageFlows();The broker 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 broker, 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. For methods that initiate deployment, a third option is to instruct the IBM Integration API (CMP) to only return when a response to the deployment has been successfully received from the affected broker.
DeployResult dr = e.deploy(barFile, isIncremental, 60 * 1000); // wait up to one minute if (dr.getCompletionCode() == CompletionCodeType.success) { // broker has responded successfully }
AdministeredObjectListener myListener = new MyAdministeredObjectListener(); // Interested in changes to execution group 'e' e.registerListener( myListener );
// After this call, myListener will no longer be informed of any changes to 'e'. e.deregisterListener( myListener );
Note that AdministeredObjects that have AdministeredObjectListener instances registered will not get tidied in this way until either they are deregistered, the application is disconnected from the broker or the application ends.
com.ibm.broker.config.proxy.AdministeredObject
|
|
Responsibilities |
Provides a means of manipulating arbitrary managed objects
within the broker. 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 |
Modifier and Type | Field and Description |
---|---|
protected static long |
baseRetryWaitTime
The initial time to wait between retries (in milliseconds)
|
protected static java.lang.String |
copyright
IBM Copyright
|
protected static java.lang.String |
LOCAL_ATTRIBUTE_IDENTIFIER
This string is used at the beginning of attributes that are
not common across all IBM Integration API (CMP) applications
connected to the broker, but are valid attributes to have in
administered objects (such as the local userid, version
number).
|
protected static long |
maxRetries
As the communication link with the broker
is not a request/response protocol we may not
always have been supplied a required piece of information
that is needed to perform an operation (for example, we can't
return a broker's execution group list if that broker's
information has not been supplied to us).
|
protected boolean |
objectUnavailable
True if and only if the broker has told the IBM Integration
API (CMP) that the object that this AdministeredObject
represents is not viewable by the current user.
|
protected com.ibm.broker.config.proxy.AdministeredObjectPool |
owningPool
The AdministeredObjectPool that was responsible for
creating this object.
|
protected java.util.Vector<AdministeredObject> |
potentialNewSubcomponents
A Vector of AdministeredObjects.
|
protected java.util.concurrent.locks.ReadWriteLock |
propertyUpdateLock
The lock used for controlling access to the object's
properties when making updates to them.
|
protected static long |
retryWaitTimeIncrement
How much to increase the retry wait time by after
each consecutive failure.
|
protected static java.lang.String |
sccsid
Version information
|
protected java.util.Vector<AdministeredObject> |
subcomponentsToBeSubmittedForCreationInCurrentBatch
A Vector of AdministeredObjects.
|
protected static java.lang.String |
UUID_DELIMITER
Shorthand for the string used to separate the type
parameter from the UUID parameter in the subcomponent properties.
|
Modifier | Constructor and Description |
---|---|
protected |
AdministeredObject(com.ibm.broker.config.proxy.AdministeredObjectPool creator)
Initialises a new AdministeredObject
AdministeredObjects can only be created by the
AdministeredObjectPool.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
checkTypeAndBase64DecodePropertyValue(java.lang.String configurableService,
java.lang.String propertyName,
java.lang.String propertyValue)
Some properties must be Base64 decoded for transmission in the comms message from the DeployMgr.
|
protected java.lang.String |
checkTypeAndBase64EncodePropertyValue(java.lang.String configurableService,
java.lang.String propertyName,
java.lang.String propertyValue)
Some properties must be Base64 encoded for transmission in the comms message to the DeployMgr.
|
protected void |
clearPredictedNewSubcomponents()
Clears the vector of predicted new subcomponents.
|
protected AdministeredObject |
createManagedSubcomponent(java.util.Properties suppliedProps)
Asks the broker to create a new object that logically belongs
within the current administered object (for example, create a new
execution group within this broker).
|
protected AdministeredObject |
createManagedSubcomponent(java.util.Properties suppliedProps,
java.util.Properties registerProps)
Asks the broker to create a new object that logically belongs
within the current administered object (for example, create a new
execution group within this broker).
|
protected AdministeredObject |
createManagedSubcomponent(java.util.Properties suppliedProps,
java.util.Properties registerProps,
boolean doRegistration)
Asks the broker to create a new object that logically belongs
within the current administered object (for example, create a new
execution group within this broker).
|
protected AdministeredObject |
createManagedSubcomponent(java.util.Properties suppliedProps,
java.util.Properties registerProps,
boolean doRegistration,
boolean allowBatching)
Asks the broker to create a new object that logically belongs
within the current administered object (for example, create a new
execution group within this broker).
|
protected void |
deleteManagedSubcomponents(java.util.Properties suppliedProps)
Asks the broker to remove objects that logically belong within
the current administered object.
|
void |
deregisterListener(AdministeredObjectListener listener)
Asks the IBM Integration API (CMP) to unsubscribe a
previously registered AdministeredObjectListener, given the
listener instance that was supplied during registration.
|
void |
deregisterListener(AdvancedAdministeredObjectListener listener)
Asks the IBM Integration API (CMP) to unsubscribe a
previously registered AdvancedAdministeredObjectListener,
given the listener instance that was supplied during
registration.
|
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.
|
boolean |
equals(java.lang.Object obj)
Compares this AdministeredObject with the Object passed in.
|
protected AdministeredObject |
execute(java.lang.String action,
java.util.Properties actionParameters,
java.lang.String objectName,
java.util.Properties objectProperties,
java.util.Properties requestProperties)
Asks the broker execute an action on this administered
object.
|
java.util.Properties |
getAdvancedProperties()
Returns a filtered list of the properties table associated with the
current object, filtered to advanced properties only.
|
protected java.util.Properties |
getAdvancedProperties(boolean waitIfNotUpdated)
Returns a filtered list of the properties table associated with the
current object, filtered to basic properties only.
|
java.util.Properties |
getBasicProperties()
Returns a filtered list of the properties table associated with the
current object, filtered to basic properties only.
|
protected java.util.Properties |
getBasicProperties(boolean waitIfNotUpdated)
Returns a filtered list of the properties table associated with the
current object, filtered to basic properties only.
|
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.
|
protected java.util.Properties |
getGrandParentUUIDProperties(boolean includeParent)
Returns the UUIDs of all the parents of this object
|
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 broker
on the object that this AdministeredObject represents.
|
java.lang.String |
getLastUpdateUser()
Deprecated.
The property that describes which user last made
a change is not used as of WebSphere Message Broker V7. Use the
Administration Log (LogProxy) to discover which changes have been
made by which user.
|
java.lang.String |
getLongDescription()
Returns the long description field for the current AdministeredObject.
|
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 broker 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 broker 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 broker 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 broker 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 properties table associated with the
current object.
|
protected java.util.Properties |
getProperties(boolean waitIfNotUpdated)
Returns a clone of the properties table associated with the
current object.
|
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.
|
protected java.lang.String |
getProperty(java.lang.String key,
boolean waitIfNotAvailable,
boolean ignoreExceptions)
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.
|
protected static java.lang.String |
getPropertyBaseName(java.lang.String propertyName)
Returns the 'base' name of the supplied
property key name.
|
protected int |
getPropertyInt(java.lang.String key)
Returns a property value as an int.
|
protected java.lang.String |
getPropertyInternal(java.lang.String key)
Returns the local value of the supplied attribute directly
from the administered properties.
|
protected boolean |
getRefreshRequired()
Returns the value of the flag that determines whether the
next read operation needs to be accompanied by a
refresh for the object's properties on the broker.
|
java.util.Date |
getRepositoryTimestamp()
Deprecated.
As of WebSphere Message Broker V7, there is
no configuration repository and so this method is no longer
used. The effects of invoking it are not defined.
|
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 broker.
|
java.util.GregorianCalendar |
getTimeOfLastUpdate()
Returns the time that the object was last updated
by a broker.
|
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.
|
protected java.lang.String |
getUUIDOfGrandParent()
Returns the UUID of the grand parent of this object
(if the parent UUID has been implemented for the
underlying object type).
|
protected java.lang.String |
getUUIDOfParent()
Returns the UUID of the parent of this object
(if the parent UUID has been implemented for the
underlying object type).
|
boolean |
hasBeenPopulatedByBroker()
Returns true if and only if this object handle
has received at least one update publication from the
connected broker.
|
boolean |
hasBeenPopulatedByBroker(boolean waitIfNotUpdated)
Returns true if and only if this object handle
has received at least one update publication from
the connected broker.
|
protected boolean |
hasBeenPopulatedByBroker(boolean waitIfNotUpdated,
boolean useTimeOfCompletionCode)
Returns true if and only if this object handle
has received at least one update publication from
the connected broker.
|
boolean |
hasBeenRestrictedByBroker()
This method returns true if and only if the IBM Integration
API (CMP) has been told by the broker that the object cannot
be viewed by the current user.
|
boolean |
hasBeenRestrictedByBroker(boolean waitIfNotUpdated)
This method returns true if and only if the IBM Integration
API (CMP) has been told by the broker that the object cannot
be viewed by the current user.
|
boolean |
hasBeenRestrictedByConfigManager()
Deprecated.
As of WebSphere Message Broker V7, Configuration
Managers are not used. Use hasBeenRestrictedByBroker() to
determine if a broker has prevented the application from
viewing the AdministeredObject.
|
boolean |
hasBeenRestrictedByConfigManager(boolean waitIfNotUpdated)
Deprecated.
As of WebSphere Message Broker V7, Configuration
Managers are not used.
|
boolean |
hasBeenUpdatedByConfigManager()
Deprecated.
As this method can also be used to determine
whether objects have been updated when connected directly
to a broker, this method's name is no longer accurate.
Use hasBeenPopulatedByBroker() instead. This method will
return the same value as hasBeenPopulatedByBroker().
|
boolean |
hasBeenUpdatedByConfigManager(boolean waitIfNotUpdated)
Deprecated.
As this method can also be used to determine
whether objects have been updated when connected directly
to a broker, this method's name is no longer accurate.
Use hasBeenPopulatedByBroker(boolean) instead.
This method will return the same value as
hasBeenPopulatedByBroker(boolean).
|
protected static boolean |
isAUserDefinedObjectDestructor(java.lang.String key)
Check if the input key is a destructor.
|
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 broker.
|
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 broker.
|
boolean |
isDeployed()
Deprecated.
As of WebSphere Message Broker V7, this method
is not relevant as the Configuration Manager is no longer used.
The effects of calling this method are no longer defined.
|
protected static boolean |
isLastPropertyIdentifier(java.lang.String propertyName)
Returns true if and only if the supplied property name
is the last element identifier in a group of properties.
|
protected static boolean |
isPartOfAPropertyGroup(java.lang.String propertyName)
Returns true if and only if the supplied property name
is part of a set of related property elements.
|
boolean |
isShared()
Deprecated.
As of WebSphere Message Broker V7, this method
is not relevant as the Configuration Manager is no longer used.
The effects of calling this method are no longer defined.
|
protected static java.util.Properties |
predictPropertiesOfNewObject(java.util.Properties createChildRequestProperties)
From the supplied list of properties, as passed as
parameters to "createchild" requests, this method
generates a list of properties that the new child
is expected to have.
|
void |
refresh()
Forces this AdministeredObject to reregister
itself with the broker and to re-receive
the object's complete set of attributes.
|
protected void |
refresh(boolean hideActionResponse)
Forces this AdministeredObject to reregister
itself with the broker and to re-receive
the object's complete set of attributes.
|
void |
registerListener(AdministeredObjectListener listener)
Asks the broker to keep the caller informed of any changes to the
current AdministeredObject.
|
void |
registerListener(AdvancedAdministeredObjectListener listener)
Asks the broker to keep the caller informed of any changes to the
current AdministeredObject.
|
void |
registerListener(AdvancedAdministeredObjectListener listener,
boolean sendNotificationImmediately,
java.lang.Object nextNotificationCorrelationID)
Asks the broker to keep the caller informed of any changes to the
current AdministeredObject, and ask to be provided with advanced
notifications.
|
protected void |
removeLocalProperty(java.lang.String key)
Removes the local property with the supplied name.
|
protected void |
setIsAwaitingSubmissionForCreation(boolean newValue)
Sets the flag that describes whether the object is
awaiting creation.
|
protected void |
setIsAwaitingSubmissionForDeletion(boolean newValue)
Sets the flag that describes whether the object is
awaiting deletion.
|
protected void |
setLastBIPMessages(java.util.Vector<LogEntry> lastBIPMessages)
Sets the object's vector of BIP messages
|
protected void |
setLastCompletionCode(CompletionCodeType newCompletionCode)
Sets the last completion code, and the corresponding
'time of last update' fields.
|
protected void |
setLocalProperty(java.lang.String key,
java.lang.String value)
Updates the local property with the supplied value.
|
void |
setLongDescription(java.lang.String desc)
Sets the long description field of the current AdministeredObject.
|
void |
setName(java.lang.String name)
Sets the name of the current AdministeredObject.
|
void |
setProperties(java.util.Properties suppliedProps)
Asks the broker to update a set of properties for the current object.
|
protected void |
setProperties(java.util.Properties suppliedProps,
boolean suppressUUIDProperty)
Asks the broker to update a set of properties for the current object.
|
protected void |
setRefreshRequired(boolean refreshRequired)
Sets or unsets the flag that determines whether the
next read operation needs to be accompanied by a
refresh for the object's properties on the broker.
|
void |
setShortDescription(java.lang.String desc)
Sets the short description field of the current AdministeredObject.
|
protected void |
setTimeOfLastUpdate()
Updates the field that contains the time the
IBM Integration API (CMP) application last received an update
notification.
|
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()
Deprecated.
Because the Configuration Manager is no longer used,
this method is not used as of WebSphere Message Broker V7.
The effects of invoking it are no longer defined.
|
protected void |
validateObjectAndPropertyName(java.lang.String objectAndPropertyName)
Object and property names need to conform to the XML name syntax as they
will later be used to construct XML to send to the broker.
|
protected void |
validateServiceObjectAndPropertyName(java.lang.String serviceObjectAndPropertyName)
Service, object and property names need to conform to the XML name syntax as they
will later be used to construct XML to send to the broker.
|
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.
|
protected static final java.lang.String copyright
protected static final java.lang.String sccsid
protected com.ibm.broker.config.proxy.AdministeredObjectPool owningPool
protected static final java.lang.String UUID_DELIMITER
protected boolean objectUnavailable
protected static long maxRetries
If this happens the IBM Integration API (CMP) may throw ConfigManagerProxyPropertyNotInitializedException. This can happen frequently if the proxy has a slow link to the broker, or if the calling application tries to make use of an AdministeredObject too soon after requesting it.
Hence, the need for a internal retry mechanism to catch the ConfigManagerProxyPropertyNotInitializedException and retry the operation. This variable represents the maximum number of consecutive exceptions we must get before we pass the exception on to the calling application.
Note: these retry values can be configured by
the calling application through the
BrokerProxy.setRetryCharacteristics()
method.
protected static long baseRetryWaitTime
protected static long retryWaitTimeIncrement
protected java.util.Vector<AdministeredObject> subcomponentsToBeSubmittedForCreationInCurrentBatch
protected java.util.Vector<AdministeredObject> potentialNewSubcomponents
This vector is cleared whenever an actionresponse message to a createchild request comes in from the broker regarding this object. It's possible therefore, that the vector is cleared prematurely (i.e. if an unrelated createchild response comes in for this AdministeredObject). Alternatively, if the broker decides to send the actionresponse message to the createchild message before the processModify() is receieved, there is a small window in which the new object will be neither in this vector, nor available to the in the hierarchy. But this is OK, because we know that the broker always sends the actionresponse after any modification messages.
The reason why this vector exists is for the scenario in which a user asks to create an object, but then immediately tries to get the object back before the broker has responded. Without this vector, the IBM Integration API (CMP) has no reference to the newly created object and so a different object is returned on the get call. It's not terribly important, because the calling application has the option of just using the returned value from the create method (why would it ever need to get a new handle to the object if it already has a reference to it?).
protected static final java.lang.String LOCAL_ATTRIBUTE_IDENTIFIER
protected java.util.concurrent.locks.ReadWriteLock propertyUpdateLock
protected AdministeredObject(com.ibm.broker.config.proxy.AdministeredObjectPool creator)
public void registerListener(AdministeredObjectListener listener)
The listener will only be invoked after a message from the broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.
In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.
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 broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.
In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.
Each AdvancedAdministeredObjectListener instance can have at most one correlationID for each AdministeredObject for which it is registered.
Note: If the caller sets sendNotificationImmediately to false AND the object has not yet received its complete set of attributes from the broker, this method will pause until the complete attribute list has been provided; this is done in order to establish a viable baseline from which 'changed attributes' list can be calculated. In this case, if the complete attribute list is not provided by the time the configured timeout occurs, the first processModify() message for this object may include the complete set of attributes for the AdministeredObject when the attribute list finally does arrive.
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
broker. If true, the method will additionally
be called as soon as the listener is registered. This special notification
will contain information on all of the object's attributes.nextNotificationCorrelationID
- This is used to group together
listeners that share notification information. Specifically, when a
'modify' or 'delete' notification occurs, advanced listeners are told an
approximate time till the next notification to a listener
with the same correlation identifier is expected.
Specify null here to not use a correlation identifier for this listener.public void registerListener(AdvancedAdministeredObjectListener listener)
The listener will only be invoked after a message from the broker is received by the IBM Integration API (CMP) that states the current object has been modified or deleted, or if a previous action involving this object and originated by this application has been completed.
In order to register listeners against multiple AdministeredObjects, user applications must call registerListener() for each object for which it wishes to receive notifications.
After a successful completion of this call, no "object modified" notification will be sent to the listener until the next time a modification happens to occur on the object. Listeners that wish to receive an immediate notification (e.g. to provide a baseline for any future deltas) must call registerListener(listener, true, *) instead.
listener
- the object that will be notified of any events
on the current AdministeredObject.public void unsubscribeFromConfigurationManagerUpdates()
protected java.lang.String getUUIDOfParent()
protected java.lang.String getUUIDOfGrandParent()
protected java.util.Properties getGrandParentUUIDProperties(boolean includeParent)
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 eventsprotected void setRefreshRequired(boolean refreshRequired)
refreshRequired
- True only if a refresh is
required on the next read.protected boolean getRefreshRequired()
protected AdministeredObject execute(java.lang.String action, java.util.Properties actionParameters, java.lang.String objectName, java.util.Properties objectProperties, java.util.Properties requestProperties) throws ConfigManagerProxyLoggedException
The action will be passed to the administered object for processing. The action parameters apply to the action only, and the object parameters are set on the identified object. The object parameter can be used to identify a component of the administeredObject.
Properties actionParms = new Properties(); actionParms.setProperty("recursive", "yes"); eg.execute("Report", actionParms, "HTTPConnector", null);will attempt to set the short and long description of the AdministeredObject described by broker1.
By default, a successful return from this method means that the request has been sent to the broker, and callers should use AdministeredObjectListener instances to discover the results of this request. However:
action
- the action to executeactionParameters
- parameters to apply to the actionobjectName
- optional objectName to which to apply the
action.objectProperties
- properties that are applied to the
objectrequestProperties
- properties that apply to the outbound request itselfConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).public void setProperties(java.util.Properties suppliedProps) throws ConfigManagerProxyLoggedException
The broker will be asked to set all properties 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.SHORT_DESCRIPTION_PROPERTY, "hi"); p.setProperty(AttributeConstants.LONG_DESCRIPTION_PROPERTY, "hello"); broker1.setProperties(p);will attempt to set the short and long description of the AdministeredObject described by broker1.
By default, a successful return from this method means that the request has been sent to the broker, and callers should use AdministeredObjectListener instances to discover the results of this request. However:
suppliedProps
- the properties that the caller wishes to set.ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).protected void setProperties(java.util.Properties suppliedProps, boolean suppressUUIDProperty) throws ConfigManagerProxyLoggedException
The broker will be asked to set all properties 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.SHORT_DESCRIPTION_PROPERTY, "hi"); p.setProperty(AttributeConstants.LONG_DESCRIPTION_PROPERTY, "hello"); broker1.setProperties(p);will attempt to set the short and long description of the AdministeredObject described by broker1.
By default, a successful return from this method means that the request has been sent to the broker, and callers should use AdministeredObjectListener instances to discover the results of this request. However:
suppliedProps
- the properties that the caller wishes to set.suppressUUIDProperty
- Only if this value is true, the setProperties()
method will not explictly add a UUID property to the message. This is
used in a special case (execution group all message flow start/stop)
where the lack of a UUID means "start/stop all message flows".ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).public java.util.Properties getProperties()
As of WebSphere Message Broker V7, this method will pause until the object has received at least one update from the broker. If an update is not received before the timeout specified in BrokerProxy.setRetryCharacteristics() is reached, AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned Properties object will contain a much smaller set of properties, that the IBM Integration API (CMP) has derived from other sources.
public java.util.Properties getBasicProperties() throws ConfigManagerProxyPropertyNotInitializedException
This method will pause until the object has received at least one update from the broker. If an update is not received before the timeout specified in BrokerProxy.setRetryCharacteristics() is reached, AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned Properties object will contain a much smaller set of properties, that the IBM Integration API (CMP) has derived from other sources.
ConfigManagerProxyPropertyNotInitializedException
protected java.util.Properties getBasicProperties(boolean waitIfNotUpdated) throws ConfigManagerProxyPropertyNotInitializedException
waitIfNotUpdated
- Only if this value is true, the method
will pause until the object has received at least one update from
the broker. If an update is not received before the timeout specified
in BrokerProxy.setRetryCharacteristics() is reached,
AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned
Properties object will contain a much smaller set of properties,
that the IBM Integration API (CMP) has derived from other
sources.ConfigManagerProxyPropertyNotInitializedException
public java.util.Properties getAdvancedProperties() throws ConfigManagerProxyPropertyNotInitializedException
This method will pause until the object has received at least one update from the broker. If an update is not received before the timeout specified in BrokerProxy.setRetryCharacteristics() is reached, AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned Properties object will contain a much smaller set of properties, that the IBM Integration API (CMP) has derived from other sources.
ConfigManagerProxyPropertyNotInitializedException
protected java.util.Properties getAdvancedProperties(boolean waitIfNotUpdated) throws ConfigManagerProxyPropertyNotInitializedException
waitIfNotUpdated
- Only if this value is true, the method
will pause until the object has received at least one update from
the broker. If an update is not received before the timeout specified
in BrokerProxy.setRetryCharacteristics() is reached,
AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned
Properties object will contain a much smaller set of properties,
that the IBM Integration API (CMP) has derived from other
sources.ConfigManagerProxyPropertyNotInitializedException
protected java.util.Properties getProperties(boolean waitIfNotUpdated)
waitIfNotUpdated
- Only if this value is true, the method
will pause until the object has received at least one update from
the broker. If an update is not received before the timeout specified
in BrokerProxy.setRetryCharacteristics() is reached,
AdministeredObject.hasBeenPopulatedByBroker() will return false and the returned
Properties object will contain a much smaller set of properties,
that the IBM Integration API (CMP) has derived from other
sources.protected AdministeredObject createManagedSubcomponent(java.util.Properties suppliedProps) throws ConfigManagerProxyLoggedException
It is not usually recommended to call this method directly. Specific object creation methods (e.g. BrokerProxy.createExecutionGroup()) exist that should be used in preference.
suppliedProps
- required attributes of the new object. Must contain
at least CommsMessageConstants.CHILD_TYPE_PROPERTY and
CommsMessageConstants.CHILD_UUID_PROPERTY values.ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).protected AdministeredObject createManagedSubcomponent(java.util.Properties suppliedProps, java.util.Properties registerProps) throws ConfigManagerProxyLoggedException
It is not usually recommended to call this method directly. Specific object creation methods (e.g. BrokerProxy.createExecutionGroup()) exist that should be used in preference.
suppliedProps
- required attributes of the new object. Must contain
at least CommsMessageConstants.CHILD_TYPE_PROPERTY and
CommsMessageConstants.CHILD_UUID_PROPERTY values.registerProps
- required registration attributes of the
new object.ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).protected AdministeredObject createManagedSubcomponent(java.util.Properties suppliedProps, java.util.Properties registerProps, boolean doRegistration) throws ConfigManagerProxyLoggedException
It is not usually recommended to call this method directly. Specific object creation methods (e.g. BrokerProxy.createExecutionGroup()) exist that should be used in preference.
suppliedProps
- required attributes of the new object. Must contain
at least CommsMessageConstants.CHILD_TYPE_PROPERTY and
CommsMessageConstants.CHILD_UUID_PROPERTY values.registerProps
- required registration attributes of the
new object.doRegistration
- indicates if a register request should
be sent to the broker for the newly created object.ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).protected AdministeredObject createManagedSubcomponent(java.util.Properties suppliedProps, java.util.Properties registerProps, boolean doRegistration, boolean allowBatching) throws ConfigManagerProxyLoggedException
It is not usually recommended to call this method directly. Specific object creation methods (e.g. BrokerProxy.createExecutionGroup()) exist that should be used in preference.
suppliedProps
- required attributes of the new object. Must contain
at least CommsMessageConstants.CHILD_TYPE_PROPERTY and
CommsMessageConstants.CHILD_UUID_PROPERTY values.registerProps
- required registration attributes of the
new object.doRegistration
- indicates if a register request should
be sent to the broker for the newly created object.allowBatching
- Indicates if we are allowed to batch the
create+registerConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).protected void clearPredictedNewSubcomponents()
protected void deleteManagedSubcomponents(java.util.Properties suppliedProps) throws ConfigManagerProxyLoggedException
It is not usually recommended to call this method directly. Specific object deletion methods (e.g. BrokerProxy.deleteExecutionGroup()) exist that should be used in preference.
suppliedProps
- the filter which will be used to identify which
objects to delete. Must contain
at least CommsMessageConstants.CHILD_TYPE_PROPERTY and
CommsMessageConstants.CHILD_UUID_PROPERTY values.ConfigManagerProxyLoggedException
- if the request could not be
sent to the broker, or (only if synchronous updates have been enabled)
the request was not successfully processed by the broker.ConfigManagerProxyRequestTimeoutException
- if synchronous updates
have been enabled and a response was not received by the broker before
a timeout occurred. (Note that this exception type extends
ConfigManagerProxyLoggedException).ConfigManagerProxyRequestFailureException
- if synchronous updates
have been enabled and the request was rejected by the broker.
(Note that this exception type extends ConfigManagerProxyLoggedException).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 information on the object's subcomponents was not supplied
before a timeout occurred.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 information on the object's subcomponents was not supplied
before a timeout occurred.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 broker 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 broker 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 broker 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 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.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 information on the object's subcomponents was not supplied
before a timeout occurred.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 broker 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 broker 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 broker
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
- protected void setLocalProperty(java.lang.String key, java.lang.String value)
For attributes that do not begin "local." this call can only ever be made by the Receiver mechanism that will update the administeredObjectProperties object based on information supplied by the broker.
Any attempt to use this call to set properties outside of the Receiver classes could result in confusing information being supplied to the caller and should therefore be avoided.
"local." attributes are used to store information that the broker doesn't supply (such as the current userid, the proxy's version number etc.) Consequently these attributes can be set by anyone.
key
- The name of the property to set.
Use the AttributeConstants.*_PROPERTY constants here.value
- The value to set the property to.protected static boolean isAUserDefinedObjectDestructor(java.lang.String key)
protected void removeLocalProperty(java.lang.String key)
For attributes that do not begin "local." this call can only ever be made by the Receiver mechanism that will update the administeredObjectProperties object based on information supplied by the broker.
Any attempt to use this call to set properties outside of the Receiver classes could result in confusing information being supplied to the caller and should therefore be avoided.
"local." attributes are used to store information that the broker doesn't supply (such as the current userid, the proxy's version number etc.) Consequently these attributes can be set by anyone.
key
- The name of the property to remove.
Use the AttributeConstants.*_PROPERTY constants here.protected int getPropertyInt(java.lang.String key) throws ConfigManagerProxyPropertyNotInitializedException
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.ConfigManagerProxyPropertyNotInitializedException
- if, due to the administered object not having
been updated by the broker yet,
the value of the requested property is unknown.
If a failure occurs this method will issue retries
in accordance with the retry characteristics set
by the BrokerProxy.setRetryCharacteristics()
method. Only after these retries have been exhausted
will the ConfigManagerProxyPropertyNotInitializedException
be thrown.protected java.lang.String getPropertyInternal(java.lang.String key)
key
- The name of the property to find.
Use the AttributeConstants.*_PROPERTY constants here.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
broker. If this is the case, this method will
issue retries in accordance with the retry characteristics set
by the BrokerProxy.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 broker
the method will wait for the length of time
described by BrokerProxy.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
broker. 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 BrokerProxy.setRetryCharacteristics()
method. Only after these retries have been exhausted
will the ConfigManagerProxyPropertyNotInitializedException
be thrown. If the information has not yet been supplied
by the broker and the value of
waitIfNotAvailable is false, this method will throw
a ConfigManagerProxyPropertyNotInitializedException
immediately.protected java.lang.String getProperty(java.lang.String key, boolean waitIfNotAvailable, boolean ignoreExceptions) 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 broker
the method will wait for the length of time
described by BrokerProxy.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.ignoreExceptions
- If and only if this is true,
no ConfigManagerProxyPropertyNotInitializedExceptions
will be thrown. In this case, if the required information
is not available, null will be returned.ConfigManagerProxyPropertyNotInitializedException
- if the value of the property is unknown because
the information has not yet been supplied by the
broker. If waitIfNotAvailable is true, this method will
issue retries in accordance with the retry characteristics set
by the BrokerProxy.setRetryCharacteristics()
method, and only after these retries have been exhausted
will the ConfigManagerProxyPropertyNotInitializedException
be thrown. If the information has not yet been supplied
by the broker and the value of
waitIfNotAvailable is false, this method will throw
a ConfigManagerProxyPropertyNotInitializedException
immediately.
If ignoreExceptions is set to true, an exception will
never be thrown. In this case, if the information is not
available then null will be returned.
If ignoreExceptions is set to false, the normal algorithm
for throwing a ConfigManagerProxyPropertyNotInitializedException
applies.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 broker
the method will wait for the length of time
described by BrokerProxy.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)
protected static boolean isPartOfAPropertyGroup(java.lang.String propertyName)
propertyName
- to be checkedprotected static boolean isLastPropertyIdentifier(java.lang.String propertyName)
propertyName
- to be checkedpublic boolean isAwaitingSubmissionForCreation()
BrokerProxy.beginUpdates()
protected void setIsAwaitingSubmissionForCreation(boolean newValue)
newValue
- New value for the
isAwaitingSubmissionForCreation flag.public boolean isAwaitingSubmissionForDeletion()
BrokerProxy.beginUpdates()
protected void setIsAwaitingSubmissionForDeletion(boolean newValue)
newValue
- New value for the
isAwaitingSubmissionForDeletion flag.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 broker, but the
request could not be sent to find it.protected static java.lang.String getPropertyBaseName(java.lang.String propertyName)
propertyName
- key whose base name is soughtpublic java.util.Date getRepositoryTimestamp() throws ConfigManagerProxyPropertyNotInitializedException
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 broker. If synchronous updates have been enabled using
BrokerProxy.setSynchronous(), subclasses of this exception type will
also be thrown if the request is rejected by the broker, or if the
request is not processed before a timeout occurs.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 broker. If synchronous updates have been enabled using
BrokerProxy.setSynchronous(), subclasses of this exception type will
also be thrown if the request is rejected by the broker, or if the
request is not processed before a timeout occurs.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, java.lang.IllegalArgumentException
name
- New nameConfigManagerProxyLoggedException
- if the request could not be
sent to the broker. If synchronous updates have been enabled using
BrokerProxy.setSynchronous(), subclasses of this exception type will
also be thrown if the request is rejected by the broker, or if the
request is not processed before a timeout occurs.java.lang.IllegalArgumentException
- if the supplied name is null or empty.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.
protected void setLastCompletionCode(CompletionCodeType newCompletionCode)
newCompletionCode
- the outcome of the operation
being processed.public java.util.GregorianCalendar getTimeOfLastCompletionCode()
getLastCompletionCode()
public java.util.Vector<LogEntry> getLastBIPMessages()
protected void setLastBIPMessages(java.util.Vector<LogEntry> lastBIPMessages)
lastBIPMessages
- of com.ibm.broker.config.proxy.LogEntry
objects. The vector may be empty or null.public java.util.GregorianCalendar getTimeOfLastUpdate()
public java.lang.String getLastUpdateUser()
public int getNumberOfSubcomponents() throws ConfigManagerProxyPropertyNotInitializedException
ConfigManagerProxyPropertyNotInitializedException
- if the required information had not been supplied by
the broker by the time a timeout occurred.protected void setTimeOfLastUpdate()
Note that an update publication is not the same as an actionresponse to a request. Publications are sent by the broker whenever an object gets updated. ActionResponses are the 'return codes' that get sent after the broker is sent a request. Rather unsurprisingly, this method should only be called from AdministeredObjectPool.processResponse() when it processes a publication notification.
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.BrokerProxy.setRetryCharacteristics(long)
public boolean hasBeenPopulatedByBroker()
public boolean hasBeenPopulatedByBroker(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.BrokerProxy.setRetryCharacteristics(long)
protected boolean hasBeenPopulatedByBroker(boolean waitIfNotUpdated, boolean useTimeOfCompletionCode)
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.useTimeOfCompletionCode
- If set to true, this method
will use the getTimeOfLastCompletionCode value to indicate
the object has been updated instead of
getTimeOfLastUpdate(). This is used by object such as
DataCaptureProxy and ActivityLogProxy which rely on the extra
information provided by the action response as well as the
modify.BrokerProxy.setRetryCharacteristics(long)
public boolean hasBeenRestrictedByBroker(boolean waitIfNotUpdated)
If the userid running the IBM Integration API (CMP) application is given view authority after first being denied view authority to the object, the application then needs to call the refresh() method to attempt to register for the object again. Only once the broker has responded to the refresh() method will hasBeenRestrictedByBroker() begin to return 'false'.
waitIfNotUpdated
- If set to true, this method
will retry for the currently configured timeout
period if the object has not received at least one response
from the broker. If the
object has not received a response after the timeout
period has expired, false will be returned.public boolean hasBeenRestrictedByBroker()
If the userid running the IBM Integration API (CMP) application is given view authority after first being denied view authority to the object, the application then needs to call the refresh() method to attempt to register for the object again. Only once the broker has responded to the refresh() method will hasBeenRestrictedByBroker() begin to return 'false'.
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 broker, 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 broker 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 broker 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 broker, the call will return immediately.public void refresh() throws ConfigManagerProxyLoggedException
This method must not be called on AdministeredObject instances that do not yet exist on the broker (ie. objects initialized during a batch of creation requests).
ConfigManagerProxyLoggedException
- if the request
to refresh the object could not be sent to the
broker.protected void refresh(boolean hideActionResponse) throws ConfigManagerProxyLoggedException
This method must not be called on AdministeredObject instances that do not yet exist on the broker (ie. objects initialized during a batch of creation requests).
hideActionResponse
- if and only if this is set to
true, any notifications that result from
this refresh will be suppressed, including actionresponse
notifications to AdministeredObjectListeners and updates
to the completion code and last BIP messages fields.ConfigManagerProxyLoggedException
- if the request
to refresh the object could not be sent to the
broker.protected static java.util.Properties predictPropertiesOfNewObject(java.util.Properties createChildRequestProperties)
createChildRequestProperties
- Properties as
supplied to the createchild request.public abstract ConfigurationObjectType getConfigurationObjectType()
public abstract ConfigurationObjectType getConfigurationObjectTypeOfParent()
public java.lang.String toVerboseString()
public java.lang.String toString()
toString
in class java.lang.Object
protected void validateObjectAndPropertyName(java.lang.String objectAndPropertyName) throws java.lang.IllegalArgumentException
objectAndPropertyName
- is of the form objectName/propertyNamejava.lang.IllegalArgumentException
protected void validateServiceObjectAndPropertyName(java.lang.String serviceObjectAndPropertyName) throws java.lang.IllegalArgumentException
serviceObjectAndPropertyName
- is of the form serviceName/objectName/propertyNamejava.lang.IllegalArgumentException
protected java.lang.String checkTypeAndBase64EncodePropertyValue(java.lang.String configurableService, java.lang.String propertyName, java.lang.String propertyValue)
configurableService
- is the name of the configurable servicepropertyName
- is the name of the propertypropertyValue
- is the unencoded property valueprotected java.lang.String checkTypeAndBase64DecodePropertyValue(java.lang.String configurableService, java.lang.String propertyName, java.lang.String propertyValue)
configurableService
- is the name of the configurable servicepropertyName
- is the name of the propertypropertyValue
- is the property value (may or may not be encoded)public boolean equals(java.lang.Object obj)
Two instances of an AdministeredObject are equal if and only if they are both AdministeredObjects and they have the same ConfigurationObjectType and UUID.
equals
in class java.lang.Object
obj
- - the object that is to be compared with this one.