Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7491793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:10:38+00:00 2026-05-29T16:10:38+00:00

I have a list as follows: ArrayList<DiameterMessageHandler> handlers = new ArrayList<>(); handlers.add(new AARHandler()); handlers.add(new

  • 0

I have a list as follows:

ArrayList<DiameterMessageHandler> handlers = new ArrayList<>();
handlers.add(new AARHandler());
handlers.add(new CERHandler());
handlers.add(new PPAHandler());
handlers.add(new STRHandler());
handlers.add(new DWRHandler());

I am wondering how to create a spring bean that takes handlers as one of its arguments, i.e. is it possible to do this in the applicationContext.xml – Do I have to create separate beans for the list and each of the handlers(AARHandler etc) first? Here is my applicationContext.xml

<bean id="DiameterClient" class="com.rory.ptspsim.diameterclient.DiameterClient" scope="singleton" init-method="start">
        <constructor-arg type="java.lang.String" index="0"><value>${pcca.host}</value></constructor-arg>      
        <constructor-arg index="1">WHAT GOES HERE?</constructor-arg>        
    </bean>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T16:10:39+00:00Added an answer on May 29, 2026 at 4:10 pm

    Probably you want all these handlers be Spring beans too. This is the configuration:

    <bean id="DiameterClient" class="com.rory.ptspsim.diameterclient.DiameterClient" init-method="start">
        <constructor-arg value="${pcca.host}" />
        <constructor-arg>
            <list>
                <ref bean="aarHandler" />
                ...
            </list>
        </constructor-arg>      
    </bean>
    
    <bean id="aarHandler" class="com.rory.ptspsim.diameterclient.AARHandler" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See the following ArrayList: List<Integer> values = new ArrayList<Integer>(); values.add(0); values.add(1); values.add(2); values.add(3); values.add(4);
I have created a Map as follows: private Map<String, List<Client>> clientCatalogue; this.clientCatalogue = new
Say I have a list as follows: item1 item2 item3 Is there a CSS
I have a list of objects output from ldapsearch as follows: dn: cn=HPOTTER,ou=STUDENTS,ou=HOGWARTS,o=SCHOOL dn:
If I have a drop down list as follows <div class=editor-label> <%= Html.DropDownListFor(model =>
I have a class as follows :- interface IFilterCondition { List<Name> ApplyFilter(List<Name> namesToFilter); }
I have a map declared as follows: map < string , list < string
I have a list of strings in C#, and want to create a list
I have a class that has a method as follows :- public void setCurrencyCode(List<String>
I have a list of an object like follows List<ProductInfo> I want to serialize

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.