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

Set isBlocking true if the input type uses a handler that blocks. #5

Merged
merged 2 commits into from
Oct 3, 2018

Conversation

SeanMollet
Copy link
Contributor

I'm sure there's a better way to do this, but I'm not sure what it is. I'm building something with Proteus that accepts Posts and returns json. As best I can tell, Proteus determines whether a method is blocking or not based solely on the output type. Since I'm not using one of the output types that is blocking, it assumes my method isn't blocking.

Of course, the input handler for multipart IS blocking, resulting in undertow throwing an exception. I looked for where input handlers are configured during generation, but I couldn't find anything.

So, I resorted to this hack.

Thanks for Proteus, it's exactly what I was looking for!

@SeanMollet
Copy link
Contributor Author

I added another commit that adds an overload for status() on the ServerResponse. Minor thing, but I prefer enums to typing numbers.

@noboomu
Copy link
Owner

noboomu commented Oct 3, 2018

You can use the @Blocking annotation on a controller’s method to force blocking. I need to add that to the docs!

@noboomu noboomu merged commit 7e481ec into noboomu:master Oct 3, 2018
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.

2 participants