Skip to content

Conversation

@gflkdns
Copy link

@gflkdns gflkdns commented Apr 28, 2019

Sometimes I just want to send a Bean out to let other members update ui or do other things.
But because of the characteristics of Eventbus, I have to define many types to wrap my data, which is very troublesome.
So I want to be able to set filters to ensure that those methods are not going to arrive.

I added a Filter parameter to the post method:

public interface Filter {
    /**
     * @param subscription
     * @return true is can invoke Subscriber false are not
     */
    public boolean allow(Subscription subscription);
}

This is the test code: EventBusFilterTest.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant