use of reactor.util.annotation.NonNull in project java-stellar-anchor-sdk by stellar.
the class CirclePaymentService method getCircleWallet.
/**
* API request that retrieves the circle wallet with the given id.
*
* @param walletId is the existing wallet identifier.
* @return asynchronous stream with the CircleWallet object.
* @throws HttpException If the http response status code is 4xx or 5xx.
*/
@NonNull
private Mono<CircleWallet> getCircleWallet(String walletId) throws HttpException {
return getWebClient(true).get().uri("/v1/wallets/" + walletId).responseSingle(handleResponseSingle()).map(body -> {
Type type = new TypeToken<CircleDetailResponse<CircleWallet>>() {
}.getType();
CircleDetailResponse<CircleWallet> circleWalletResponse = gson.fromJson(body, type);
return circleWalletResponse.getData();
});
}
use of reactor.util.annotation.NonNull in project rsocket-java by rsocket.
the class RequestChannelRequesterFlux method currentContext.
@Override
@NonNull
public Context currentContext() {
long state = this.state;
if (isSubscribedOrTerminated(state)) {
Context cachedContext = this.cachedContext;
if (cachedContext == null) {
cachedContext = this.inboundSubscriber.currentContext().putAll((ContextView) DISCARD_CONTEXT);
this.cachedContext = cachedContext;
}
return cachedContext;
}
return Context.empty();
}
Aggregations