Class JsonToGrpcGatewayFilterFactory
java.lang.Object
org.springframework.cloud.gateway.support.AbstractConfigurable<JsonToGrpcGatewayFilterFactory.Config>
org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory<JsonToGrpcGatewayFilterFactory.Config>
org.springframework.cloud.gateway.filter.factory.JsonToGrpcGatewayFilterFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware, GatewayFilterFactory<JsonToGrpcGatewayFilterFactory.Config>, Configurable<JsonToGrpcGatewayFilterFactory.Config>, ShortcutConfigurable, org.springframework.context.ApplicationEventPublisherAware
public class JsonToGrpcGatewayFilterFactory
extends AbstractGatewayFilterFactory<JsonToGrpcGatewayFilterFactory.Config>
This filter takes a JSON payload, transform it into a protobuf object, send it to a
given gRPC channel, and transform the response back to JSON.
Making it transparent for the consumer that the service under the gateway is a gRPC
one.
- Author:
- Alberto C. RĂos
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AbstractGatewayFilterFactory
AbstractGatewayFilterFactory.NameConfigNested classes/interfaces inherited from interface ShortcutConfigurable
ShortcutConfigurable.GatewayBeanFactoryResolver, ShortcutConfigurable.GatewayEvaluationContext, ShortcutConfigurable.RestrictivePropertyAccessor, ShortcutConfigurable.ShortcutType -
Field Summary
Fields inherited from interface GatewayFilterFactory
NAME_KEY, VALUE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionJsonToGrpcGatewayFilterFactory(GrpcSslConfigurer grpcSslConfigurer, org.springframework.core.io.ResourceLoader resourceLoader) -
Method Summary
Modifier and TypeMethodDescriptionReturns hints about the number of args and the order for shortcut parsing.Methods inherited from class AbstractGatewayFilterFactory
enableBodyCaching, getPublisher, setApplicationEventPublisherMethods inherited from class AbstractConfigurable
getConfigClass, newConfig, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface GatewayFilterFactory
apply, apply, apply, getConfigClass, name, newConfigMethods inherited from interface ShortcutConfigurable
shortcutFieldPrefix, shortcutType
-
Constructor Details
-
JsonToGrpcGatewayFilterFactory
public JsonToGrpcGatewayFilterFactory(GrpcSslConfigurer grpcSslConfigurer, org.springframework.core.io.ResourceLoader resourceLoader)
-
-
Method Details
-
shortcutFieldOrder
Description copied from interface:ShortcutConfigurableReturns hints about the number of args and the order for shortcut parsing.- Returns:
- the list of hints
-
apply
-