added async put

This commit is contained in:
Rob Austin
2015-05-19 09:45:48 +01:00
parent 232376d2b7
commit d543ea725a
@@ -31,19 +31,24 @@ public abstract class MapStatelessClient<E extends ParameterizeWireKey> extends
@Nullable
protected <R> R proxyReturnTypedObject(
@NotNull final E eventId,
R usingValue,
@Nullable R usingValue,
@NotNull final Class<R> resultType,
@Nullable Object... args) {
Function<ValueIn, R> consumerIn = resultType == CharSequence.class && usingValue != null
? f -> {
final Function<ValueIn, R> valueInRFunction = f -> {
f.text((StringBuilder) usingValue);
return usingValue;
}
: f -> f.object(resultType);
};
final Function<ValueIn, R> consumerIn =
resultType == CharSequence.class && usingValue != null
? valueInRFunction
: f -> f.object(resultType);
return proxyReturnWireConsumerInOut(eventId,
CoreFields.reply,
toParameters(eventId, args),
consumerIn);
}
}