Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "maxretrytimeout":
case "maxRetryTimeout": target.setMaxRetryTimeout(property(camelContext, int.class, value)); return true;
case "opensearchclient":
case "openSearchClient": target.setOpenSearchClient(property(camelContext, org.opensearch.client.opensearch.OpenSearchClient.class, value)); return true;
case "password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
case "sniffafterfailuredelay":
case "sniffAfterFailureDelay": target.setSniffAfterFailureDelay(property(camelContext, int.class, value)); return true;
Expand All @@ -56,7 +58,7 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj

@Override
public String[] getAutowiredNames() {
return new String[]{"client"};
return new String[]{"client", "openSearchClient"};
}

@Override
Expand All @@ -77,6 +79,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "lazyStartProducer": return boolean.class;
case "maxretrytimeout":
case "maxRetryTimeout": return int.class;
case "opensearchclient":
case "openSearchClient": return org.opensearch.client.opensearch.OpenSearchClient.class;
case "password": return java.lang.String.class;
case "sniffafterfailuredelay":
case "sniffAfterFailureDelay": return int.class;
Expand Down Expand Up @@ -112,6 +116,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "lazyStartProducer": return target.isLazyStartProducer();
case "maxretrytimeout":
case "maxRetryTimeout": return target.getMaxRetryTimeout();
case "opensearchclient":
case "openSearchClient": return target.getOpenSearchClient();
case "password": return target.getPassword();
case "sniffafterfailuredelay":
case "sniffAfterFailureDelay": return target.getSniffAfterFailureDelay();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "maxretrytimeout":
case "maxRetryTimeout": target.getConfiguration().setMaxRetryTimeout(property(camelContext, int.class, value)); return true;
case "opensearchclient":
case "openSearchClient": target.setOpenSearchClient(property(camelContext, org.opensearch.client.opensearch.OpenSearchClient.class, value)); return true;
case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.opensearch.OpensearchOperation.class, value)); return true;
case "scrollkeepalivems":
case "scrollKeepAliveMs": target.getConfiguration().setScrollKeepAliveMs(property(camelContext, int.class, value)); return true;
Expand All @@ -65,6 +67,11 @@ public boolean configure(CamelContext camelContext, Object obj, String name, Obj
}
}

@Override
public String[] getAutowiredNames() {
return new String[]{"openSearchClient"};
}

@Override
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
Expand All @@ -90,6 +97,8 @@ public Class<?> getOptionType(String name, boolean ignoreCase) {
case "lazyStartProducer": return boolean.class;
case "maxretrytimeout":
case "maxRetryTimeout": return int.class;
case "opensearchclient":
case "openSearchClient": return org.opensearch.client.opensearch.OpenSearchClient.class;
case "operation": return org.apache.camel.component.opensearch.OpensearchOperation.class;
case "scrollkeepalivems":
case "scrollKeepAliveMs": return int.class;
Expand Down Expand Up @@ -136,6 +145,8 @@ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
case "lazyStartProducer": return target.isLazyStartProducer();
case "maxretrytimeout":
case "maxRetryTimeout": return target.getConfiguration().getMaxRetryTimeout();
case "opensearchclient":
case "openSearchClient": return target.getOpenSearchClient();
case "operation": return target.getConfiguration().getOperation();
case "scrollkeepalivems":
case "scrollKeepAliveMs": return target.getConfiguration().getScrollKeepAliveMs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class OpensearchEndpointUriFactory extends org.apache.camel.support.compo
private static final Set<String> ENDPOINT_IDENTITY_PROPERTY_NAMES;
private static final Map<String, String> MULTI_VALUE_PREFIXES;
static {
Set<String> props = new HashSet<>(22);
Set<String> props = new HashSet<>(23);
props.add("certificatePath");
props.add("clusterName");
props.add("connectionTimeout");
Expand All @@ -38,6 +38,7 @@ public class OpensearchEndpointUriFactory extends org.apache.camel.support.compo
props.add("indexName");
props.add("lazyStartProducer");
props.add("maxRetryTimeout");
props.add("openSearchClient");
props.add("operation");
props.add("scrollKeepAliveMs");
props.add("size");
Expand Down
Loading
Loading