Package org.apache.camel.component.grpc
Class GrpcConfiguration
- java.lang.Object
-
- org.apache.camel.component.grpc.GrpcConfiguration
-
@UriParams public class GrpcConfiguration extends Object
-
-
Constructor Summary
Constructors Constructor Description GrpcConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GrpcAuthTypegetAuthenticationType()Authentication method type in advance to the SSL/TLS negotiationList<io.grpc.ClientInterceptor>getClientInterceptors()GrpcConsumerStrategygetConsumerStrategy()This option specifies the top-level strategy for processing service requests and responses in streaming mode.intgetFlowControlWindow()The HTTP/2 flow control window size (MiB)StringgetHost()The gRPC server host name.JwtAlgorithmgetJwtAlgorithm()JSON Web Token sign algorithmStringgetJwtIssuer()JSON Web Token issuerStringgetJwtSecret()JSON Web Token secretStringgetJwtSubject()JSON Web Token subjectStringgetKeyCertChainResource()StringgetKeyPassword()The PKCS#8 private key file passwordStringgetKeyResource()intgetMaxConcurrentCallsPerConnection()intgetMaxMessageSize()StringgetMethod()gRPC method nameio.grpc.netty.NegotiationTypegetNegotiationType()intgetPort()The gRPC local or remote server portGrpcProducerStrategygetProducerStrategy()StringgetService()Fully qualified service name from the protocol buffer descriptor file (package dot service definition name)StringgetServiceAccountResource()Service Account key file in JSON format resource link supported by the Google Cloud SDKStringgetStreamRepliesTo()StringgetTrustCertCollectionResource()StringgetUserAgent()The user agent header passed to the serverbooleanisAutoDiscoverClientInterceptors()booleanisForwardOnCompleted()booleanisForwardOnError()booleanisRouteControlledStreamObserver()Lets the route to take control over stream observer.booleanisSynchronous()voidparseURI(URI uri)voidsetAuthenticationType(GrpcAuthType authenticationType)voidsetAutoDiscoverClientInterceptors(boolean autoDiscoverClientInterceptors)Setting the autoDiscoverClientInterceptors mechanism, if true, the component will look for a ClientInterceptor instance in the registry automatically otherwise it will skip that checking.voidsetClientInterceptors(List<io.grpc.ClientInterceptor> clientInterceptors)Setting the client interceptors on the netty channel in order to intercept outgoing calls before they are dispatched by the channel.voidsetConsumerStrategy(GrpcConsumerStrategy consumerStrategy)voidsetFlowControlWindow(int flowControlWindow)voidsetForwardOnCompleted(boolean forwardOnCompleted)Determines if onCompleted events should be pushed to the Camel route.voidsetForwardOnError(boolean forwardOnError)Determines if onError events should be pushed to the Camel route.voidsetHost(String host)voidsetJwtAlgorithm(JwtAlgorithm jwtAlgorithm)voidsetJwtIssuer(String jwtIssuer)voidsetJwtSecret(String jwtSecret)voidsetJwtSubject(String jwtSubject)voidsetKeyCertChainResource(String keyCertChainResource)The X.509 certificate chain file resource in PEM format linkvoidsetKeyPassword(String keyPassword)voidsetKeyResource(String keyResource)The PKCS#8 private key file resource in PEM format linkvoidsetMaxConcurrentCallsPerConnection(int maxConcurrentCallsPerConnection)The maximum number of concurrent calls permitted for each incoming server connectionvoidsetMaxMessageSize(int maxMessageSize)The maximum message size allowed to be received/sent (MiB)voidsetMethod(String method)voidsetNegotiationType(io.grpc.netty.NegotiationType negotiationType)Identifies the security negotiation type used for HTTP/2 communicationvoidsetPort(int port)voidsetProducerStrategy(GrpcProducerStrategy producerStrategy)The mode used to communicate with a remote gRPC server.voidsetRouteControlledStreamObserver(boolean routeControlledStreamObserver)voidsetService(String service)voidsetServiceAccountResource(String serviceAccountResource)voidsetStreamRepliesTo(String streamRepliesTo)When using STREAMING client mode, it indicates the endpoint where responses should be forwarded.voidsetSynchronous(boolean synchronous)voidsetTrustCertCollectionResource(String trustCertCollectionResource)The trusted certificates collection file resource in PEM format for verifying the remote endpoint's certificatevoidsetUserAgent(String userAgent)
-
-
-
Method Detail
-
getService
public String getService()
Fully qualified service name from the protocol buffer descriptor file (package dot service definition name)
-
setService
public void setService(String service)
-
getMethod
public String getMethod()
gRPC method name
-
setMethod
public void setMethod(String method)
-
getHost
public String getHost()
The gRPC server host name. This is localhost or 0.0.0.0 when being a consumer or remote server host name when using producer.
-
setHost
public void setHost(String host)
-
getPort
public int getPort()
The gRPC local or remote server port
-
setPort
public void setPort(int port)
-
getNegotiationType
public io.grpc.netty.NegotiationType getNegotiationType()
-
setNegotiationType
public void setNegotiationType(io.grpc.netty.NegotiationType negotiationType)
Identifies the security negotiation type used for HTTP/2 communication
-
getAuthenticationType
public GrpcAuthType getAuthenticationType()
Authentication method type in advance to the SSL/TLS negotiation
-
setAuthenticationType
public void setAuthenticationType(GrpcAuthType authenticationType)
-
getJwtAlgorithm
public JwtAlgorithm getJwtAlgorithm()
JSON Web Token sign algorithm
-
setJwtAlgorithm
public void setJwtAlgorithm(JwtAlgorithm jwtAlgorithm)
-
getJwtSecret
public String getJwtSecret()
JSON Web Token secret
-
setJwtSecret
public void setJwtSecret(String jwtSecret)
-
getJwtIssuer
public String getJwtIssuer()
JSON Web Token issuer
-
setJwtIssuer
public void setJwtIssuer(String jwtIssuer)
-
getJwtSubject
public String getJwtSubject()
JSON Web Token subject
-
setJwtSubject
public void setJwtSubject(String jwtSubject)
-
getServiceAccountResource
public String getServiceAccountResource()
Service Account key file in JSON format resource link supported by the Google Cloud SDK
-
setServiceAccountResource
public void setServiceAccountResource(String serviceAccountResource)
-
getKeyCertChainResource
public String getKeyCertChainResource()
-
setKeyCertChainResource
public void setKeyCertChainResource(String keyCertChainResource)
The X.509 certificate chain file resource in PEM format link
-
getKeyResource
public String getKeyResource()
-
setKeyResource
public void setKeyResource(String keyResource)
The PKCS#8 private key file resource in PEM format link
-
getKeyPassword
public String getKeyPassword()
The PKCS#8 private key file password
-
setKeyPassword
public void setKeyPassword(String keyPassword)
-
getTrustCertCollectionResource
public String getTrustCertCollectionResource()
-
setTrustCertCollectionResource
public void setTrustCertCollectionResource(String trustCertCollectionResource)
The trusted certificates collection file resource in PEM format for verifying the remote endpoint's certificate
-
getConsumerStrategy
public GrpcConsumerStrategy getConsumerStrategy()
This option specifies the top-level strategy for processing service requests and responses in streaming mode. If an aggregation strategy is selected, all requests will be accumulated in the list, then transferred to the flow, and the accumulated responses will be sent to the sender. If a propagation strategy is selected, request is sent to the stream, and the response will be immediately sent back to the sender.
-
setConsumerStrategy
public void setConsumerStrategy(GrpcConsumerStrategy consumerStrategy)
-
isForwardOnCompleted
public boolean isForwardOnCompleted()
-
setForwardOnCompleted
public void setForwardOnCompleted(boolean forwardOnCompleted)
Determines if onCompleted events should be pushed to the Camel route.
-
isForwardOnError
public boolean isForwardOnError()
-
setForwardOnError
public void setForwardOnError(boolean forwardOnError)
Determines if onError events should be pushed to the Camel route. Exceptions will be set as message body.
-
getProducerStrategy
public GrpcProducerStrategy getProducerStrategy()
-
setProducerStrategy
public void setProducerStrategy(GrpcProducerStrategy producerStrategy)
The mode used to communicate with a remote gRPC server. In SIMPLE mode a single exchange is translated into a remote procedure call. In STREAMING mode all exchanges will be sent within the same request (input and output of the recipient gRPC service must be of type 'stream').
-
getStreamRepliesTo
public String getStreamRepliesTo()
-
setStreamRepliesTo
public void setStreamRepliesTo(String streamRepliesTo)
When using STREAMING client mode, it indicates the endpoint where responses should be forwarded.
-
getUserAgent
public String getUserAgent()
The user agent header passed to the server
-
setUserAgent
public void setUserAgent(String userAgent)
-
getFlowControlWindow
public int getFlowControlWindow()
The HTTP/2 flow control window size (MiB)
-
setFlowControlWindow
public void setFlowControlWindow(int flowControlWindow)
-
getMaxMessageSize
public int getMaxMessageSize()
-
setMaxMessageSize
public void setMaxMessageSize(int maxMessageSize)
The maximum message size allowed to be received/sent (MiB)
-
isRouteControlledStreamObserver
public boolean isRouteControlledStreamObserver()
Lets the route to take control over stream observer. If this value is set to true, then the response observer of gRPC call will be set with the nameGrpcConstants.GRPC_RESPONSE_OBSERVERin the Exchange object.Please note that the stream observer's onNext(), onError(), onCompleted() methods should be called in the route.
-
setRouteControlledStreamObserver
public void setRouteControlledStreamObserver(boolean routeControlledStreamObserver)
-
getMaxConcurrentCallsPerConnection
public int getMaxConcurrentCallsPerConnection()
-
setMaxConcurrentCallsPerConnection
public void setMaxConcurrentCallsPerConnection(int maxConcurrentCallsPerConnection)
The maximum number of concurrent calls permitted for each incoming server connection
-
getClientInterceptors
public List<io.grpc.ClientInterceptor> getClientInterceptors()
-
setClientInterceptors
public void setClientInterceptors(List<io.grpc.ClientInterceptor> clientInterceptors)
Setting the client interceptors on the netty channel in order to intercept outgoing calls before they are dispatched by the channel.
-
isAutoDiscoverClientInterceptors
public boolean isAutoDiscoverClientInterceptors()
-
setAutoDiscoverClientInterceptors
public void setAutoDiscoverClientInterceptors(boolean autoDiscoverClientInterceptors)
Setting the autoDiscoverClientInterceptors mechanism, if true, the component will look for a ClientInterceptor instance in the registry automatically otherwise it will skip that checking.
-
isSynchronous
public boolean isSynchronous()
-
setSynchronous
public void setSynchronous(boolean synchronous)
-
parseURI
public void parseURI(URI uri)
-
-