Search in sources :

Example 1 with AllArguments

use of net.bytebuddy.implementation.bind.annotation.AllArguments in project kin-rsocket-broker by huangjianqin.

the class ReactiveGrpcCallInterceptor method intercept.

@SuppressWarnings("unchecked")
@RuntimeType
public Object intercept(@Origin Method method, @AllArguments Object[] params) {
    if (Object.class.equals(method.getDeclaringClass())) {
        // 过滤Object方法
        try {
            return method.invoke(this, params);
        } catch (IllegalAccessException | InvocationTargetException e) {
            ExceptionUtils.throwExt(e);
        }
    }
    if (StringUtils.isBlank(serviceId)) {
        serviceId = ServiceLocator.gsv(group, service, version);
    }
    ReactiveGrpcMethodMetadata methodMetadata;
    if (!methodMetadataMap.containsKey(method)) {
        methodMetadata = new ReactiveGrpcMethodMetadata(method, group, service, version, endpoint, sticky);
        methodMetadataMap.put(method, methodMetadata);
    } else {
        methodMetadata = methodMetadataMap.get(method);
    }
    RSocket requester = selector.select(serviceId);
    if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.UNARY)) {
        // request response
        Mono<GeneratedMessageV3> monoParam = (Mono<GeneratedMessageV3>) params[0];
        return monoParam.map(param -> Unpooled.wrappedBuffer(param.toByteArray())).flatMap(paramBodyBytes -> rsocketRpc(requester, methodMetadata, paramBodyBytes));
    } else if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.SERVER_STREAMING)) {
        // request stream
        Mono<GeneratedMessageV3> monoParam = (Mono<GeneratedMessageV3>) params[0];
        return monoParam.map(param -> Unpooled.wrappedBuffer(param.toByteArray())).flatMapMany(paramBodyBytes -> rsocketStream(requester, methodMetadata, paramBodyBytes));
    } else if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.CLIENT_STREAMING) || methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.BIDIRECTIONAL_STREAMING)) {
        // client streaming or bidirectional streaming, rsocket request channel
        // param flux
        Flux<Payload> paramsPayloadFlux = ((Flux<GeneratedMessageV3>) params[0]).map(param -> ByteBufPayload.create(Unpooled.wrappedBuffer(param.toByteArray()), PayloadUtils.getCompositeMetaDataWithEncoding()));
        Flux<?> responseFlux = rsocketChannel(requester, methodMetadata, paramsPayloadFlux);
        if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.CLIENT_STREAMING)) {
            // return one
            return responseFlux.last();
        } else {
            // return many
            return responseFlux;
        }
    }
    return Mono.error(new ReactiveMethodInvokeException("incorrect rpc type for grpc"));
}
Also used : Origin(net.bytebuddy.implementation.bind.annotation.Origin) LoggerFactory(org.slf4j.LoggerFactory) Span(brave.Span) TimeoutException(java.util.concurrent.TimeoutException) Metrics(io.micrometer.core.instrument.Metrics) Unpooled(io.netty.buffer.Unpooled) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType) ByteBuf(io.netty.buffer.ByteBuf) RSocket(io.rsocket.RSocket) AllArguments(net.bytebuddy.implementation.bind.annotation.AllArguments) Duration(java.time.Duration) Map(java.util.Map) TracingMetadata(org.kin.rsocket.core.metadata.TracingMetadata) Method(java.lang.reflect.Method) ByteBufPayload(io.rsocket.util.ByteBufPayload) Tracing(brave.Tracing) Tracer(brave.Tracer) Logger(org.slf4j.Logger) org.kin.rsocket.core(org.kin.rsocket.core) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Mono(reactor.core.publisher.Mono) PooledByteBufAllocator(io.netty.buffer.PooledByteBufAllocator) ExceptionUtils(org.kin.framework.utils.ExceptionUtils) TraceContext(brave.propagation.TraceContext) InvocationTargetException(java.lang.reflect.InvocationTargetException) Objects(java.util.Objects) CompositeByteBuf(io.netty.buffer.CompositeByteBuf) StringUtils(org.kin.framework.utils.StringUtils) Flux(reactor.core.publisher.Flux) Payload(io.rsocket.Payload) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) Mono(reactor.core.publisher.Mono) Flux(reactor.core.publisher.Flux) RSocket(io.rsocket.RSocket) InvocationTargetException(java.lang.reflect.InvocationTargetException) ByteBufPayload(io.rsocket.util.ByteBufPayload) Payload(io.rsocket.Payload) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType)

