-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add polish to coroutine support in RESTEasy Reactive
- Loading branch information
Showing
4 changed files
with
12 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...in/org/jboss/resteasy/reactive/server/runtime/kotlin/CoroutineInvocationHandlerFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
package org.jboss.resteasy.reactive.server.runtime.kotlin | ||
|
||
import io.quarkus.arc.Unremovable | ||
import org.jboss.resteasy.reactive.server.spi.EndpointInvoker | ||
import org.jboss.resteasy.reactive.server.spi.ServerRestHandler | ||
import javax.enterprise.context.ApplicationScoped | ||
import javax.inject.Inject | ||
import javax.inject.Singleton | ||
|
||
/** | ||
* Factory for the [CoroutineInvocationHandler] that is already part of the CDI container | ||
*/ | ||
@ApplicationScoped | ||
class CoroutineInvocationHandlerFactory @Inject constructor( | ||
private val applicationCoroutineScope: ApplicationCoroutineScope | ||
) { | ||
@Singleton | ||
@Unremovable | ||
class CoroutineInvocationHandlerFactory(private val applicationCoroutineScope: ApplicationCoroutineScope) { | ||
fun createHandler(invoker: EndpointInvoker): ServerRestHandler { | ||
return CoroutineInvocationHandler(invoker, applicationCoroutineScope) | ||
} | ||
} | ||
} |