diff --git a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/main/java/org/apache/nifi/processors/gettcp/AbstractSocketHandler.java b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/main/java/org/apache/nifi/processors/gettcp/AbstractSocketHandler.java index f27562938a..5477053d34 100644 --- a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/main/java/org/apache/nifi/processors/gettcp/AbstractSocketHandler.java +++ b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/main/java/org/apache/nifi/processors/gettcp/AbstractSocketHandler.java @@ -28,7 +28,6 @@ import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.atomic.AtomicBoolean; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -58,8 +57,9 @@ abstract class AbstractSocketHandler { /** * - * @param address - * @param server + * @param address the socket address + * @param readingBufferSize the buffer size + * @param endOfMessageByte the byte indicating EOM */ public AbstractSocketHandler(InetSocketAddress address, int readingBufferSize, byte endOfMessageByte) { this.address = address; @@ -71,7 +71,7 @@ abstract class AbstractSocketHandler { /** * - * @return + * */ public void start() { if (this.isRunning.compareAndSet(false, true)) { @@ -97,7 +97,7 @@ abstract class AbstractSocketHandler { /** * - * @param force + * */ public void stop() { if (this.isRunning.compareAndSet(true, false)) { @@ -136,7 +136,7 @@ abstract class AbstractSocketHandler { /** * - * @throws Exception + * @throws Exception if an exception occurs */ abstract InetSocketAddress connect() throws Exception; @@ -144,14 +144,14 @@ abstract class AbstractSocketHandler { * Will process the data received from the channel * @param selectionKey key for the channel the data came from * @param buffer buffer of received data - * @throws IOException + * @throws IOException if there is a problem processing the data */ abstract void processData(SelectionKey selectionKey, ByteBuffer buffer) throws IOException; /** * - * @param selectionKey - * @throws IOException + * @param selectionKey the selection key + * @throws IOException if there is a problem */ void doAccept(SelectionKey selectionKey) throws IOException { // noop diff --git a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/ReceivingClientTest.java b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/ReceivingClientTest.java index 4c25c221ec..8009e638a6 100644 --- a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/ReceivingClientTest.java +++ b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/ReceivingClientTest.java @@ -1,3 +1,19 @@ +/* + * 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. + */ package org.apache.nifi.processors.gettcp; import static org.junit.Assert.assertEquals; @@ -15,7 +31,6 @@ import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; - import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/Server.java b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/Server.java index 6c38ad37e7..e6a4ca08a2 100644 --- a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/Server.java +++ b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/java/org/apache/nifi/processors/gettcp/Server.java @@ -35,9 +35,9 @@ public class Server extends AbstractSocketHandler { } /** - * - * @param address - * @param readingBufferSize + * @param address the socket address + * @param readingBufferSize the buffer size + * @param endOfMessageByte the byte indicating the EOM */ public Server(InetSocketAddress address, int readingBufferSize, byte endOfMessageByte) { super(address, readingBufferSize, endOfMessageByte); diff --git a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/resources/log4j.properties b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/resources/log4j.properties index 19965aba82..5a5aa8e567 100644 --- a/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/resources/log4j.properties +++ b/nifi-nar-bundles/nifi-tcp-bundle/nifi-tcp-processors/src/test/resources/log4j.properties @@ -1,3 +1,20 @@ +# +# 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. +# + log4j.rootCategory=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender