scalecube / scalecube-services

Microservices library - scalecube-services is a high throughput, low latency reactive microservices library built to scale. It features: API-Gateways, service-discovery, service-load-balancing, the architecture supports plug-and-play service communication modules and features. built to provide performance and low-latency real-time stream-processing
http://scalecube.github.io/
Apache License 2.0
612 stars 106 forks source link

Allow subclasses to be considered as services. #821

Closed matyasberry closed 3 years ago

matyasberry commented 3 years ago

as the title and test says.

ronenhamias commented 3 years ago

can you provide example that showcase what is considered to be subclasses something that shows useful usecase as reference for future users. also explain the feature in the issue so it serve as a doc for discussion sake if someone will look it up in the future.

matyasberry commented 3 years ago

can you provide example that showcase what is considered to be subclasses

yes, it's in the enhanced test file:

@Service
  private interface SimpleService {
    public String name();
  }

  private class ServiceImpl implements SimpleService {
    @Override
    public String name() {
      return "duke";
    }
  }

  private class SubServiceImpl extends ServiceImpl {

  }

SubServiceImpl is a subclass which before this change was not considered (and detected) as a service implementation.