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.

Support for one-to-one singular communication

See original GitHub issue

I don’t know if this makes sense to you, but it might be useful in some cases (avoids sending events from one to another). I don’t know the best way to run this on scenarios with more than one class listening to SomeEvent.

// ... some class listening to SomeEvent
public int onEvent(SomeEvent event) {
    if (event.message.equals("something")) {
        return 1;
    }

    return 0;
}

// ... some class that triggers a SomeEvent
public void whichValue() {
    EventBus.getDefault()
        .post(new SomeEvent("something"), new OnResult() {
            public void onResult(int result) {
                // do something with result
            }
        });
}

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
greenrobotcommented, Oct 17, 2015

Could be an architecture smell. If 1-to-1, shouldn’t the caller know whom to call?

0reactions
alienwingscommented, Jun 28, 2017

Well, I think if solved 1-1 by 1-m, it may cause siginificantly performance loss, while two many subscribers registered. For example, how about the posted object is a base object like SuccessMessageEvent or ErrorMesssageEvent defined in network framework? Am I right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

One-To-One and Many-to-Many Database Relationships
In this diagram were many one-to-one relationships. ... The key to building a successful ERD and Honeycode system is communication.
Read more >
On the configuration of the singular fibers of jet schemes of ...
For a surface with a rational double point, Mourtada gave a one-to-one correspondence between the irreducible components of the singular ...
Read more >
Augmentative and Alternative Communication - ASHA
AAC uses a variety of techniques and tools to help the individual express thoughts, wants and needs, feelings, and ideas, including the following:...
Read more >
Best 15 Singular Alternatives - 2022 | Software Advice
Find the top Singular alternatives in 2022. ... solution designed to help businesses manage and streamline communication with customers via messaging.
Read more >
Friendemic: Home
... Friendemic is a singular software solution that provides one-to-one and one-to-all communication capabilities for dealerships. We're all-encompassing, ...
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