-
Notifications
You must be signed in to change notification settings - Fork 896
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
Support an alias for a bunch of annotations #1224
Labels
Comments
hyangtack
added a commit
to hyangtack/armeria
that referenced
this issue
Jan 23, 2019
Motivation: Server-sent Events (SSE) is an HTTP standard that allows a web application to handle a unidirectional event stream. So it would be useful if we provide a streaming response converter for the events. Modifications: - Add `MediaType#EVENT_STREAM` for `text/event-stream` and `@ProducesEventStream` as an alias for `@Produces("text/event-stream")`. - Add `ServerSentEvent` interface and its builder `ServerSentEventBuilder` to support emitting events. - Add a response converter for SSE, which supports `Publisher<ServerSentEvent>` and `Stream<ServerSentEvent>`. Result: - SSE streaming support - Closes line#1522 Limitation: - Currently, a user need to specify both `@ProducesEventStream` and `@ResponseConverter(ServerSentEventResponseConverterFunction.class)` to enable this feature. After the issue line#1224 is resolved, it would be simplified.
hyangtack
added a commit
to hyangtack/armeria
that referenced
this issue
Jan 29, 2019
Motivation: Server-sent Events (SSE) is an HTTP standard that allows a web application to handle a unidirectional event stream. So it would be useful if we provide a streaming response converter for the events. Modifications: - Add `MediaType#EVENT_STREAM` for `text/event-stream` and `@ProducesEventStream` as an alias for `@Produces("text/event-stream")`. - Add `ServerSentEvent` interface and its builder `ServerSentEventBuilder` to support emitting events. - Add a response converter for SSE, which supports `Publisher<ServerSentEvent>` and `Stream<ServerSentEvent>`. Result: - SSE streaming support - Closes line#1522 Limitation: - Currently, a user need to specify both `@ProducesEventStream` and `@ResponseConverter(ServerSentEventResponseConverterFunction.class)` to enable this feature. After the issue line#1224 is resolved, it would be simplified.
hyangtack
added a commit
to hyangtack/armeria
that referenced
this issue
Jan 30, 2019
Motivation: Server-sent Events (SSE) is an HTTP standard that allows a web application to handle a unidirectional event stream. So it would be useful if we provide a streaming response converter for the events. Modifications: - Add `MediaType#EVENT_STREAM` for `text/event-stream` and `@ProducesEventStream` as an alias for `@Produces("text/event-stream")`. - Add `ServerSentEvent` interface and its builder `ServerSentEventBuilder` to support emitting events. - Add a response converter for SSE, which supports `Publisher<ServerSentEvent>` and `Stream<ServerSentEvent>`. - Add utility classes named `JsonTextSequences` and `ServerSentEvents` for non-annotated services. Result: - SSE streaming support - Closes line#1522 Limitation: - Currently, a user need to specify both `@ProducesEventStream` and `@ResponseConverter(ServerSentEventResponseConverterFunction.class)` to enable this feature. After the issue line#1224 is resolved, it would be simplified.
hyangtack
added a commit
to hyangtack/armeria
that referenced
this issue
Jan 30, 2019
Motivation: Server-sent Events (SSE) is an HTTP standard that allows a web application to handle a unidirectional event stream. So it would be useful if we provide a streaming response converter for the events. Modifications: - Add `MediaType#EVENT_STREAM` for `text/event-stream` and `@ProducesEventStream` as an alias for `@Produces("text/event-stream")`. - Add `ServerSentEvent` interface and its builder `ServerSentEventBuilder` to support emitting events. - Add a response converter for SSE, which supports `Publisher<ServerSentEvent>` and `Stream<ServerSentEvent>`. - Add utility classes named `JsonTextSequences` and `ServerSentEvents` for non-annotated services. Result: - SSE streaming support - Closes line#1522 Limitation: - Currently, a user need to specify both `@ProducesEventStream` and `@ResponseConverter(ServerSentEventResponseConverterFunction.class)` to enable this feature. After the issue line#1224 is resolved, it would be simplified.
hyangtack
added a commit
to hyangtack/armeria
that referenced
this issue
Jan 31, 2019
Motivation: Server-sent Events (SSE) is an HTTP standard that allows a web application to handle a unidirectional event stream. So it would be useful if we provide a streaming response converter for the events. Modifications: - Add `MediaType#EVENT_STREAM` for `text/event-stream` and `@ProducesEventStream` as an alias for `@Produces("text/event-stream")`. - Add `ServerSentEvent` interface and its builder `ServerSentEventBuilder` to support emitting events. - Add a response converter for SSE, which supports `Publisher<ServerSentEvent>` and `Stream<ServerSentEvent>`. - Add utility classes named `JsonTextSequences` and `ServerSentEvents` for non-annotated services. Result: - SSE streaming support - Closes line#1522 Limitation: - Currently, a user need to specify both `@ProducesEventStream` and `@ResponseConverter(ServerSentEventResponseConverterFunction.class)` to enable this feature. After the issue line#1224 is resolved, it would be simplified.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example
Define an alias annotation like below:
Use the alias like below:
The text was updated successfully, but these errors were encountered: