Ressor Git

Ressor Git Source implementation

License

License

Categories

Categories

Git Development Tools Version Controls
GroupId

GroupId

xyz.ressor
ArtifactId

ArtifactId

ressor-git-source-jdk8
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

Ressor Git
Ressor Git Source implementation
Project URL

Project URL

https://ressor.xyz
Source Code Management

Source Code Management

https://github.com/dmart28/ressor

Download ressor-git-source-jdk8

How to add to project

<!-- https://jarcasting.com/artifacts/xyz.ressor/ressor-git-source-jdk8/ -->
<dependency>
    <groupId>xyz.ressor</groupId>
    <artifactId>ressor-git-source-jdk8</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/xyz.ressor/ressor-git-source-jdk8/
implementation 'xyz.ressor:ressor-git-source-jdk8:1.3.0'
// https://jarcasting.com/artifacts/xyz.ressor/ressor-git-source-jdk8/
implementation ("xyz.ressor:ressor-git-source-jdk8:1.3.0")
'xyz.ressor:ressor-git-source-jdk8:jar:1.3.0'
<dependency org="xyz.ressor" name="ressor-git-source-jdk8" rev="1.3.0">
  <artifact name="ressor-git-source-jdk8" type="jar" />
</dependency>
@Grapes(
@Grab(group='xyz.ressor', module='ressor-git-source-jdk8', version='1.3.0')
)
libraryDependencies += "xyz.ressor" % "ressor-git-source-jdk8" % "1.3.0"
[xyz.ressor/ressor-git-source-jdk8 "1.3.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.30
xyz.ressor : ressor-core-jdk8 jar 1.3.0
org.eclipse.jgit : org.eclipse.jgit jar 5.6.0.201912101111-r

Project Modules

There are no modules declared in this project.

Ressor

GitHub Build Status Join the chat at https://gitter.im/dmart28/ressor Maven Central

Ressor is a framework which ease the development of resource-based Java services. It translates your static or dynamic resources (files, http endpoints, git repositories, etc) into a complete Java service instance, implicitly reloading it when the source data is changing.

See the Basic Concepts page for the more details.

How it works?

Ressor generates a special proxy class at runtime, which inherits the class/interface of your service. It delegates the calls to an actual instance of your service, which is created and stored inside this proxy, filled with the resource data.

As a result, you generate a single instance once and use it everywhere for the whole application lifetime. When the source data changes, it reloads the service and just swap to the new instance under the hood.

Project Status & Contributing

Ressor is currently at its early stages, so the feature set can be not complete and some bugs occur.

Feel free to participate in Ressor development in any form via contributions, issues, feature requests, etc.

Quick Example

Let's suppose you have a service which provides book titles by the ISBN:

public class BookRepository {
  private final Map<String, String> data = new HashMap<>();

  public BookRepository(List<Book> node) {
      node.forEach(b -> data.put(b.getIsbn(), b.getTitle()));
  }

  public String getTitle(String isbn) {
    return data.get(isbn);
  }
}

Also, there is a /etc/books.json file with all the data. Now we can simply tell Ressor to create a service instance, based on that file and use JSON format:

var ressor = Ressor.create();
var bookService = ressor.service(BookRepository.class)
        .fileSource("/etc/books.json")
        .translator(jsonList(Book.class))
        .build();

Now we can just use it:

var title = bookService.getTitle("0679760806"); // The Master and Margarita

What will happen if the books.json file will be changed? In case of file on local File System you can just subscribe for the changes:

ressor.listen(bookService);

That's all, you can continue using bookService instance, which will be always up-to-date with the books.json file contents.

Documentation

See our Project Website.

Javadoc is here.

Import

Releases are available via Maven Central.

Java 11+

  implementation 'xyz.ressor:ressor-core:1.3.0'
  implementation 'xyz.ressor:ressor-git-source:1.3.0'
  implementation 'xyz.ressor:ressor-http-source:1.3.0'
  implementation 'xyz.ressor:ressor-s3-source:1.3.0'

Java 8

  implementation 'xyz.ressor:ressor-core-jdk8:1.3.0'
  implementation 'xyz.ressor:ressor-git-source-jdk8:1.3.0'
  implementation 'xyz.ressor:ressor-http-source-jdk8:1.3.0'
  implementation 'xyz.ressor:ressor-s3-source-jdk8:1.3.0'

Versioning

We use SemVer for versioning. For the versions available, see the releases on this repository.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Versions

Version
1.3.0
1.2.2
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.0
1.0.0-beta.5