Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try with processor plugin #906

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
58 changes: 58 additions & 0 deletions mule-http-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,64 @@
</dependency>
</dependencies>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<encoding>ISO-8859-1</encoding>
<source>1.8</source>
<target>1.8</target>
<release>8</release>
<proc>none</proc>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.2.4</version>

<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>compile</phase>
<configuration>
<outputDirectory>target/classes/META-INF</outputDirectory>
<processors>
<processor>
org.mule.runtime.ast.extension.api.loader.ASTExtensionResourcesGeneratorAnnotationProcessor
</processor>
</processors>
<options>
<extension.version>${project.version}</extension.version>
</options>
</configuration>

</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-extension-ast-loader</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-module-extensions-spring-support</artifactId>
<version>4.6.0</version>
</dependency>
<dependency>
<groupId>org.mule.runtime</groupId>
<artifactId>mule-module-extensions-soap-support</artifactId>
<version>4.6.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/
package org.mule.extension.http.api;

import static org.mule.runtime.api.util.MultiMap.emptyMultiMap;

import static java.lang.System.lineSeparator;
import static java.util.Collections.emptyMap;

import org.mule.extension.http.api.certificate.CertificateData;
import org.mule.extension.http.internal.certificate.CertificateProvider;
Expand All @@ -16,6 +19,7 @@
import org.mule.runtime.extension.api.annotation.param.Parameter;

import java.security.cert.Certificate;
import java.util.Collections;
import java.util.Map;
import java.util.function.Supplier;

Expand Down Expand Up @@ -147,6 +151,14 @@ public HttpRequestAttributes(MultiMap<String, String> headers, String listenerPa
uriParams, "", remoteAddress, () -> clientCertificate);
}

@Deprecated
public HttpRequestAttributes() {
this(emptyMultiMap(), "/", null, "HTTP/1.1",
"http", "GET", "/", null, "",
emptyMultiMap(), emptyMap(), "/",
null);
}

HttpRequestAttributes(MultiMap<String, String> headers, String listenerPath, String relativePath, String maskedRequestPath,
String version, String scheme, String method, String requestPath, String rawRequestPath,
String requestUri, String rawRequestUri, String queryString, MultiMap<String, String> queryParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import javax.inject.Inject;
import java.net.CookieManager;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -258,4 +259,28 @@ private static HttpAuthentication resolveAuthentication(HttpExtensionClient clie
return null;
}
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (null == o || getClass() != o.getClass())
return false;
HttpConnectivityValidator that = (HttpConnectivityValidator) o;
return followRedirects == that.followRedirects && Objects.equals(requestPath, that.requestPath)
&& Objects.equals(requestMethod, that.requestMethod) && Objects.equals(responseTimeout, that.responseTimeout)
&& responseTimeoutUnit == that.responseTimeoutUnit && Objects.equals(requestBody, that.requestBody)
&& Objects.equals(requestHeaders, that.requestHeaders) && Objects.equals(requestQueryParams, that.requestQueryParams)
&& Objects.equals(requestUriParams, that.requestUriParams) && Objects.equals(responseValidator, that.responseValidator)
&& Objects.equals(expressionManager, that.expressionManager) && Objects.equals(requestBuilder, that.requestBuilder)
&& Objects.equals(defaultStatusCodeValidator, that.defaultStatusCodeValidator)
&& Objects.equals(muleContext, that.muleContext);
}

@Override
public int hashCode() {
return Objects.hash(requestPath, requestMethod, followRedirects, responseTimeout, responseTimeoutUnit, requestBody,
requestHeaders, requestQueryParams, requestUriParams, responseValidator, expressionManager,
requestBuilder, defaultStatusCodeValidator, muleContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
*/
public class HttpRequestResponseProfilingDataProducerAdaptor {

ProfilingDataProducer<ExtensionProfilingEventContext> profilingDataProducer;
ProfilingDataProducer profilingDataProducer;

public HttpRequestResponseProfilingDataProducerAdaptor(ProfilingDataProducer<ExtensionProfilingEventContext> profilingDataProducer) {
public HttpRequestResponseProfilingDataProducerAdaptor(ProfilingDataProducer profilingDataProducer) {
this.profilingDataProducer = profilingDataProducer;
}

Expand Down