Class GrpcOutboundGatewaySpec
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<GrpcOutboundGatewaySpec, GrpcOutboundGateway>
org.springframework.integration.dsl.MessageHandlerSpec<GrpcOutboundGatewaySpec, GrpcOutboundGateway>
org.springframework.integration.grpc.dsl.GrpcOutboundGatewaySpec
- All Implemented Interfaces:
DisposableBean,FactoryBean<GrpcOutboundGateway>,InitializingBean,Lifecycle,Phased,SmartLifecycle
public class GrpcOutboundGatewaySpec
extends MessageHandlerSpec<GrpcOutboundGatewaySpec, GrpcOutboundGateway>
A
MessageHandlerSpec for a GrpcOutboundGateway.
This spec provides a fluent API for configuring gRPC outbound gateways in Spring Integration DSL flows.
- Since:
- 7.1
- Author:
- Glenn Renfro
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGrpcOutboundGatewaySpec(io.grpc.Channel channel, Class<?> grpcServiceClass) -
Method Summary
Modifier and TypeMethodDescriptioncallOptions(io.grpc.CallOptions callOptions) Set theCallOptionsfor the gRPC call.methodName(String methodName) Set the name of the gRPC method to call.methodNameExpression(String methodNameSpelExpression) Set the Spel expression for resolving the method name.methodNameExpression(Expression methodNameExpression) Set anExpressionto resolve the gRPC method name at runtime.methodNameFunction(Function<Message<?>, String> methodNameFunction) Set the FunctionExpression for resolving the method name.Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingletonMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable
-
Constructor Details
-
GrpcOutboundGatewaySpec
-
-
Method Details
-
methodName
Set the name of the gRPC method to call. If method name is not provided, the default expression checks theMessageHeadersforGrpcHeaders.SERVICE_METHODor, in case a single service method, the name of that method is used.- Parameters:
methodName- the name of the gRPC method to call- Returns:
- the spec
- See Also:
-
methodNameExpression
Set the Spel expression for resolving the method name.- Parameters:
methodNameSpelExpression- the expression string- Returns:
- the spec
- See Also:
-
methodNameFunction
Set the FunctionExpression for resolving the method name.- Parameters:
methodNameFunction- the function for aFunctionExpression- Returns:
- the spec
- See Also:
-
methodNameExpression
Set anExpressionto resolve the gRPC method name at runtime.The expression is evaluated against the request message.
- Parameters:
methodNameExpression- the expression to resolve the method name- Returns:
- the spec
- See Also:
-
callOptions
Set theCallOptionsfor the gRPC call.This allows configuration of deadlines, credentials, compression, etc. Default is
CallOptions.DEFAULT.- Parameters:
callOptions- the call options for the gateway- Returns:
- the spec
- See Also:
-