Comments (2)
Armeria is designed to be completely compatible with the official Apache Thrift library, including the generated code for services, so that you can drop it in as-is to an existing thrift server / stubs artifact. We agree, though, that the thrift generated code is not really ideal in many aspects, and would like to at some point tweak the thrift compiler to generate more modern Java code. But as you can imagine, this is not a trivial task.
In the meantime, it's usually not so difficult converting between futures, other futures, and even callbacks and hopefully doesn't cause too much stress. Perhaps we could consider adding an adapter between CompletableFuture and AsyncMethodCallback at least though since it's in the JDK.
class FutureUtils {
public static void setFutureResult(CompletableFuture<T> future, AsyncMethodCallback handler) {
future.whenComplete((result, throwable) -> {
if (throwable != null) {
handler.onError(throwable instanceof Exception ? (Exception) throwable : new ExecutionException(throwable);
} else {
handler.onComplete(result);
}
}
}
Though I'm not sure if it's all that useful.
from armeria.
Filed a new issue: #113
from armeria.
Related Issues (20)
- HttpFile.builder doesn't support spring boot nested jars HOT 3
- Respect `Expect: 100-continue` on the client-side.
- Mark `@Deprecated` annotation in overridden methods HOT 2
- Provide debug hook point to trace original saml callback response
- Test failure: `com.linecorp.armeria.server.logging.ContentPreviewingFailureTest`
- Test failure: `com.linecorp.armeria.xds.XdsClientIntegrationTest.multipleResources()`
- Abort with `RequestCancellationException` when WebSocket client receives an invalid response
- Define ktlint rules
- BlockingTaskExecutor Question
- BlockHound detection on the Kubernetes client module
- Test failure: `com.linecorp.armeria.client.kubernetes.ArmeriaHttpHttpLoggingInterceptorTest.Interceptor doesn't consume response bytes`
- Test failure: `com.linecorp.armeria.xds.AggregatingNodeTest.modifyVirtualHost()`
- Is there any way to provide global ExceptionHandler? HOT 3
- Add documentation for `ManagementService` HOT 3
- Provide an easy way to create an `HttpService` from a Kotlin coroutine
- Inject `ServerErrorHandler` as `@Bean` in Spring integration modules
- Support `RpcService` based `Decorator` and `DecoratorFactoryFunction` HOT 2
- WebClientRequestPreparation.asJson not reusing ObjectMapper when specified HOT 1
- Test failure: `com.linecorp.armeria.spring.web.reactive.ReactiveWebServerLoadBalancerInteropTest`
- Add homePageUrlPath, statusPageUrlPath to EurekaUpdatingListenerBuilder HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from armeria.