This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 210a2176f60 Regen
210a2176f60 is described below
commit 210a2176f6081f495ca7b2eafcf07b8aa4220747
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Apr 19 07:07:00 2022 +0200
Regen
---
.../org/apache/camel/catalog/components/grpc.json | 3 +-
.../grpc/GrpcConsumerServerInterceptorTest.java | 24 +--
.../endpoint/dsl/GrpcEndpointBuilderFactory.java | 185 +++++++++------------
3 files changed, 89 insertions(+), 123 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/grpc.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/grpc.json
index 8162da88480..42c4d5ef9d1 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/grpc.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/grpc.json
@@ -35,9 +35,9 @@
"host": { "kind": "path", "displayName": "Host", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "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." },
"port": { "kind": "path", "displayName": "Port", "group": "common",
"label": "", "required": true, "type": "integer", "javaType": "int",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "The gRPC local or remote server port" },
"service": { "kind": "path", "displayName": "Service", "group": "common",
"label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "Fully qualified service name from the protocol
buffer descriptor file (package dot service definition name)" },
- "autoDiscoverClientInterceptors": { "kind": "parameter", "displayName":
"Auto Discover Client Interceptors", "group": "common", "label": "common",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass": "org.apache.camel.component.grpc.GrpcConfiguration",
"configurationField": "configuration", "description": "Setting the
autoDiscoverClientInterceptors mechanism, if true, the com [...]
"flowControlWindow": { "kind": "parameter", "displayName": "Flow Control
Window", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 1048576, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "The HTTP\/2 flow control window size (MiB)" },
"maxMessageSize": { "kind": "parameter", "displayName": "Max Message
Size", "group": "common", "label": "", "required": false, "type": "integer",
"javaType": "int", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": 4194304, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "The maximum message size allowed to be
received\/sent (MiB)" },
+ "autoDiscoverServerInterceptors": { "kind": "parameter", "displayName":
"Auto Discover Server Interceptors", "group": "consumer", "label": "consumer",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass": "org.apache.camel.component.grpc.GrpcConfiguration",
"configurationField": "configuration", "description": "Setting the
autoDiscoverServerInterceptors mechanism, if true, the [...]
"bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error
Handler", "group": "consumer", "label": "consumer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Allows for bridging the
consumer to the Camel routing Error Handler, which mean any exceptions occurred
while the consumer is trying to pickup incoming messages, or the likes, will
now be processed as a m [...]
"consumerStrategy": { "kind": "parameter", "displayName": "Consumer
Strategy", "group": "consumer", "label": "consumer", "required": false, "type":
"object", "javaType": "org.apache.camel.component.grpc.GrpcConsumerStrategy",
"enum": [ "AGGREGATION", "PROPAGATION" ], "deprecated": false, "autowired":
false, "secret": false, "defaultValue": "PROPAGATION", "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "T [...]
"forwardOnCompleted": { "kind": "parameter", "displayName": "Forward On
Completed", "group": "consumer", "label": "consumer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "Determines if onCompleted events should be
pushed to the Camel route." },
@@ -46,6 +46,7 @@
"routeControlledStreamObserver": { "kind": "parameter", "displayName":
"Route Controlled Stream Observer", "group": "consumer", "label": "consumer",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": false,
"configurationClass": "org.apache.camel.component.grpc.GrpcConfiguration",
"configurationField": "configuration", "description": "Lets the route to take
control over stream observer. If this value [...]
"exceptionHandler": { "kind": "parameter", "displayName": "Exception
Handler", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.",
"deprecated": false, "autowired": false, "secret": false, "description": "To
let the consumer use a custom ExceptionHandler. Notice if the option
bridgeErrorHandler is enabled then this option is not in use. By default the
con [...]
"exchangePattern": { "kind": "parameter", "displayName": "Exchange
Pattern", "group": "consumer (advanced)", "label": "consumer,advanced",
"required": false, "type": "object", "javaType":
"org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut",
"InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false,
"description": "Sets the exchange pattern when the consumer creates an
exchange." },
+ "autoDiscoverClientInterceptors": { "kind": "parameter", "displayName":
"Auto Discover Client Interceptors", "group": "producer", "label": "producer",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": false, "secret": false, "defaultValue": true,
"configurationClass": "org.apache.camel.component.grpc.GrpcConfiguration",
"configurationField": "configuration", "description": "Setting the
autoDiscoverClientInterceptors mechanism, if true, the [...]
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start
Producer", "group": "producer", "label": "producer", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "Whether the producer
should be started lazy (on the first message). By starting lazy you can use
this to allow CamelContext and routes to startup in situations where a producer
may otherwise fail during sta [...]
"method": { "kind": "parameter", "displayName": "Method", "group":
"producer", "label": "producer", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "gRPC method name" },
"producerStrategy": { "kind": "parameter", "displayName": "Producer
Strategy", "group": "producer", "label": "producer", "required": false, "type":
"object", "javaType": "org.apache.camel.component.grpc.GrpcProducerStrategy",
"enum": [ "SIMPLE", "STREAMING" ], "deprecated": false, "autowired": false,
"secret": false, "defaultValue": "SIMPLE", "configurationClass":
"org.apache.camel.component.grpc.GrpcConfiguration", "configurationField":
"configuration", "description": "The mode used [...]
diff --git
a/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/GrpcConsumerServerInterceptorTest.java
b/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/GrpcConsumerServerInterceptorTest.java
index e1309e01799..e2b271ee539 100644
---
a/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/GrpcConsumerServerInterceptorTest.java
+++
b/components/camel-grpc/src/test/java/org/apache/camel/component/grpc/GrpcConsumerServerInterceptorTest.java
@@ -61,8 +61,10 @@ public class GrpcConsumerServerInterceptorTest extends
CamelTestSupport {
@BeforeEach
public void startGrpcChannels() {
- interceptRequestChannel =
ManagedChannelBuilder.forAddress("localhost",
GRPC_REQUEST_INTERCEPT_TEST_PORT).usePlaintext().build();
- nointerceptRequestChannel =
ManagedChannelBuilder.forAddress("localhost",
GRPC_REQUEST_NO_INTERCEPT_TEST_PORT).usePlaintext().build();
+ interceptRequestChannel
+ = ManagedChannelBuilder.forAddress("localhost",
GRPC_REQUEST_INTERCEPT_TEST_PORT).usePlaintext().build();
+ nointerceptRequestChannel
+ = ManagedChannelBuilder.forAddress("localhost",
GRPC_REQUEST_NO_INTERCEPT_TEST_PORT).usePlaintext().build();
interceptBlockingStub =
PingPongGrpc.newBlockingStub(interceptRequestChannel);
nointerceptBlockingStub =
PingPongGrpc.newBlockingStub(nointerceptRequestChannel);
}
@@ -79,7 +81,7 @@ public class GrpcConsumerServerInterceptorTest extends
CamelTestSupport {
when(mockServerInterceptor2.interceptCall(any(), any(),
any())).thenCallRealMethod();
LOG.info("gRPC pingSyncSync method blocking test start");
PingRequest pingRequest
- =
PingRequest.newBuilder().setPingName(GRPC_TEST_PING_VALUE).setPingId(GRPC_TEST_PING_ID).build();
+ =
PingRequest.newBuilder().setPingName(GRPC_TEST_PING_VALUE).setPingId(GRPC_TEST_PING_ID).build();
PongResponse pongResponse =
interceptBlockingStub.pingSyncSync(pingRequest);
assertNotNull(pongResponse);
@@ -95,7 +97,7 @@ public class GrpcConsumerServerInterceptorTest extends
CamelTestSupport {
when(mockServerInterceptor2.interceptCall(any(), any(),
any())).thenCallRealMethod();
LOG.info("gRPC pingSyncSync method blocking test start");
PingRequest pingRequest
- =
PingRequest.newBuilder().setPingName(GRPC_TEST_PING_VALUE).setPingId(GRPC_TEST_PING_ID).build();
+ =
PingRequest.newBuilder().setPingName(GRPC_TEST_PING_VALUE).setPingId(GRPC_TEST_PING_ID).build();
PongResponse pongResponse =
nointerceptBlockingStub.pingSyncSync(pingRequest);
assertNotNull(pongResponse);
@@ -113,13 +115,13 @@ public class GrpcConsumerServerInterceptorTest extends
CamelTestSupport {
@Override
public void configure() {
from("grpc://localhost:" + GRPC_REQUEST_INTERCEPT_TEST_PORT
- +
"/org.apache.camel.component.grpc.PingPong?synchronous=true&consumerStrategy=AGGREGATION")
- .bean(new
GrpcConsumerServerInterceptorTest.GrpcMessageBuilder(), "buildPongResponse");
+ +
"/org.apache.camel.component.grpc.PingPong?synchronous=true&consumerStrategy=AGGREGATION")
+ .bean(new
GrpcConsumerServerInterceptorTest.GrpcMessageBuilder(), "buildPongResponse");
from("grpc://localhost:" + GRPC_REQUEST_NO_INTERCEPT_TEST_PORT
- +
"/org.apache.camel.component.grpc.PingPong?synchronous=true&consumerStrategy=AGGREGATION"
- + "&autoDiscoverServerInterceptors=false")
- .bean(new
GrpcConsumerServerInterceptorTest.GrpcMessageBuilder(), "buildPongResponse");
+ +
"/org.apache.camel.component.grpc.PingPong?synchronous=true&consumerStrategy=AGGREGATION"
+ + "&autoDiscoverServerInterceptors=false")
+ .bean(new
GrpcConsumerServerInterceptorTest.GrpcMessageBuilder(), "buildPongResponse");
}
};
}
@@ -156,12 +158,12 @@ public class GrpcConsumerServerInterceptorTest extends
CamelTestSupport {
public class GrpcMessageBuilder {
public PongResponse buildPongResponse(PingRequest pingRequest) {
return
PongResponse.newBuilder().setPongName(pingRequest.getPingName() +
GRPC_TEST_PONG_VALUE)
- .setPongId(pingRequest.getPingId()).build();
+ .setPongId(pingRequest.getPingId()).build();
}
public PongResponse buildAsyncPongResponse(List<PingRequest>
pingRequests) {
return
PongResponse.newBuilder().setPongName(pingRequests.get(0).getPingName() +
GRPC_TEST_PONG_VALUE)
- .setPongId(pingRequests.get(0).getPingId()).build();
+ .setPongId(pingRequests.get(0).getPingId()).build();
}
}
}
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GrpcEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GrpcEndpointBuilderFactory.java
index fde77ce30f4..565cb075d15 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GrpcEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GrpcEndpointBuilderFactory.java
@@ -43,43 +43,6 @@ public interface GrpcEndpointBuilderFactory {
default AdvancedGrpcEndpointConsumerBuilder advanced() {
return (AdvancedGrpcEndpointConsumerBuilder) this;
}
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointConsumerBuilder autoDiscoverClientInterceptors(
- boolean autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointConsumerBuilder autoDiscoverClientInterceptors(
- String autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
/**
* The HTTP/2 flow control window size (MiB).
*
@@ -142,6 +105,43 @@ public interface GrpcEndpointBuilderFactory {
doSetProperty("maxMessageSize", maxMessageSize);
return this;
}
+ /**
+ * Setting the autoDiscoverServerInterceptors mechanism, if true, the
+ * component will look for a ServerInterceptor instance in the registry
+ * automatically otherwise it will skip that checking.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: consumer
+ *
+ * @param autoDiscoverServerInterceptors the value to set
+ * @return the dsl builder
+ */
+ default GrpcEndpointConsumerBuilder autoDiscoverServerInterceptors(
+ boolean autoDiscoverServerInterceptors) {
+ doSetProperty("autoDiscoverServerInterceptors",
autoDiscoverServerInterceptors);
+ return this;
+ }
+ /**
+ * Setting the autoDiscoverServerInterceptors mechanism, if true, the
+ * component will look for a ServerInterceptor instance in the registry
+ * automatically otherwise it will skip that checking.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: true
+ * Group: consumer
+ *
+ * @param autoDiscoverServerInterceptors the value to set
+ * @return the dsl builder
+ */
+ default GrpcEndpointConsumerBuilder autoDiscoverServerInterceptors(
+ String autoDiscoverServerInterceptors) {
+ doSetProperty("autoDiscoverServerInterceptors",
autoDiscoverServerInterceptors);
+ return this;
+ }
/**
* Allows for bridging the consumer to the Camel routing Error Handler,
* which mean any exceptions occurred while the consumer is trying to
@@ -722,43 +722,6 @@ public interface GrpcEndpointBuilderFactory {
default AdvancedGrpcEndpointProducerBuilder advanced() {
return (AdvancedGrpcEndpointProducerBuilder) this;
}
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointProducerBuilder autoDiscoverClientInterceptors(
- boolean autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointProducerBuilder autoDiscoverClientInterceptors(
- String autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
/**
* The HTTP/2 flow control window size (MiB).
*
@@ -821,6 +784,43 @@ public interface GrpcEndpointBuilderFactory {
doSetProperty("maxMessageSize", maxMessageSize);
return this;
}
+ /**
+ * Setting the autoDiscoverClientInterceptors mechanism, if true, the
+ * component will look for a ClientInterceptor instance in the registry
+ * automatically otherwise it will skip that checking.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: producer
+ *
+ * @param autoDiscoverClientInterceptors the value to set
+ * @return the dsl builder
+ */
+ default GrpcEndpointProducerBuilder autoDiscoverClientInterceptors(
+ boolean autoDiscoverClientInterceptors) {
+ doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
+ return this;
+ }
+ /**
+ * Setting the autoDiscoverClientInterceptors mechanism, if true, the
+ * component will look for a ClientInterceptor instance in the registry
+ * automatically otherwise it will skip that checking.
+ *
+ * The option will be converted to a <code>boolean</code>
+ * type.
+ *
+ * Default: true
+ * Group: producer
+ *
+ * @param autoDiscoverClientInterceptors the value to set
+ * @return the dsl builder
+ */
+ default GrpcEndpointProducerBuilder autoDiscoverClientInterceptors(
+ String autoDiscoverClientInterceptors) {
+ doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
+ return this;
+ }
/**
* Whether the producer should be started lazy (on the first message).
* By starting lazy you can use this to allow CamelContext and routes
to
@@ -1234,43 +1234,6 @@ public interface GrpcEndpointBuilderFactory {
default AdvancedGrpcEndpointBuilder advanced() {
return (AdvancedGrpcEndpointBuilder) this;
}
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option is a: <code>boolean</code> type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointBuilder autoDiscoverClientInterceptors(
- boolean autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
- /**
- * Setting the autoDiscoverClientInterceptors mechanism, if true, the
- * component will look for a ClientInterceptor instance in the registry
- * automatically otherwise it will skip that checking.
- *
- * The option will be converted to a <code>boolean</code>
- * type.
- *
- * Default: true
- * Group: common
- *
- * @param autoDiscoverClientInterceptors the value to set
- * @return the dsl builder
- */
- default GrpcEndpointBuilder autoDiscoverClientInterceptors(
- String autoDiscoverClientInterceptors) {
- doSetProperty("autoDiscoverClientInterceptors",
autoDiscoverClientInterceptors);
- return this;
- }
/**
* The HTTP/2 flow control window size (MiB).
*