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 8261297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:21:31+00:00 2026-06-08T03:21:31+00:00

I have a web app, in the startup a servlet creates various instances of

  • 0

I have a web app, in the startup a servlet creates various instances of the same ‘Product’, Gateway, with different configuration settings defined. Here is a small description.

Gateway: abstract class defines different types of gateways.

MessageParser: Interface, Every type of Gateway has its own parsers, process and returns a specific Message.

Mesage: an interface which has a method returning String getMessage(), all beans implement this message, and is serializable.

Listener: each type of gateway will register a listener of its own to process the incoming data.

GatewaySettings: all info the gateway needs how, when and where to connect, port etc.

GatewayBuilder produces the gateway product using the settings, Gateway buildGateway(), setting all appropriate implementations of its properties? what methods go into this, should it have setters for making it immutable?

Do the builder patter do the work or any other pattern? if builder pattern can be used where do the director of the pattern comes in this situation?

Post me if more info required!

Thanks, V.

  • 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-06-08T03:21:32+00:00Added an answer on June 8, 2026 at 3:21 am

    This stackoverflow discussion may be a really valuable resource. The appropriate use case for Builder pattern is when we need to construct an immutable instance of class throughout its life, so the Builder class creates the immutable instance. Builder itself is mutable and use & discard kind of an object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Spring web app with an applicationContext.xml and a dispatcher-servlet.xml configuration. I've
I have a web-app with a Java back-end that uses Tomcat jdbc-pool for database
I have a web app that runs fine in Visual web developer. But when
I have a web app built with Dojo 1.7.2, using RequireJS to load individual
I have another web app, that uses the liferay user database. But before a
I have a web app. I am using JSF2 framework. My problem started when
I have a web app, where I keep a subdomain for every client eg:
I have a web app that reads data from a SQL DB that contains
I have a web app that has a big and complex form (fields, checks,
I have a web app game and while in the game I want to

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.