Class Hierarchy All Classes All Fields and Methods

Class com.ibm.broker.config.proxy.DeployResult

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

public class DeployResult
extends Object

The DeployResult type is used to describe the outcome of deployment operations. Each instance represents the state of a deployment at the time it is returned from one of the deploy() methods. In other words, once an instance is supplied to the application, it is no longer updated by the Configuration Manager Proxy.

class com.ibm.broker.config.proxy.DeployResult

Responsibilities Each instance represents a possible outcome of a deployment operation.
Internal Collaborators None


 Change Activity:
 -------- ----------- -------------   ------------------------------------
 Reason:  Date:       Originator:     Comments:
 -------- ----------- -------------   ------------------------------------
 25103.2  2004-04-23  HDMPL           v6 Release

 

Field Index
Field Description
BIP_CONFIGMGR_FAILURE_MESSAGES The set of BIP numbers, generated by the ConfigMgr component, which mean that deployment failed to the broker whose name is specified in the first insert.
BIP_CONFIGMGR_SUCCESS_MESSAGES The set of BIP numbers, generated by the ConfigMgr component, which mean that deployment succeeded to the broker whose name is specified in the first insert.
BIP_DEPLOY_NOT_REQUIRED_TO_ANY_BROKER_MESSAGE The BIP message number used by the Configuration Manager to communicate that a deploy is not required because all brokers are already up-to-date.
BIP_DEPLOY_NOT_REQUIRED_TO_SPECIFIC_BROKER_MESSAGE The BIP message number used by the Configuration Manager to communicate that a deploy is not required because the broker is already up-to-date.
copyright IBM Copyright
sccsid Version information
Constructor Index
Constructor Description
DeployResult(Vector, AdministeredObject, CompletionCodeType) Creates a new DeployResult instance that refers to a deployment request sent to the supplied set of brokers.
Method Index
Method Description
void addResponseFromBroker(BrokerProxy, LogEntry) Adds the log entry to the set of responses for a particular broker.
void addResponseFromConfigManager(LogEntry) Adds the log entry to the set of responses for the overall DeployResult.
AdministeredObject getAdministeredObjectThatRequestedDeploy() Returns the AdministeredObject that started the deployment operation.
CompletionCodeType getCompletionCode() Returns the overall outcome for the current deployment.
CompletionCodeType getCompletionCodeForBroker(BrokerProxy) Returns the completion code for the supplied broker.
Enumeration getDeployedBrokers() Returns an enumeration of BrokerProxy objects to which the deployment refers.
long getDeployResultReturnTimeDelayMs() Returns the value of the deploy result time delay parameter.
Enumeration getLogEntries() Returns the LogEntry objects supplied by the Configuration Manager that describe the overall outcome of the deployment request.
Enumeration getLogEntriesForBroker(BrokerProxy) Returns an enumeration of available LogEntry objects that describe the deployment outcome for the current broker.
int getNumberOfDeployedBrokers() Returns the number of BrokerProxy objects to which the deploy refers.
boolean isCompleted() Returns true if and only if at least one of (a) and (b) are true.
void removeBrokerFromListOfOutstandingDeploys(BrokerProxy) Removes the supplied BrokerProxy from the list of brokers from which this DeployResult is still expecting a response If the supplied BrokerProxy is not involved with this deploy, the method does nothing.
void setActionResponseReceived(boolean) Sets the flag that determines whether the Configuration Manager has sent an 'action response' regarding this deploy.
void setCompletionCodeForAllBrokers(CompletionCodeType) Sets the CompletionCode associated with each broker to be the supplied value.
void setDeployResultReturnTimeDelayMs(long) Sets the amount of time, in milliseconds, that the Configuration Manager Proxy will wait once all deployment results are in, before returning the DeployResult object to the caller.
void stopWaitingForBrokerResponses() Assumes that no more brokers will respond to the deployment request.
String toString() Returns a String representation of the overall outcome of the deploy.

Fields

BIP_CONFIGMGR_FAILURE_MESSAGES

protected static final int[] BIP_CONFIGMGR_FAILURE_MESSAGES

The set of BIP numbers, generated by the ConfigMgr component, which mean that deployment failed to the broker whose name is specified in the first insert.

BIP_CONFIGMGR_SUCCESS_MESSAGES

protected static final int[] BIP_CONFIGMGR_SUCCESS_MESSAGES

The set of BIP numbers, generated by the ConfigMgr component, which mean that deployment succeeded to the broker whose name is specified in the first insert.

BIP_DEPLOY_NOT_REQUIRED_TO_ANY_BROKER_MESSAGE

protected static final int BIP_DEPLOY_NOT_REQUIRED_TO_ANY_BROKER_MESSAGE

The BIP message number used by the Configuration Manager to communicate that a deploy is not required because all brokers are already up-to-date.

BIP_DEPLOY_NOT_REQUIRED_TO_SPECIFIC_BROKER_MESSAGE

protected static final int BIP_DEPLOY_NOT_REQUIRED_TO_SPECIFIC_BROKER_MESSAGE

The BIP message number used by the Configuration Manager to communicate that a deploy is not required because the broker is already up-to-date.

copyright

protected static final java.lang.String copyright

IBM Copyright

sccsid

protected static final java.lang.String sccsid

Version information

Constructors

DeployResult

protected DeployResult(Vector brokers,
                       AdministeredObject objectRequestingDeploy,
                       CompletionCodeType initialCompletionCode) 

Creates a new DeployResult instance that refers to a deployment request sent to the supplied set of brokers. Making the constructor protected enforces the restriction that DeployResult instances can only be instantiated within this package.

Methods

addResponseFromBroker

protected void addResponseFromBroker(BrokerProxy b,
                                     LogEntry l) 

Adds the log entry to the set of responses for a particular broker. If the broker is not involved with the deployment to which this result refers, this method does nothing.

addResponseFromConfigManager

protected void addResponseFromConfigManager(LogEntry l) 

Adds the log entry to the set of responses for the overall DeployResult.

getAdministeredObjectThatRequestedDeploy

protected AdministeredObject getAdministeredObjectThatRequestedDeploy() 

Returns the AdministeredObject that started the deployment operation.

getCompletionCode

public CompletionCodeType getCompletionCode() 

Returns the overall outcome for the current deployment.

If the deployment operation affects multiple brokers, the returned object describes the outcome of the operation as a whole rather than giving any breakdown of each broker. The getCompletionCodeForBroker(BrokerProxy) method can be used to query the deployment status of a given broker. If the deployment operation affects a single broker, the returned result from this method is typically the same as the result from getCompletionCodeForBroker(BrokerProxy).

The returned result will be one of the following objects:

Further information can be determined by using the getCompletionCodeForBroker() and getLogEntryForBroker() methods, and by parsing the LogProxy object directly.

getCompletionCodeForBroker

public CompletionCodeType getCompletionCodeForBroker(BrokerProxy b) 

Returns the completion code for the supplied broker.

If the deployment operation affects multiple brokers, the returned object describes the outcome of the operation for a specific broker, rather than the overall reault. The getCompletionCode() method can be used to query the overall deployment status. If the deployment operation affects a single broker, the returned result from this method is typically the same as the result from getCompletionCode().

The result will be one of the following objects:

If the deployment operation to which this result refers did not involve the supplied broker (or if the supplied argument was null), null will be returned. Note that the cancel deployment operation does not require any broker interaction, and so this method will always return null in this case.

getDeployedBrokers

public Enumeration getDeployedBrokers() 

Returns an enumeration of BrokerProxy objects to which the deployment refers. Pub/Sub topology and topic deployments affect all brokers in the domain, and the cancel deployment operation affected none. All other deployment types affect only a single broker.

Further information can be determined by using the getCompletionCodeForBroker() and getLogEntryForBroker() methods, and by parsing the LogProxy object directly.

getDeployResultReturnTimeDelayMs

protected static long getDeployResultReturnTimeDelayMs() 

Returns the value of the deploy result time delay parameter.

getLogEntries

public Enumeration getLogEntries() 

Returns the LogEntry objects supplied by the Configuration Manager that describe the overall outcome of the deployment request. Messages pertaining to individual brokers are not returned in this enumeration, but are instead returned from the getLogEntriesForBroker(BrokerProxy) method.

getLogEntriesForBroker

public Enumeration getLogEntriesForBroker(BrokerProxy b) 

Returns an enumeration of available LogEntry objects that describe the deployment outcome for the current broker.

If the deployment to which this result refers did not involve the supplied broker, or if no log messages have been received for this broker in response to the deployment, the enumeration will be empty. If the supplied argument was null, null will be returned. Note that the cancel deployment operation does not require any broker interaction, and so this method will always return an empty enumeration in this case.

getNumberOfDeployedBrokers

public int getNumberOfDeployedBrokers() 

Returns the number of BrokerProxy objects to which the deploy refers. Note that for a cancel deployment operation this is always zero.

isCompleted

protected synchronized boolean isCompleted() 

Returns true if and only if at least one of (a) and (b) are true. (a) every broker involved with this deployment has returned a positive or negative response, AND the Configuration Manager has responded (b) the deployment request is held in a batch.

removeBrokerFromListOfOutstandingDeploys

protected void removeBrokerFromListOfOutstandingDeploys(BrokerProxy b) 

Removes the supplied BrokerProxy from the list of brokers from which this DeployResult is still expecting a response If the supplied BrokerProxy is not involved with this deploy, the method does nothing.

setActionResponseReceived

protected void setActionResponseReceived(boolean actionResponseReceived) 

Sets the flag that determines whether the Configuration Manager has sent an 'action response' regarding this deploy.

setCompletionCodeForAllBrokers

protected synchronized void setCompletionCodeForAllBrokers(CompletionCodeType type) 

Sets the CompletionCode associated with each broker to be the supplied value. Also sets the DeployResult's overall completion code to the supplied value.

setDeployResultReturnTimeDelayMs

public static void setDeployResultReturnTimeDelayMs(long timeDelayMs) 

Sets the amount of time, in milliseconds, that the Configuration Manager Proxy will wait once all deployment results are in, before returning the DeployResult object to the caller.

When listening for deployment results, the Configuration Manager Proxy is able to tell from each component's very first response whether the component considered deployment to have been successful, and so is able to return a correct success or failure message as soon as each affected broker and the Configuration Manager has responded at least once. In order to provide extra information, these components often respond multiple times during a deploy. However, the deployment result may have already been returned to the caller by the time subsequent responses are received.

This parameter causes the Configuration Manager Proxy to pause once it is about to return a DeployResult object, to see if further messages are received from the components.

The default value is 2000, which means that the Configuration Manager Proxy will wait two seconds after it knows whether the deployment has been successful or not before the DeployResult object is returned. Any further responses received in this time will be added to the DeployResult object. Consider increasing this value if components are generally slow to respond, or decrease the value to reduce the time taken to report deployment results.

This value is only used if all affected components respond to a deployment request. If a deployment times out, the Configuration Manager Proxy will have only waited the value of the timeToWaitMs parameter supplied to the deployment method.

stopWaitingForBrokerResponses

protected void stopWaitingForBrokerResponses() 

Assumes that no more brokers will respond to the deployment request. Functionally equivalent to clearing the outstandingBrokers vector.

toString

public final String toString() 

Returns a String representation of the overall outcome of the deploy.

Class Hierarchy All Classes All Fields and Methods