question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RestAction should implement Publisher

See original GitHub issue

Issue

Issue Type

  • Bug Report
  • Feature Request

Description

I have been using Project Reactor for a few months now. Libraries like these make it easy to work with async operations in a functional way. Lately, I figured that JDA’s RestAction can be adapted to fit into this API by implementing Publisher.

A Publisher’s action will only start once it has been subscribed to (similar to rest actions). Multiple subscribers may be added. Subscribers are like event handlers, and handle these 4 events:

  • onSubscribe(Subscription)
  • onNext(T)
  • onError(Throwable)
  • onComplete()

The problem with this is that the flow API was introduced in Java 9. I am not sure if the JVM allows us to implement an interface which is not loaded (say when running JRE 8).

Documentation:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kantenkugelcommented, Jul 16, 2018

As we are building against java8, this will probably not work then.

And we will very likely stay on 8 for a while (compatibility) and then sometime in the future switch to Java 11. At that point we can consider adding the stuff described in the issue, but currently it won’t work i guess.

0reactions
MinnDevelopmentcommented, Jul 17, 2018

The reason we do not want to update is backward compatibility. Considering that we don’t gain a lot of bumping the version while we bring an inconvenience to the userbase is a big influence on the decision that we want to stay java 8 compatible for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mastering own Reactive-Streams implementation. Part 1
Through this topic, I will share basics coding steps, pitfalls, and patterns that will be useful for future implementors. In the first part...
Read more >
Prior Restraint | The First Amendment Encyclopedia
Prior restraint is a form of censorship that allows the government to review the content of printed materials and prevent their publication.
Read more >
Understand the Google Publisher Policies and Google ...
Google Publisher Policy must be fixed. Policy violations are enforced with either "Ad serving disabled" or "Restricted demand". · Google Publisher Restrictions ...
Read more >
Publishing and Linking on the Web - W3C
Many content publishers seek to control the use of their content on the ... You must not use our logo to link to...
Read more >
Managing Intellectual Property in the Book Publishing Industry
National publishers' association should also be a good source of advice. ... enforce this restriction is this: 'The author may not write another...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found