Example 2 with AllArguments

use of net.bytebuddy.implementation.bind.annotation.AllArguments in project alibaba-rsocket-broker by alibaba.

the class RSocketRequesterRpcProxy method invoke.

@Override
@RuntimeType
public Object invoke(@This Object proxy, @Origin Method method, @AllArguments Object[] allArguments) throws Throwable {
    // interface default method validation for JDK Proxy only, not necessary for ByteBuddy
    if (jdkProxy && method.isDefault()) {
        return DefaultMethodHandler.getMethodHandle(method, serviceInterface).bindTo(proxy).invokeWithArguments(allArguments);
    } else if (method.getDeclaringClass().equals(Object.class)) {
        // delegate hashCode, equals, or toString methods to this
        return method.invoke(this);
    }
    MutableContext mutableContext = new MutableContext();
    if (!methodMetadataMap.containsKey(method)) {
        methodMetadataMap.put(method, new ReactiveMethodMetadata(group, service, version, method, encodingType, this.acceptEncodingTypes, endpoint, sticky, sourceUri));
    }
    ReactiveMethodMetadata methodMetadata = methodMetadataMap.get(method);
    mutableContext.put(ReactiveMethodMetadata.class, methodMetadata);
    Object[] args = allArguments;
    if (methodMetadata.isKotlinSuspend()) {
        args = Arrays.copyOfRange(args, 0, args.length - 1);
        mutableContext.put(Continuation.class, allArguments[allArguments.length - 1]);
    }
    // ----- return type deal------
    if (methodMetadata.getRsocketFrameType() == FrameType.REQUEST_CHANNEL) {
        metrics(methodMetadata);
        Payload routePayload;
        Flux<Object> source;
        // 1 param or 2 params
        if (args.length == 1) {
            routePayload = ByteBufPayload.create(Unpooled.EMPTY_BUFFER, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate());
            source = methodMetadata.getReactiveAdapter().toFlux(args[0]);
        } else {
            ByteBuf bodyBuffer = encodingFacade.encodingResult(args[0], methodMetadata.getParamEncoding());
            routePayload = ByteBufPayload.create(bodyBuffer, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate());
            source = methodMetadata.getReactiveAdapter().toFlux(args[1]);
        }
        Flux<Payload> payloadFlux = source.startWith(routePayload).map(obj -> {
            if (obj instanceof Payload)
                return (Payload) obj;
            return ByteBufPayload.create(encodingFacade.encodingResult(obj, encodingType), methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate());
        });
        Flux<Payload> payloads = upstreamManager.getRSocket(this.serviceId).requestChannel(payloadFlux);
        Flux<Object> fluxReturn = payloads.concatMap(payload -> {
            try {
                RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.from(payload.metadata());
                return Mono.justOrEmpty(encodingFacade.decodeResult(extractPayloadDataMimeType(compositeMetadata, encodingType), payload.data(), methodMetadata.getInferredClassForReturn()));
            } catch (Exception e) {
                return Flux.error(e);
            }
        }).subscriberContext(mutableContext::putAll);
        if (methodMetadata.isMonoChannel()) {
            return fluxReturn.last();
        } else {
            return methodMetadata.getReactiveAdapter().fromPublisher(fluxReturn, method.getReturnType());
        }
    } else {
        // body content
        ByteBuf bodyBuffer = encodingFacade.encodingParams(args, methodMetadata.getParamEncoding());
        Class<?> returnType = method.getReturnType();
        if (methodMetadata.getRsocketFrameType() == FrameType.REQUEST_RESPONSE) {
            metrics(methodMetadata);
            Mono<Payload> payloadMono = remoteRequestResponse(methodMetadata, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate(), bodyBuffer);
            Mono<Object> result = payloadMono.handle((payload, sink) -> {
                try {
                    RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.from(payload.metadata());
                    Object obj = encodingFacade.decodeResult(extractPayloadDataMimeType(compositeMetadata, encodingType), payload.data(), methodMetadata.getInferredClassForReturn());
                    if (obj != null) {
                        sink.next(obj);
                    }
                    sink.complete();
                } catch (Exception e) {
                    sink.error(e);
                }
            });
            return methodMetadata.getReactiveAdapter().fromPublisher(result, returnType, mutableContext);
        } else if (methodMetadata.getRsocketFrameType() == FrameType.REQUEST_FNF) {
            metrics(methodMetadata);
            return remoteFireAndForget(methodMetadata, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate(), bodyBuffer);
        } else if (methodMetadata.getRsocketFrameType() == FrameType.REQUEST_STREAM) {
            metrics(methodMetadata);
            Flux<Payload> flux = remoteRequestStream(methodMetadata, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate(), bodyBuffer);
            Flux<Object> result = flux.concatMap((payload) -> {
                try {
                    RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.from(payload.metadata());
                    return Mono.justOrEmpty(encodingFacade.decodeResult(extractPayloadDataMimeType(compositeMetadata, encodingType), payload.data(), methodMetadata.getInferredClassForReturn()));
                } catch (Exception e) {
                    return Mono.error(e);
                }
            });
            return methodMetadata.getReactiveAdapter().fromPublisher(result, returnType, mutableContext);
        } else {
            ReferenceCountUtil.safeRelease(bodyBuffer);
            return Mono.error(new Exception(RsocketErrorCode.message("RST-200405", methodMetadata.getRsocketFrameType())));
        }
    }
}
Also used : This(net.bytebuddy.implementation.bind.annotation.This) Continuation(kotlin.coroutines.Continuation) Arrays(java.util.Arrays) Origin(net.bytebuddy.implementation.bind.annotation.Origin) LoggerFactory(org.slf4j.LoggerFactory) TimeoutException(java.util.concurrent.TimeoutException) Metrics(io.micrometer.core.instrument.Metrics) Unpooled(io.netty.buffer.Unpooled) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType) MessageMimeTypeMetadata(com.alibaba.rsocket.metadata.MessageMimeTypeMetadata) ByteBuf(io.netty.buffer.ByteBuf) AllArguments(net.bytebuddy.implementation.bind.annotation.AllArguments) MutableContext(com.alibaba.rsocket.MutableContext) Duration(java.time.Duration) Map(java.util.Map) URI(java.net.URI) Method(java.lang.reflect.Method) RSocketEncodingFacade(com.alibaba.rsocket.encoding.RSocketEncodingFacade) ByteBufPayload(io.rsocket.util.ByteBufPayload) RSocketMimeType(com.alibaba.rsocket.metadata.RSocketMimeType) FrameType(io.rsocket.frame.FrameType) Logger(org.slf4j.Logger) RsocketErrorCode(com.alibaba.rsocket.observability.RsocketErrorCode) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Mono(reactor.core.publisher.Mono) RSocketCompositeMetadata(com.alibaba.rsocket.metadata.RSocketCompositeMetadata) Nullable(org.jetbrains.annotations.Nullable) Flux(reactor.core.publisher.Flux) Payload(io.rsocket.Payload) ReferenceCountUtil(io.netty.util.ReferenceCountUtil) UpstreamManager(com.alibaba.rsocket.upstream.UpstreamManager) InvocationHandler(java.lang.reflect.InvocationHandler) NotNull(org.jetbrains.annotations.NotNull) ServiceLocator(com.alibaba.rsocket.ServiceLocator) RSocketCompositeMetadata(com.alibaba.rsocket.metadata.RSocketCompositeMetadata) MutableContext(com.alibaba.rsocket.MutableContext) ByteBuf(io.netty.buffer.ByteBuf) TimeoutException(java.util.concurrent.TimeoutException) ByteBufPayload(io.rsocket.util.ByteBufPayload) Payload(io.rsocket.Payload) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType)

