Giter Site home page Giter Site logo

minjing / uapi Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 5.0 2.6 MB

The UAPI Project

License: GNU General Public License v3.0

Java 78.68% Shell 0.02% Batchfile 0.01% FreeMarker 0.99% Groovy 20.19% JavaScript 0.11%
java service-injection uapi di-framework configuration-injection

uapi's Issues

The framework can handle the lifecyle of the service

Normally the service has a lifecycle: resolved, satisfied, initialized, destroyed.

  • Resolved: the service is resolved, but all dependencies is not set, the service can't serve.
  • Satisfied: all dependents has been set to the service,
  • Initialized: the initialization method of the service has been invoked, the service can serve to outside.
  • Destroyed: the service has been destroyed.

Try to Load External Service when Resolve the Dependency Failed

Currently load external services is in Repository.start method and it is invoked only once, the behavior is not good, since if some services are added after start method is invoked then the unresolved dependency can't be loaded by external service loader, it is better that load external service dynamically

Service Defintion

Define a service by Java ServiceLoader, the service be able to define its dependencies.

Service should support lifecycle

Some services use resources to achieve some functionality, for these services we need to provide some methods like onInit, onUnload to make these services can apply resources and free resources when system shut down.

Generated Service should be a pretty Class Name

Currently the generated service name construct by extended service class name plus a "_Generated" postfix, it is not good enough, the suggestion is:

  • Generate a MD5 code for service class file, so the MD5 code will keep same if the class does not change.
  • Extract the first 5 characters as a generated class postfix and connect with "_".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.