org.jboss.ha.framework.server.deployers
Class DefaultHAPartitionDependencyCreator

java.lang.Object
  extended by org.jboss.ha.framework.server.deployers.DefaultHAPartitionDependencyCreator
All Implemented Interfaces:
HAPartitionDependencyCreator

public class DefaultHAPartitionDependencyCreator
extends Object
implements HAPartitionDependencyCreator

Default impl of HAPartitionDependencyCreator. Prepends a configurable prefix to the system-property-replaced partition name.

Author:
Brian Stansberry

Field Summary
static String DEFAULT_HA_PARTITION_DEPENDENCY_PREFIX
           
static DefaultHAPartitionDependencyCreator INSTANCE
          Shared instance, although this isn't a singleton
 
Constructor Summary
DefaultHAPartitionDependencyCreator()
          Create a new DefaultHAPartitionDependencyCreator using the default prefix.
DefaultHAPartitionDependencyCreator(String prefix)
          Create a new DefaultHAPartitionDependencyCreator.
 
Method Summary
 String getHAPartitionDependencyName(String partitionName)
          Gets the MC bean name upon which a bean using the given partition can depend.
 String getHaPartitionDependencyPrefix()
          Gets the string that should be prepended to the bean metadata's partition name to determine the name of the dependency.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_HA_PARTITION_DEPENDENCY_PREFIX

public static final String DEFAULT_HA_PARTITION_DEPENDENCY_PREFIX
See Also:
Constant Field Values

INSTANCE

public static final DefaultHAPartitionDependencyCreator INSTANCE
Shared instance, although this isn't a singleton

Constructor Detail

DefaultHAPartitionDependencyCreator

public DefaultHAPartitionDependencyCreator()
Create a new DefaultHAPartitionDependencyCreator using the default prefix.


DefaultHAPartitionDependencyCreator

public DefaultHAPartitionDependencyCreator(String prefix)
Create a new DefaultHAPartitionDependencyCreator.

Parameters:
prefix - the string that should be prepended to the bean metadata's partition name to determine the name of the dependency.
Method Detail

getHAPartitionDependencyName

public String getHAPartitionDependencyName(String partitionName)
Description copied from interface: HAPartitionDependencyCreator
Gets the MC bean name upon which a bean using the given partition can depend.

Specified by:
getHAPartitionDependencyName in interface HAPartitionDependencyCreator
Parameters:
partitionName - the partition name. Cannot be null
Returns:
the bean name

getHaPartitionDependencyPrefix

public String getHaPartitionDependencyPrefix()
Gets the string that should be prepended to the bean metadata's partition name to determine the name of the dependency.

ClusterPartition will also use the property to determine the name of a microcontainer alias to itself, which it will register in order to satisfy the dependency.

Returns:
the prefix, or DEFAULT_HA_PARTITION_DEPENDENCY_PREFIX if not configured.


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.