I have to make a design decision in my application. The following is the scenario.
I have a set of service classes that are spread across different maven modules in my application.
public class ServiceA
{
public void startA()
{
....
}
}
public class ServiceB
{
public void startB()
{
....
}
}
I have got 8 such service classes currently.More may be added in future.
All of these service classes' start has to be called in a driver program. The number of services may vary with time.And when it does,I want to avoid updating Driver program.
I have thought about making the services to implement an interface.But at runtime, the list of services needs to be available for the driver to start them.
Please suggest as to how to go about this.
Aucun commentaire:
Enregistrer un commentaire