Example 3 with AllArguments

use of net.bytebuddy.implementation.bind.annotation.AllArguments in project alibaba-rsocket-broker by alibaba.

the class GrpcReactiveCallInterceptor method intercept.

@SuppressWarnings("unchecked")
@RuntimeType
public Object intercept(@Origin Method method, @AllArguments Object[] params) {
    if (!methodMetadataMap.containsKey(method)) {
        methodMetadataMap.put(method, new ReactiveGrpcMethodMetadata(method, group, service, version));
    }
    ReactiveGrpcMethodMetadata methodMetadata = methodMetadataMap.get(method);
    if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.UNARY)) {
        Mono<GeneratedMessageV3> monoParam = (Mono<GeneratedMessageV3>) params[0];
        return monoParam.map(param -> ByteBufPayload.create(Unpooled.wrappedBuffer(param.toByteArray()), methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate())).flatMap(requestPayload -> rsocketRpc(rsocket, requestPayload, methodMetadata.getInferredClassForReturn()).timeout(this.timeout));
    } else if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.SERVER_STREAMING)) {
        Mono<GeneratedMessageV3> monoParam = (Mono<GeneratedMessageV3>) params[0];
        return monoParam.map(param -> ByteBufPayload.create(Unpooled.wrappedBuffer(param.toByteArray()), methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate())).flatMapMany(requestPayload -> rsocketStream(rsocket, requestPayload, methodMetadata.getInferredClassForReturn()));
    } else if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.CLIENT_STREAMING)) {
        Payload routePayload = ByteBufPayload.create(Unpooled.EMPTY_BUFFER, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate());
        Flux<Payload> paramsPayloadFlux = ((Flux<GeneratedMessageV3>) params[0]).map(param -> ByteBufPayload.create(Unpooled.wrappedBuffer(param.toByteArray()), PayloadUtils.getCompositeMetaDataWithEncoding().retainedDuplicate()));
        return rsocketChannel(rsocket, paramsPayloadFlux.startWith(routePayload), methodMetadata.getInferredClassForReturn()).last();
    } else if (methodMetadata.getRpcType().equals(ReactiveGrpcMethodMetadata.BIDIRECTIONAL_STREAMING)) {
        Payload routePayload = ByteBufPayload.create(Unpooled.EMPTY_BUFFER, methodMetadata.getCompositeMetadataByteBuf().retainedDuplicate());
        Flux<Payload> paramsPayloadFlux = ((Flux<GeneratedMessageV3>) params[0]).map(param -> ByteBufPayload.create(Unpooled.wrappedBuffer(param.toByteArray()), PayloadUtils.getCompositeMetaDataWithEncoding().retainedDuplicate()));
        return rsocketChannel(rsocket, paramsPayloadFlux.startWith(routePayload), methodMetadata.getInferredClassForReturn());
    }
    return Mono.error(new Exception(RsocketErrorCode.message("RST-611301")));
}
Also used : Origin(net.bytebuddy.implementation.bind.annotation.Origin) RsocketErrorCode(com.alibaba.rsocket.observability.RsocketErrorCode) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Mono(reactor.core.publisher.Mono) Unpooled(io.netty.buffer.Unpooled) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType) Flux(reactor.core.publisher.Flux) Payload(io.rsocket.Payload) RSocket(io.rsocket.RSocket) AllArguments(net.bytebuddy.implementation.bind.annotation.AllArguments) Duration(java.time.Duration) Map(java.util.Map) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) Method(java.lang.reflect.Method) ByteBufPayload(io.rsocket.util.ByteBufPayload) Mono(reactor.core.publisher.Mono) Flux(reactor.core.publisher.Flux) Payload(io.rsocket.Payload) ByteBufPayload(io.rsocket.util.ByteBufPayload) GeneratedMessageV3(com.google.protobuf.GeneratedMessageV3) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType)

