Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes issue #169 #176

Merged
merged 1 commit into from
Jul 4, 2014
Merged

Fixes issue #169 #176

merged 1 commit into from
Jul 4, 2014

Conversation

NiteshKant
Copy link
Member

  • Modified HttpClientRequest to take an Observable for content instead of the earlier ContentSource.
  • Retained the capability to use an Observable<S> where S is not the type of the HttpClientRequest. This mode requires passing a function that converts S to ByteBuf.
  • Removed the RepeatableRequest functionality as it is not required. Re-subscribing to the content observable should replay the source.

- Modified HttpClientRequest to take an Observable for content instead of the earlier ContentSource.
- Retained the capability to use an Observable<S> where S != type of the HttpClientRequest. This mode requires passing a function that converts S to ByteBuf.
- Removed the RepeatableRequest functionality as it is not required. Re-subscribing to the content observable should replay the source.
@cloudbees-pull-request-builder

RxNetty-pull-requests #107 SUCCESS
This pull request looks good

@allenxwang
Copy link

Looks good to me.

The only question I have is whether we can assume re-subscribing the content will replay the source. If the source is a PublishSubject, re-subscribing will only get the elements subsequent to the time of subscription. In that case, we might need to make use of ReplaySubject if we need to repeat the same request.

Of course, for majority of use cases the Observable is created using Observable.just() or from(), where re-subscribing will cause replay. We can also document the API to ask caller to provide the Observable which always replays when subscribing, if the request is deemed as "repeatable" by the caller.

@NiteshKant
Copy link
Member Author

The general contract of Observable is that it will replay the source on every fresh subscription unless it is a "hot observable" which is a live stream of events (eg: mouse events).

I think people using rx would relate to this concept.

NiteshKant added a commit that referenced this pull request Jul 4, 2014
@NiteshKant NiteshKant merged commit 726f901 into ReactiveX:master Jul 4, 2014
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