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

Compose AsyncRequest and AsyncResponse #32

Closed
alalag1 opened this issue Feb 20, 2021 · 0 comments · Fixed by #86
Closed

Compose AsyncRequest and AsyncResponse #32

alalag1 opened this issue Feb 20, 2021 · 0 comments · Fixed by #86
Assignees
Labels
refactor Code change

Comments

@alalag1
Copy link
Member

alalag1 commented Feb 20, 2021

Motivation

We are always using AsyncRequest and AsyncResponse in pairs, but AsyncRequest and AsyncResponse are always separated into two parameters.

Which means

Improvement

Using a composed interface(or class) to present a REQUEST.

public interface RequestContext {
    
    AsyncRequest request();
    
    AsyncResponse response();

    // other functions
}

Advantages

  • The parameters spec would be short
  • It is easy to know that AsyncRequest and AsyncResponse is in the same lifecycle
  • It is easy to add more context for a REQUEST
@alalag1 alalag1 added this to To Do in Full JAX-RS support via automation Feb 20, 2021
@alalag1 alalag1 added the refactor Code change label Feb 20, 2021
@Mkabaka Mkabaka self-assigned this Jan 24, 2022
@Mkabaka Mkabaka linked a pull request Jan 24, 2022 that will close this issue
@Mkabaka Mkabaka closed this as completed Jan 24, 2022
Full JAX-RS support automation moved this from To Do to Done Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code change
Projects
Development

Successfully merging a pull request may close this issue.

2 participants