Example 4 with AllArguments

use of net.bytebuddy.implementation.bind.annotation.AllArguments in project kin-rsocket-broker by huangjianqin.

the class RequesterProxy method invoke.

@Override
@RuntimeType
public Object invoke(@This Object proxy, @Origin Method method, @AllArguments Object[] args) {
    if (!RSocketAppContext.ENHANCE && method.isDefault()) {
        // jdk代理下, 如果是调用default方法, 直接使用句柄掉漆
        try {
            return MethodHandleUtils.getInterfaceDefaultMethodHandle(method, serviceInterface).bindTo(proxy).invokeWithArguments(args);
        } catch (Throwable throwable) {
            ExceptionUtils.throwExt(throwable);
        }
    }
    if (method.getDeclaringClass().equals(Object.class)) {
        // 过滤Object方法
        try {
            return method.invoke(this, args);
        } catch (IllegalAccessException | InvocationTargetException e) {
            ExceptionUtils.throwExt(e);
        }
    }
    ReactiveMethodMetadata methodMetadata = methodMetadataMap.get(method);
    if (Objects.isNull(methodMetadata)) {
        // lazy init method metadata
        methodMetadata = new ReactiveMethodMetadata(group, service, version, method, defaultEncodingType, defaultAcceptEncodingTypes, endpoint, sticky, sourceUri);
        methodMetadataMap.put(method, methodMetadata);
    }
    MutableContext mutableContext = new MutableContext();
    mutableContext.put(ReactiveMethodMetadata.class, methodMetadata);
    if (methodMetadata.getFrameType() == FrameType.REQUEST_CHANNEL) {
        // request channel
        metrics(methodMetadata);
        ByteBuf routeBytes;
        Flux<Object> paramBodys;
        if (args.length == 1) {
            // 1 param
            routeBytes = Unpooled.EMPTY_BUFFER;
            paramBodys = ReactiveObjAdapter.INSTANCE.toFlux(args[0]);
        } else {
            // 2 params
            routeBytes = Codecs.INSTANCE.encodeResult(args[0], methodMetadata.getDataEncodingType());
            paramBodys = ReactiveObjAdapter.INSTANCE.toFlux(args[1]);
        }
        // handle return
        ReactiveMethodMetadata finalMethodMetadata1 = methodMetadata;
        Flux<Object> result = requestChannel(methodMetadata, methodMetadata.getCompositeMetadataBytes(), routeBytes, paramBodys).concatMap(payload -> {
            try {
                RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.of(payload.metadata());
                return Mono.justOrEmpty(Codecs.INSTANCE.decodeResult(extractPayloadDataMimeType(compositeMetadata, finalMethodMetadata1.getAcceptEncodingTypes()[0]), payload.data(), finalMethodMetadata1.getInferredClassForReturn()));
            } catch (Exception e) {
                return Flux.error(e);
            }
        }).contextWrite(c -> mutableContext.putAll(c.readOnly()));
        if (methodMetadata.isMonoChannel()) {
            return result.last();
        } else {
            return result;
        }
    } else {
        // body content
        ByteBuf paramBodyBytes = Codecs.INSTANCE.encodeParams(args, methodMetadata.getDataEncodingType());
        if (methodMetadata.getFrameType() == FrameType.REQUEST_RESPONSE) {
            // request response
            metrics(methodMetadata);
            ReactiveMethodMetadata finalMethodMetadata = methodMetadata;
            // handle return
            Mono<Object> result = requestResponse(methodMetadata, methodMetadata.getCompositeMetadataBytes(), paramBodyBytes).handle((payload, sink) -> {
                try {
                    RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.of(payload.metadata());
                    Object obj = Codecs.INSTANCE.decodeResult(extractPayloadDataMimeType(compositeMetadata, finalMethodMetadata.getAcceptEncodingTypes()[0]), payload.data(), finalMethodMetadata.getInferredClassForReturn());
                    if (obj != null) {
                        sink.next(obj);
                    }
                    sink.complete();
                } catch (Exception e) {
                    sink.error(e);
                }
            });
            return ReactiveObjAdapter.INSTANCE.fromPublisher(result, mutableContext);
        } else if (methodMetadata.getFrameType() == FrameType.REQUEST_FNF) {
            // request and forget
            metrics(methodMetadata);
            Mono<Void> result = fireAndForget(methodMetadata, methodMetadata.getCompositeMetadataBytes(), paramBodyBytes);
            if (methodMetadata.isReturnVoid()) {
                // 返回void
                result.subscribe();
                return null;
            } else {
                return result;
            }
        } else if (methodMetadata.getFrameType() == FrameType.REQUEST_STREAM) {
            // request stream
            metrics(methodMetadata);
            ReactiveMethodMetadata finalMethodMetadata = methodMetadata;
            Flux<Object> result = requestStream(methodMetadata, methodMetadata.getCompositeMetadataBytes(), paramBodyBytes).concatMap((payload) -> {
                try {
                    RSocketCompositeMetadata compositeMetadata = RSocketCompositeMetadata.of(payload.metadata());
                    return Mono.justOrEmpty(Codecs.INSTANCE.decodeResult(extractPayloadDataMimeType(compositeMetadata, finalMethodMetadata.getAcceptEncodingTypes()[0]), payload.data(), finalMethodMetadata.getInferredClassForReturn()));
                } catch (Exception e) {
                    return Mono.error(e);
                }
            });
            return ReactiveObjAdapter.INSTANCE.fromPublisher(result, mutableContext);
        } else {
            ReferenceCountUtil.safeRelease(paramBodyBytes);
            return Mono.error(new Exception("unknown RSocket Frame type: " + methodMetadata.getFrameType().name()));
        }
    }
}
Also used : This(net.bytebuddy.implementation.bind.annotation.This) Origin(net.bytebuddy.implementation.bind.annotation.Origin) MessageMimeTypeMetadata(org.kin.rsocket.core.metadata.MessageMimeTypeMetadata) LoggerFactory(org.slf4j.LoggerFactory) TimeoutException(java.util.concurrent.TimeoutException) Metrics(io.micrometer.core.instrument.Metrics) Unpooled(io.netty.buffer.Unpooled) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType) ByteBuf(io.netty.buffer.ByteBuf) AllArguments(net.bytebuddy.implementation.bind.annotation.AllArguments) Duration(java.time.Duration) Map(java.util.Map) URI(java.net.URI) Method(java.lang.reflect.Method) ByteBufPayload(io.rsocket.util.ByteBufPayload) FrameType(io.rsocket.frame.FrameType) RSocketCompositeMetadata(org.kin.rsocket.core.metadata.RSocketCompositeMetadata) Logger(org.slf4j.Logger) org.kin.rsocket.core(org.kin.rsocket.core) MethodHandleUtils(org.kin.framework.utils.MethodHandleUtils) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Mono(reactor.core.publisher.Mono) ExceptionUtils(org.kin.framework.utils.ExceptionUtils) CollectionUtils(org.kin.framework.utils.CollectionUtils) InvocationTargetException(java.lang.reflect.InvocationTargetException) Objects(java.util.Objects) StringUtils(org.kin.framework.utils.StringUtils) Flux(reactor.core.publisher.Flux) Payload(io.rsocket.Payload) ReferenceCountUtil(io.netty.util.ReferenceCountUtil) Codecs(org.kin.rsocket.core.codec.Codecs) InvocationHandler(java.lang.reflect.InvocationHandler) RSocketCompositeMetadata(org.kin.rsocket.core.metadata.RSocketCompositeMetadata) Mono(reactor.core.publisher.Mono) ByteBuf(io.netty.buffer.ByteBuf) InvocationTargetException(java.lang.reflect.InvocationTargetException) TimeoutException(java.util.concurrent.TimeoutException) InvocationTargetException(java.lang.reflect.InvocationTargetException) RuntimeType(net.bytebuddy.implementation.bind.annotation.RuntimeType)

Aggregations

Unpooled (io.netty.buffer.Unpooled)4 Payload (io.rsocket.Payload)4 ByteBufPayload (io.rsocket.util.ByteBufPayload)4 Method (java.lang.reflect.Method)4 Duration (java.time.Duration)4 Map (java.util.Map)4 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)4 AllArguments (net.bytebuddy.implementation.bind.annotation.AllArguments)4 Origin (net.bytebuddy.implementation.bind.annotation.Origin)4 RuntimeType (net.bytebuddy.implementation.bind.annotation.RuntimeType)4 Flux (reactor.core.publisher.Flux)4 Mono (reactor.core.publisher.Mono)4 Metrics (io.micrometer.core.instrument.Metrics)3 ByteBuf (io.netty.buffer.ByteBuf)3 TimeoutException (java.util.concurrent.TimeoutException)3 Logger (org.slf4j.Logger)3 LoggerFactory (org.slf4j.LoggerFactory)3 RsocketErrorCode (com.alibaba.rsocket.observability.RsocketErrorCode)2 GeneratedMessageV3 (com.google.protobuf.GeneratedMessageV3)2 ReferenceCountUtil (io.netty.util.ReferenceCountUtil)2