Package org.springframework.core

Examples of org.springframework.core.OrderComparator


   * existing interceptors.
   *
   * @param interceptors the new interceptors
   */
  public void setInterceptors(List<JobRepositoryRemoteServiceInterceptor> interceptors) {
    Collections.sort(interceptors, new OrderComparator());
    this.interceptors.set(interceptors);
  }
View Full Code Here


        if (endpointAdapters == null) {
            Map<String, EndpointAdapter> matchingBeans = BeanFactoryUtils
                    .beansOfTypeIncludingAncestors(applicationContext, EndpointAdapter.class, true, false);
            if (!matchingBeans.isEmpty()) {
                endpointAdapters = new ArrayList<EndpointAdapter>(matchingBeans.values());
                Collections.sort(endpointAdapters, new OrderComparator());
            }
            else {
                endpointAdapters =
                        defaultStrategiesHelper.getDefaultStrategies(EndpointAdapter.class, applicationContext);
                if (logger.isDebugEnabled()) {
View Full Code Here

        if (endpointExceptionResolvers == null) {
            Map<String, EndpointExceptionResolver> matchingBeans = BeanFactoryUtils
                    .beansOfTypeIncludingAncestors(applicationContext, EndpointExceptionResolver.class, true, false);
            if (!matchingBeans.isEmpty()) {
                endpointExceptionResolvers = new ArrayList<EndpointExceptionResolver>(matchingBeans.values());
                Collections.sort(endpointExceptionResolvers, new OrderComparator());
            }
            else {
                endpointExceptionResolvers = defaultStrategiesHelper
                        .getDefaultStrategies(EndpointExceptionResolver.class, applicationContext);
                if (logger.isDebugEnabled()) {
View Full Code Here

        if (endpointMappings == null) {
            Map<String, EndpointMapping> matchingBeans = BeanFactoryUtils
                    .beansOfTypeIncludingAncestors(applicationContext, EndpointMapping.class, true, false);
            if (!matchingBeans.isEmpty()) {
                endpointMappings = new ArrayList<EndpointMapping>(matchingBeans.values());
                Collections.sort(endpointMappings, new OrderComparator());
            }
            else {
                endpointMappings =
                        defaultStrategiesHelper.getDefaultStrategies(EndpointMapping.class, applicationContext);
                if (logger.isDebugEnabled()) {
View Full Code Here

        unorderedFilterChain.addAll(httpBldr.getFilters());
        unorderedFilterChain.addAll(authBldr.getFilters());
        unorderedFilterChain.addAll(buildCustomFilterList(element, pc));

        Collections.sort(unorderedFilterChain, new OrderComparator());
        checkFilterChainOrder(unorderedFilterChain, pc, pc.extractSource(element));

        // The list of filter beans
        List<BeanMetadataElement> filterChain = new ManagedList<BeanMetadataElement>();
View Full Code Here

                }
            }
            else {
                result = Collections.emptyList();
            }
            Collections.sort(result, new OrderComparator());
            return result;
        }
        catch (ClassNotFoundException ex) {
            throw new BeanInitializationException("Could not find default strategy class for interface [" + key + "]",
                    ex);
View Full Code Here

   * existing interceptors.
   *
   * @param interceptors the new interceptors
   */
  public void setInterceptors(List<ContainerLauncherInterceptor> interceptors) {
    Collections.sort(interceptors, new OrderComparator());
    this.interceptors.set(interceptors);
  }
View Full Code Here

  /**
   * Create a default AspectJPrecedenceComparator.
   */
  public AspectJPrecedenceComparator() {
    this.advisorComparator = new OrderComparator();
  }
View Full Code Here

      String name = globalInterceptorNames[i];
      Object bean = beanFactory.getBean(name);
      beans.add(bean);
      names.put(bean, name);
    }
    Collections.sort(beans, new OrderComparator());
    for (Iterator it = beans.iterator(); it.hasNext();) {
      Object bean = it.next();
      String name = (String) names.get(bean);
      if (name.startsWith(prefix)) {
        addAdvisorOnChainCreation(bean, name);
View Full Code Here

   * @return the sorted List of Advisors
   * @see org.springframework.core.Ordered
   * @see org.springframework.core.OrderComparator
   */
  protected List sortAdvisors(List advisors) {
    Collections.sort(advisors, new OrderComparator());
    return advisors;
  }
View Full Code Here

TOP

Related Classes of org.springframework.core.OrderComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.