com.wles.blm
Class BLMPolicyDistributor

java.lang.Object
  extended bycom.wles.blm.BLMPolicyDistributor

public class BLMPolicyDistributor
extends java.lang.Object

Manages all aspects of policy distributions. Each policy distribution has a version identifier associated with it known as a distribution id. The distribution id identifies the newly enforced policy set which was activated as part of the distribution. Use a BLMContextManager to obtain an instance of a BLMPolicyDistributorManager.

See Also:
BLMContextManager

Nested Class Summary
static class BLMPolicyDistributor.DistributionStatus
          Represents the status of a distribution operation.
static class BLMPolicyDistributor.EngineInfo
          Represents the state of an engine instance.
static class BLMPolicyDistributor.EngineStatus
          Represents the distribution status of an instance of an engine.
 
Field Summary
static int NULL_DISTRIBUTION_ID
          Identifier used to repesent the null distribution id.
 
Method Summary
 int distributePolicyAsync(java.lang.String[] distributionPoints, PolicyAvailableForEnum returnWhen)
          Asynchronously distributes policy changes.
 BLMPolicyDistributor.DistributionStatus getDistributionStatus(int distributionId)
          To get status of an on going or recent distribution.
 java.util.Collection listRegisteredEngines(boolean outOfSyncOnly)
          Gets a list of the registered engine instances.
 void removeEngineRegistration(java.lang.String address)
          Removes an engine instance registration.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_DISTRIBUTION_ID

public static final int NULL_DISTRIBUTION_ID
Identifier used to repesent the null distribution id.

See Also:
Constant Field Values
Method Detail

distributePolicyAsync

public int distributePolicyAsync(java.lang.String[] distributionPoints,
                                 PolicyAvailableForEnum returnWhen)
                          throws com.wles.blm.BLMBadParameterException,
                                 com.wles.blm.BLMException
Asynchronously distributes policy changes. This is a non-blocking call and will return prior to the completion of the distribution. The status of the ongoing distribution can be checked using the getDistributionStatus method. The user may specify one or more portions of the resource tree to distribute. These distribution points are specified as resource names. A list of valid distribution points can be obtained from the BLMApplicationManager.getDistributionPointNodes method.

Parameters:
distributionPoints - a String array of distribution points, binding nodes, parent nodes of distribution points, parent nodes of binding nodes. If distributionPoints is null or distributionPoints does not contain any resource node of above kinds, only structural changes will be distributed.
returnWhen - specifies how long the call will block, one of: PolicyAvailableForEnum.READ, PolicyAvailableForEnum.WRITE, PolicyAvailableForEnum.DISTRIBUTE.
Returns:
the id of the distribution. Use the getDistributionStatus method to monitor the ongoing distribution
Throws:
BLMBadParameterException
BLMException
See Also:
getDistributionStatus(int distributionId), BLMApplicationManager.getDistributionPointNodes(String filter)

getDistributionStatus

public BLMPolicyDistributor.DistributionStatus getDistributionStatus(int distributionId)
                                                              throws com.wles.blm.BLMBadParameterException,
                                                                     com.wles.blm.BLMException
To get status of an on going or recent distribution. Status reports are available for all distributions performed since the last restart of the administration servers.

Parameters:
distributionId - the ID of the distribution. Use distribution id NULL_DISTRIBUTION_ID to get the status for the latest distribution.
Returns:
the status of the specified distribution
Throws:
BLMBadParameterException
BLMException
See Also:
NULL_DISTRIBUTION_ID

listRegisteredEngines

public java.util.Collection listRegisteredEngines(boolean outOfSyncOnly)
                                           throws com.wles.blm.BLMException
Gets a list of the registered engine instances.

Parameters:
outOfSyncOnly - if true then only those which are on an old (out of date) distribution version will be returned
Returns:
a collection of EngineInfo objects, containing the state of each registered engine.
Throws:
com.wles.blm.BLMException

removeEngineRegistration

public void removeEngineRegistration(java.lang.String address)
                              throws com.wles.blm.BLMException
Removes an engine instance registration.

Parameters:
address - the URL of the the engine instance to remove.
Throws:
com.wles.blm.BLMException


Copyright © 2005 BEA Systems Inc. All Rights Reserved.