Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

adding callback on shutdown#82

Merged
stevegury merged 1 commit intorsocket:masterrsocket/rsocket-java:masterfrom
robertroeser:masterCopy head branch name to clipboard
May 5, 2016
Merged

adding callback on shutdown#82
stevegury merged 1 commit intorsocket:masterrsocket/rsocket-java:masterfrom
robertroeser:masterCopy head branch name to clipboard

Conversation

@robertroeser
Copy link
Member

As a callback that is called when a reactive socket is closed.

* Invoked when ReactiveSocket is closed
*
* @throws IllegalStateException if this method is called more than once per instance
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of returning void, I would return the previous Completable (and allow changing the callback).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, why to ask for a Completable? This is like a close future for the socket, which is a single instance that anyone can subscriber/listen to. So, why not have something like:

Completable shutdownListener();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea.

@robertroeser
Copy link
Member Author

@stevegury @NiteshKant changed it so that it returns a Publisher that is completed when the ReactiveSocket is closed

@NiteshKant
Copy link
Contributor

@robertroeser doesn't it make sense to have a Completable instead of Publisher<Void> as you had before?

@robertroeser
Copy link
Member Author

@NiteshKant ok switched it back to a Completable

@NiteshKant
Copy link
Contributor

ok revelation for me Completable here isn't RxJava Completable 😭

@stevegury stevegury merged commit 05ee843 into rsocket:master May 5, 2016
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.