org.jboss.deployment
Class DeploymentSorter

java.lang.Object
  extended by org.jboss.deployment.DeploymentSorter
All Implemented Interfaces:
Comparator, DefaultDeploymentSorter

public class DeploymentSorter
extends Object
implements Comparator, DefaultDeploymentSorter

A helper class for sorting deployments.

Version:
$Revision: 1.15.2.4 $
Author:
Jason Dillon, Scott.Stark@jboss.org

Field Summary
static String[] DEFAULT_SUFFIX_ORDER
          Deprecated.  
protected  String[] suffixOrder
           
 
Constructor Summary
DeploymentSorter()
           
DeploymentSorter(String[] suffixOrder)
           
 
Method Summary
 int compare(Object o1, Object o2)
          Return a negative number if o1 appears lower in the the suffix order than o2.
 int getExtensionIndex(URL url)
          Return the index that matches this url
 String[] getSuffixOrder()
           
 void setSuffixOrder(String[] suffixOrder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

DEFAULT_SUFFIX_ORDER

public static final String[] DEFAULT_SUFFIX_ORDER
Deprecated. 
The default order for sorting deployments; this has been deprecated, order is really defined in SuffixOrderHelper class and/or individualy within each subdeployer.


suffixOrder

protected String[] suffixOrder
Constructor Detail

DeploymentSorter

public DeploymentSorter(String[] suffixOrder)

DeploymentSorter

public DeploymentSorter()
Method Detail

getSuffixOrder

public String[] getSuffixOrder()
Specified by:
getSuffixOrder in interface DefaultDeploymentSorter

setSuffixOrder

public void setSuffixOrder(String[] suffixOrder)
Specified by:
setSuffixOrder in interface DefaultDeploymentSorter

compare

public int compare(Object o1,
                   Object o2)
Return a negative number if o1 appears lower in the the suffix order than o2. If the suffixes are indentical, then sorts based on name. This is so that deployment order of components is always identical.

Specified by:
compare in interface Comparator

getExtensionIndex

public int getExtensionIndex(URL url)
Return the index that matches this url



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.