This is an automated email from the ASF dual-hosted git repository. bertty pushed a commit to branch debugger in repository https://gitbox.apache.org/repos/asf/incubator-wayang.git
commit 995d6fb0c6823f193f61aa633bb69901cedcdef6 Author: Bertty Contreras-Rojas <[email protected]> AuthorDate: Tue Apr 6 13:25:13 2021 -0400 [WAYANG-28] add empty implementation on Shipper components --- .../sniffer/shipper/receiver/EmptyReceiver.java | 38 ++++++++++++++++++++++ .../core/sniffer/shipper/sender/EmptySender.java | 35 ++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java new file mode 100644 index 0000000..2bd42a7 --- /dev/null +++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/receiver/EmptyReceiver.java @@ -0,0 +1,38 @@ +/* + * 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.wayang.plugin.hackit.core.sniffer.shipper.receiver; + +import java.util.Collections; +import java.util.Iterator; + +public class EmptyReceiver<T> extends Receiver<T> { + + @Override + public void init() {} + + @Override + public Iterator<T> getElements() { + return (Iterator<T>) Collections.emptyIterator(); + } + + @Override + public void close() { + + } +} diff --git a/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java new file mode 100644 index 0000000..6ac0817 --- /dev/null +++ b/wayang-plugins/wayang-hackit/wayang-hackit-core/src/main/java/org/apache/wayang/plugin/hackit/core/sniffer/shipper/sender/EmptySender.java @@ -0,0 +1,35 @@ +/* + * 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.wayang.plugin.hackit.core.sniffer.shipper.sender; + +public class EmptySender<T> implements Sender<T> { + + @Override + public void init() { + + } + + @Override + public void send(T value) {} + + @Override + public void close() { + + } +}
