Skip to content

Add Request and DataSource via dependency injection #7

@d3ep4k

Description

@d3ep4k

Request and Datasource may not be needed by all classes

public interface RequestProcessable {
    public Response process(Request request, DataSource ds, Map<String, Object> args);
}

The above class can be deprecated and a new Executable class can be made

public class Consumer extends Executable{
    @Inject
    Request request;
    @Inject
    DataSource ds;
    
    public Response execute(Map<String, Object> args){
      //@TODO some business logic
   }

}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions