@ -72,6 +101,16 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -72,6 +101,16 @@ final class DefaultRSocketRequester implements RSocketRequester {
returnthis.rsocket;
}
@Override
publicMimeTypedataMimeType(){
returnthis.dataMimeType;
}
@Override
publicMimeTypemetadataMimeType(){
returnthis.metadataMimeType;
}
@Override
publicRequestSpecroute(Stringroute){
returnnewDefaultRequestSpec(route);
@ -82,13 +121,28 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -82,13 +121,28 @@ final class DefaultRSocketRequester implements RSocketRequester {
"Additional metadata entries supported only with composite metadata");
this.metadata.put(metadata,mimeType);
returnthis;
}
@Override
@ -122,7 +176,7 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -122,7 +176,7 @@ final class DefaultRSocketRequester implements RSocketRequester {
@ -139,14 +193,14 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -139,14 +193,14 @@ final class DefaultRSocketRequester implements RSocketRequester {
if(adapter!=null&&!adapter.isMultiValue()){
Mono<Payload>payloadMono=Mono.from(publisher)
.map(value->encodeValue(value,dataType,encoder))
.map(value->encodeData(value,dataType,encoder))
.map(this::firstPayload)
.switchIfEmpty(emptyPayload());
returnnewDefaultResponseSpec(payloadMono);
}
Flux<Payload>payloadFlux=Flux.from(publisher)
.map(value->encodeValue(value,dataType,encoder))
.map(value->encodeData(value,dataType,encoder))
.switchOnFirst((signal,inner)->{
DataBufferdata=signal.get();
if(data!=null){
@ -163,16 +217,28 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -163,16 +217,28 @@ final class DefaultRSocketRequester implements RSocketRequester {
@ -180,7 +246,51 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -180,7 +246,51 @@ final class DefaultRSocketRequester implements RSocketRequester {
@ -259,7 +369,7 @@ final class DefaultRSocketRequester implements RSocketRequester {
@@ -259,7 +369,7 @@ final class DefaultRSocketRequester implements RSocketRequester {
@ -44,6 +44,8 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@@ -44,6 +44,8 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@ -53,11 +55,18 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@@ -53,11 +55,18 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@ -100,10 +109,13 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@@ -100,10 +109,13 @@ final class DefaultRSocketRequesterBuilder implements RSocketRequester.Builder {
@ -47,16 +47,28 @@ public final class MessageHandlerAcceptor extends RSocketMessageHandler
@@ -47,16 +47,28 @@ public final class MessageHandlerAcceptor extends RSocketMessageHandler
Assert.notNull(mimeType,"'metadataMimeType' is required");
this.defaultMetadataMimeType=mimeType;
}
@ -76,12 +88,24 @@ public final class MessageHandlerAcceptor extends RSocketMessageHandler
@@ -76,12 +88,24 @@ public final class MessageHandlerAcceptor extends RSocketMessageHandler