Package org.apache.camel.component.grpc
Class GrpcConfiguration
java.lang.Object
org.apache.camel.component.grpc.GrpcConfiguration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAuthentication method type in advance to the SSL/TLS negotiationList<io.grpc.ClientInterceptor>
This option specifies the top-level strategy for processing service requests and responses in streaming mode.int
The HTTP/2 flow control window size (MiB)getHost()
The gRPC server host name.JSON Web Token sign algorithmJSON Web Token issuerJSON Web Token secretJSON Web Token subjectThe PKCS#8 private key file passwordint
int
gRPC method nameio.grpc.netty.NegotiationType
int
getPort()
The gRPC local or remote server portList<io.grpc.ServerInterceptor>
Fully qualified service name from the protocol buffer descriptor file (package dot service definition name)Service Account key file in JSON format resource link supported by the Google Cloud SDKThe user agent header passed to the serverboolean
boolean
boolean
boolean
boolean
Lets the route to take control over stream observer.boolean
void
void
setAuthenticationType
(GrpcAuthType authenticationType) 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.void
setAutoDiscoverServerInterceptors
(boolean autoDiscoverServerInterceptors) Setting the autoDiscoverServerInterceptors mechanism, if true, the component will look for a ServerInterceptor instance in the registry automatically otherwise it will skip that checking.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.void
setConsumerStrategy
(GrpcConsumerStrategy consumerStrategy) void
setFlowControlWindow
(int flowControlWindow) void
setForwardOnCompleted
(boolean forwardOnCompleted) Determines if onCompleted events should be pushed to the Camel route.void
setForwardOnError
(boolean forwardOnError) Determines if onError events should be pushed to the Camel route.void
void
setJwtAlgorithm
(JwtAlgorithm jwtAlgorithm) void
setJwtIssuer
(String jwtIssuer) void
setJwtSecret
(String jwtSecret) void
setJwtSubject
(String jwtSubject) void
setKeyCertChainResource
(String keyCertChainResource) The X.509 certificate chain file resource in PEM format linkvoid
setKeyPassword
(String keyPassword) void
setKeyResource
(String keyResource) The PKCS#8 private key file resource in PEM format linkvoid
setMaxConcurrentCallsPerConnection
(int maxConcurrentCallsPerConnection) The maximum number of concurrent calls permitted for each incoming server connectionvoid
setMaxMessageSize
(int maxMessageSize) The maximum message size allowed to be received/sent (MiB)void
void
setNegotiationType
(io.grpc.netty.NegotiationType negotiationType) Identifies the security negotiation type used for HTTP/2 communicationvoid
setPort
(int port) void
setProducerStrategy
(GrpcProducerStrategy producerStrategy) The mode used to communicate with a remote gRPC server.void
setRouteControlledStreamObserver
(boolean routeControlledStreamObserver) void
setServerInterceptors
(List<io.grpc.ServerInterceptor> serverInterceptors) Setting the server interceptors on the netty channel in order to intercept incoming calls before they are received by the server.void
setService
(String service) void
setServiceAccountResource
(String serviceAccountResource) void
setStreamRepliesTo
(String streamRepliesTo) When using STREAMING client mode, it indicates the endpoint where responses should be forwarded.void
setSynchronous
(boolean synchronous) void
setTrustCertCollectionResource
(String trustCertCollectionResource) The trusted certificates collection file resource in PEM format for verifying the remote endpoint's certificatevoid
setUserAgent
(String userAgent)
-
Constructor Details
-
GrpcConfiguration
public GrpcConfiguration()
-
-
Method Details
-
getService
Fully qualified service name from the protocol buffer descriptor file (package dot service definition name) -
setService
-
getMethod
gRPC method name -
setMethod
-
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
-
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
Authentication method type in advance to the SSL/TLS negotiation -
setAuthenticationType
-
getJwtAlgorithm
JSON Web Token sign algorithm -
setJwtAlgorithm
-
getJwtSecret
JSON Web Token secret -
setJwtSecret
-
getJwtIssuer
JSON Web Token issuer -
setJwtIssuer
-
getJwtSubject
JSON Web Token subject -
setJwtSubject
-
getServiceAccountResource
Service Account key file in JSON format resource link supported by the Google Cloud SDK -
setServiceAccountResource
-
getKeyCertChainResource
-
setKeyCertChainResource
The X.509 certificate chain file resource in PEM format link -
getKeyResource
-
setKeyResource
The PKCS#8 private key file resource in PEM format link -
getKeyPassword
The PKCS#8 private key file password -
setKeyPassword
-
getTrustCertCollectionResource
-
setTrustCertCollectionResource
The trusted certificates collection file resource in PEM format for verifying the remote endpoint's certificate -
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
-
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
-
setProducerStrategy
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
-
setStreamRepliesTo
When using STREAMING client mode, it indicates the endpoint where responses should be forwarded. -
getUserAgent
The user agent header passed to the server -
setUserAgent
-
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_OBSERVER
in 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 -
getServerInterceptors
-
setServerInterceptors
Setting the server interceptors on the netty channel in order to intercept incoming calls before they are received by the server. -
isAutoDiscoverServerInterceptors
public boolean isAutoDiscoverServerInterceptors() -
setAutoDiscoverServerInterceptors
public void setAutoDiscoverServerInterceptors(boolean autoDiscoverServerInterceptors) Setting the autoDiscoverServerInterceptors mechanism, if true, the component will look for a ServerInterceptor instance in the registry automatically otherwise it will skip that checking. -
getClientInterceptors
-
setClientInterceptors
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
-