Repository: incubator-nifi Updated Branches: refs/heads/develop 6a706458d -> 9a3b6bed6
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html index ad98221..740abec 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/main/resources/docs/org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer/additionalDetails.html @@ -1,36 +1,36 @@ <!DOCTYPE html> <html lang="en"> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. ---> -<head> -<meta charset="utf-8" /> -<title>Distributed Map Cache Client Service</title> -<link rel="stylesheet" href="../../css/component-usage.css" type="text/css" /> -</head> + <!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + <head> + <meta charset="utf-8" /> + <title>Distributed Map Cache Client Service</title> + <link rel="stylesheet" href="../../css/component-usage.css" type="text/css" /> + </head> -<body> - <p> - Below is an example of how to create a distributed map cache server for clients to connect to. - Note that the identifier in this example is <code>cache-server</code>. If you are using this template - to create your own DistributedMapCache server, replace the values in this template with values that are - suitable for your system. Possible options for <code>Port</code>, <code>Maximum Cache Entries</code>, - <code>Eviction Strategy</code>, <span style="font-style: italic;">SSL Context Service</span>, and - <span style="font-style: italic;">Persistence Directory</span> - </p> + <body> + <p> + Below is an example of how to create a distributed map cache server for clients to connect to. + Note that the identifier in this example is <code>cache-server</code>. If you are using this template + to create your own DistributedMapCache server, replace the values in this template with values that are + suitable for your system. Possible options for <code>Port</code>, <code>Maximum Cache Entries</code>, + <code>Eviction Strategy</code>, <span style="font-style: italic;">SSL Context Service</span>, and + <span style="font-style: italic;">Persistence Directory</span> + </p> - <pre> + <pre> <?xml version="1.0" encoding="UTF-8" ?> <services> <service> @@ -41,6 +41,6 @@ <property name="Eviction Strategy">Least Recently Used</property> </service> </services> - </pre> -</body> + </pre> + </body> </html> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java index dfad5a2..42698b8 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-distributed-cache-services-bundle/nifi-distributed-cache-server/src/test/java/org/apache/nifi/distributed/cache/server/TestServerAndClient.java @@ -152,7 +152,7 @@ public class TestServerAndClient { newServer.shutdownServer(); } - @Ignore("Test fails when in a maven parallel build due to address/port already taken - need to vary these so tests can run in parallel") + @Ignore("Test fails when in a maven parallel build due to address/port already taken - need to vary these so tests can run in parallel") @Test public void testPersistentSetServerAndClientWithLFUEvictions() throws InitializationException, IOException { LOGGER.info("Testing " + Thread.currentThread().getStackTrace()[1].getMethodName()); @@ -215,7 +215,7 @@ public class TestServerAndClient { newServer.shutdownServer(); } - @Ignore("Test fails when in a maven parallel build due to address/port already taken - need to vary these so tests can run in parallel") + @Ignore("Test fails when in a maven parallel build due to address/port already taken - need to vary these so tests can run in parallel") @Test public void testPersistentSetServerAndClientWithFIFOEvictions() throws InitializationException, IOException { LOGGER.info("Testing " + Thread.currentThread().getStackTrace()[1].getMethodName()); @@ -374,8 +374,7 @@ public class TestServerAndClient { public void testClientTermination() throws InitializationException, IOException, InterruptedException { /** - * This bypasses the test for build environments in OS X running Java 1.8 due to a JVM bug - * See: https://issues.apache.org/jira/browse/NIFI-437 + * This bypasses the test for build environments in OS X running Java 1.8 due to a JVM bug See: https://issues.apache.org/jira/browse/NIFI-437 */ Assume.assumeFalse("testClientTermination is skipped due to build environment being OS X with JDK 1.8. See https://issues.apache.org/jira/browse/NIFI-437", SystemUtils.IS_OS_MAC && SystemUtils.IS_JAVA_1_8); @@ -509,6 +508,7 @@ public class TestServerAndClient { } private static class StringSerializer implements Serializer<String> { + @Override public void serialize(final String value, final OutputStream output) throws SerializationException, IOException { output.write(value.getBytes(StandardCharsets.UTF_8)); @@ -516,6 +516,7 @@ public class TestServerAndClient { } private static class StringDeserializer implements Deserializer<String> { + @Override public String deserialize(final byte[] input) throws DeserializationException, IOException { return (input.length == 0) ? null : new String(input, StandardCharsets.UTF_8); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/pom.xml b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/pom.xml index bb3f366..2f87d46 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/pom.xml @@ -14,24 +14,24 @@ limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-standard-services</artifactId> - <version>0.1.0-incubating-SNAPSHOT</version> - </parent> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-standard-services</artifactId> + <version>0.1.0-incubating-SNAPSHOT</version> + </parent> - <artifactId>nifi-http-context-map-api</artifactId> + <artifactId>nifi-http-context-map-api</artifactId> - <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-api</artifactId> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-api</artifactId> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/src/main/java/org/apache/nifi/http/HttpContextMap.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/src/main/java/org/apache/nifi/http/HttpContextMap.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/src/main/java/org/apache/nifi/http/HttpContextMap.java index 04ff6ce..0dcff03 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/src/main/java/org/apache/nifi/http/HttpContextMap.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-api/src/main/java/org/apache/nifi/http/HttpContextMap.java @@ -22,51 +22,48 @@ import javax.servlet.http.HttpServletResponse; import org.apache.nifi.controller.ControllerService; - /** * <p> - * An interface that provides the capability of receiving an HTTP servlet request in one component - * and responding to that request in another component. + * An interface that provides the capability of receiving an HTTP servlet request in one component and responding to that request in another component. * </p> - * + * * <p> - * The intended flow is for the component receiving the HTTP request to register the request, response, - * and AsyncContext with a particular identifier via the - * {@link #register(String, HttpServletRequest, HttpServletResponse, AsyncContext)} - * method. Another component is then able to obtain the response - * by providing that identifier to the {@link #getResponse(String)} method. After writing to the - * HttpServletResponse, the transaction is to then be completed via the {@link #complete(String)} method. + * The intended flow is for the component receiving the HTTP request to register the request, response, and AsyncContext with a particular identifier via the + * {@link #register(String, HttpServletRequest, HttpServletResponse, AsyncContext)} method. Another component is then able to obtain the response by providing that identifier to the + * {@link #getResponse(String)} method. After writing to the HttpServletResponse, the transaction is to then be completed via the {@link #complete(String)} method. * </p> */ public interface HttpContextMap extends ControllerService { /** * Registers an HttpServletRequest, HttpServletResponse, and the AsyncContext for a given identifier - * - * @param identifier - * @param request - * @param response - * @param context - * - * @return true if register is successful, false if the context map is too full because too many requests have already been received and not processed - * + * + * @param identifier identifier + * @param request request + * @param response response + * @param context context + * + * @return true if register is successful, false if the context map is too full because too many requests have already been received and not processed + * * @throws IllegalStateException if the identifier is already registered */ boolean register(String identifier, HttpServletRequest request, HttpServletResponse response, AsyncContext context); - + /** * Retrieves the HttpServletResponse for the given identifier, if it exists - * @param identifier + * + * @param identifier identifier * @return the HttpServletResponse for the given identifier, or {@code null} if it does not exist */ HttpServletResponse getResponse(String identifier); - + /** * Marks the HTTP request/response for the given identifier as complete - * @param identifier - * + * + * @param identifier identifier + * * @throws IllegalStateException if the identifier is not registered to a valid AsyncContext */ void complete(String identifier); - + } http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/pom.xml b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/pom.xml index cf4b3cb..eb2abdd 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/pom.xml +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/pom.xml @@ -24,21 +24,21 @@ <packaging>jar</packaging> <dependencies> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.nifi</groupId> - <artifactId>nifi-processor-utils</artifactId> - </dependency> + <dependency> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.nifi</groupId> + <artifactId>nifi-processor-utils</artifactId> + </dependency> <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-http-context-map-api</artifactId> </dependency> <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/java/org/apache/nifi/http/StandardHttpContextMap.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/java/org/apache/nifi/http/StandardHttpContextMap.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/java/org/apache/nifi/http/StandardHttpContextMap.java index 5e31270..bd3e866 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/java/org/apache/nifi/http/StandardHttpContextMap.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/java/org/apache/nifi/http/StandardHttpContextMap.java @@ -42,34 +42,35 @@ import org.apache.nifi.controller.ConfigurationContext; import org.apache.nifi.processor.util.StandardValidators; @Tags({"http", "request", "response"}) -@SeeAlso(classNames={ - "org.apache.nifi.processors.standard.HandleHttpRequest", - "org.apache.nifi.processors.standard.HandleHttpResponse"}) +@SeeAlso(classNames = { + "org.apache.nifi.processors.standard.HandleHttpRequest", + "org.apache.nifi.processors.standard.HandleHttpResponse"}) @CapabilityDescription("Provides the ability to store and retrieve HTTP requests and responses external to a Processor, so that " + "multiple Processors can interact with the same HTTP request.") public class StandardHttpContextMap extends AbstractControllerService implements HttpContextMap { + public static final PropertyDescriptor MAX_OUTSTANDING_REQUESTS = new PropertyDescriptor.Builder() - .name("Maximum Outstanding Requests") - .description("The maximum number of HTTP requests that can be outstanding at any one time. Any attempt to register an additional HTTP Request will cause an error") - .required(true) - .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) - .defaultValue("5000") - .build(); + .name("Maximum Outstanding Requests") + .description("The maximum number of HTTP requests that can be outstanding at any one time. Any attempt to register an additional HTTP Request will cause an error") + .required(true) + .addValidator(StandardValidators.POSITIVE_INTEGER_VALIDATOR) + .defaultValue("5000") + .build(); public static final PropertyDescriptor REQUEST_EXPIRATION = new PropertyDescriptor.Builder() - .name("Request Expiration") - .description("Specifies how long an HTTP Request should be left unanswered before being evicted from the cache and being responded to with a Service Unavailable status code") - .required(true) - .expressionLanguageSupported(false) - .defaultValue("1 min") - .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) - .build(); - + .name("Request Expiration") + .description("Specifies how long an HTTP Request should be left unanswered before being evicted from the cache and being responded to with a Service Unavailable status code") + .required(true) + .expressionLanguageSupported(false) + .defaultValue("1 min") + .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR) + .build(); + private final ConcurrentMap<String, Wrapper> wrapperMap = new ConcurrentHashMap<>(); - + private volatile int maxSize = 5000; private volatile long maxRequestNanos; private volatile ScheduledExecutorService executor; - + @Override protected List<PropertyDescriptor> getSupportedPropertyDescriptors() { final List<PropertyDescriptor> properties = new ArrayList<>(2); @@ -77,67 +78,68 @@ public class StandardHttpContextMap extends AbstractControllerService implements properties.add(REQUEST_EXPIRATION); return properties; } - + @OnEnabled public void onConfigured(final ConfigurationContext context) { maxSize = context.getProperty(MAX_OUTSTANDING_REQUESTS).asInteger(); executor = Executors.newSingleThreadScheduledExecutor(); - + maxRequestNanos = context.getProperty(REQUEST_EXPIRATION).asTimePeriod(TimeUnit.NANOSECONDS); final long scheduleNanos = maxRequestNanos / 2; executor.scheduleWithFixedDelay(new CleanupExpiredRequests(), scheduleNanos, scheduleNanos, TimeUnit.NANOSECONDS); } - + @OnDisabled public void cleanup() { - if ( executor != null ) { + if (executor != null) { executor.shutdown(); } } - + @Override public boolean register(final String identifier, final HttpServletRequest request, final HttpServletResponse response, final AsyncContext context) { // fail if there are too many already. Maybe add a configuration property for how many // outstanding, with a default of say 5000 - if ( wrapperMap.size() >= maxSize ) { - return false; + if (wrapperMap.size() >= maxSize) { + return false; } final Wrapper wrapper = new Wrapper(request, response, context); final Wrapper existing = wrapperMap.putIfAbsent(identifier, wrapper); - if ( existing != null ) { + if (existing != null) { throw new IllegalStateException("HTTP Request already registered with identifier " + identifier); } - - return true; + + return true; } @Override public HttpServletResponse getResponse(final String identifier) { final Wrapper wrapper = wrapperMap.get(identifier); - if ( wrapper == null ) { + if (wrapper == null) { return null; } - + return wrapper.getResponse(); } @Override public void complete(final String identifier) { final Wrapper wrapper = wrapperMap.remove(identifier); - if ( wrapper == null ) { + if (wrapper == null) { throw new IllegalStateException("No HTTP Request registered with identifier " + identifier); } - + wrapper.getAsync().complete(); } private static class Wrapper { + @SuppressWarnings("unused") private final HttpServletRequest request; private final HttpServletResponse response; private final AsyncContext async; private final long nanoTimeAdded = System.nanoTime(); - + public Wrapper(final HttpServletRequest request, final HttpServletResponse response, final AsyncContext async) { this.request = request; this.response = response; @@ -151,24 +153,25 @@ public class StandardHttpContextMap extends AbstractControllerService implements public AsyncContext getAsync() { return async; } - + public long getNanoTimeAdded() { return nanoTimeAdded; } } - + private class CleanupExpiredRequests implements Runnable { + @Override public void run() { final long now = System.nanoTime(); final long threshold = now - maxRequestNanos; - + final Iterator<Map.Entry<String, Wrapper>> itr = wrapperMap.entrySet().iterator(); - while ( itr.hasNext() ) { + while (itr.hasNext()) { final Map.Entry<String, Wrapper> entry = itr.next(); - if ( entry.getValue().getNanoTimeAdded() < threshold ) { + if (entry.getValue().getNanoTimeAdded() < threshold) { itr.remove(); - + // send SERVICE_UNAVAILABLE try { final AsyncContext async = entry.getValue().getAsync(); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html index 5c8b83a..774c3d9 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-http-context-map-bundle/nifi-http-context-map/src/main/resources/docs/org.apache.nifi.http.StandardHttpContextMap/index.html @@ -22,15 +22,15 @@ </head> <body> - <h2>Description:</h2> - <p> - This is the standard implementation of the SSL Context Map. This service is used to provide - coordination between - <a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a> - and - <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a> - Processors. - </p> + <h2>Description:</h2> + <p> + This is the standard implementation of the SSL Context Map. This service is used to provide + coordination between + <a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a> + and + <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a> + Processors. + </p> <!-- Service Documentation ================================================== --> <h2>Configuring the HTTP Context Map:</h2> @@ -40,9 +40,9 @@ </p> <p> - This controller service exposes a single property named <code>Maximum Outstanding Requests</code>. - This property determines the maximum number of HTTP requests that can be outstanding at any one time. - Any attempt to register an additional HTTP Request will cause an error. The default value is 5000. + This controller service exposes a single property named <code>Maximum Outstanding Requests</code>. + This property determines the maximum number of HTTP requests that can be outstanding at any one time. + Any attempt to register an additional HTTP Request will cause an error. The default value is 5000. Below is an example of the template for a StandardHttpContextMap controller service. </p> @@ -56,12 +56,12 @@ </service> </services> </pre> - + <p> - <strong>See Also:</strong><br /> - <a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a><br /> - <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a><br /> - </p> - + <strong>See Also:</strong><br /> + <a href="../org.apache.nifi.processors.standard.HandleHttpRequest/index.html">HandleHttpRequest</a><br /> + <a href="../org.apache.nifi.processors.standard.HandleHttpResponse/index.html">HandleHttpResponse</a><br /> + </p> + </body> </html> http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java index 34f1844..cde71da 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/main/java/org/apache/nifi/ssl/StandardSSLContextService.java @@ -205,7 +205,7 @@ public class StandardSSLContextService extends AbstractControllerService impleme } return results; } - + private void verifySslConfig(final ValidationContext validationContext) throws ProcessException { try { final String keystoreFile = validationContext.getProperty(KEYSTORE).getValue(); @@ -237,7 +237,6 @@ public class StandardSSLContextService extends AbstractControllerService impleme throw new ProcessException(e); } } - @Override public SSLContext createSSLContext(final ClientAuth clientAuth) throws ProcessException { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/9a3b6bed/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java index 7d191fb..1e22dee 100644 --- a/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java +++ b/nifi/nifi-nar-bundles/nifi-standard-services/nifi-ssl-context-bundle/nifi-ssl-context-service/src/test/java/org/apache/nifi/ssl/SSLContextServiceTest.java @@ -73,7 +73,7 @@ public class SSLContextServiceTest { properties.put(StandardSSLContextService.TRUSTSTORE_PASSWORD.getName(), "wrongpassword"); properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); runner.addControllerService("test-bad4", service, properties); - + runner.assertNotValid(service); } @@ -126,7 +126,7 @@ public class SSLContextServiceTest { properties.put(StandardSSLContextService.TRUSTSTORE_TYPE.getName(), "JKS"); runner.addControllerService("test-good2", service, properties); runner.enableControllerService(service); - + runner.setProperty("SSL Context Svc ID", "test-good2"); runner.assertValid(); Assert.assertNotNull(service);