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

Add ContextAwareRunnable, ContextAwareCallable and such #4878

Closed
vkostyukov opened this issue May 17, 2023 · 2 comments · Fixed by #4890
Closed

Add ContextAwareRunnable, ContextAwareCallable and such #4878

vkostyukov opened this issue May 17, 2023 · 2 comments · Fixed by #4890

Comments

@vkostyukov
Copy link
Contributor

More context in Slack: https://line-armeria.slack.com/archives/C1NGPBUH2/p1684259957145409

@vkostyukov
Copy link
Contributor Author

I'm going to give this a try.

@minwoox
Copy link
Contributor

minwoox commented May 17, 2023

Let me paste the message here because it's gone after 90 days. 😢

what do you all think about naming these Runnables, Callables and such so we return ContextAwareRunnable , ConextAwareCallable and so on, just like we do with ContextAwareFuture already. I have a use-case when I need to access runnable.context() for $reasons.

trustin pushed a commit that referenced this issue May 30, 2023
…iFunction (#4890)

Motivation:

Users of Armeria APIs might need to be able to query the underlying
`RequestContext` attached to a given "context-aware" `Runnable` or
`Callable`. Let's name these anonymous classes and give then structure.

Modifications:

- Introduce two new interfaces: `ContextAwareRunnable`,
`ContextAwareCallable`
- Introduce two new implementations: `DefaultContextAwareRunnable`,
`DefaultContextAwareCallable`

Result:

- Closes #4878
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 a pull request may close this issue.

2 participants