You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/02/13 16:02:21 UTC

[httpcomponents-core] 02/03: Added abstract I/O callback

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch immutable-httpentities
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit fb8c67fc0b18bd9d2988a479df721fd689677f65
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Mon Feb 11 15:50:01 2019 +0100

    Added abstract I/O callback
---
 .../org/apache/hc/core5/function/IOCallback.java   | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/function/IOCallback.java b/httpcore5/src/main/java/org/apache/hc/core5/function/IOCallback.java
new file mode 100644
index 0000000..7434642
--- /dev/null
+++ b/httpcore5/src/main/java/org/apache/hc/core5/function/IOCallback.java
@@ -0,0 +1,41 @@
+/*
+ * ====================================================================
+ * 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.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+
+package org.apache.hc.core5.function;
+
+import java.io.IOException;
+
+/**
+ * Abstract input / output callback.
+ *
+ * @since 5.0
+ */
+public interface IOCallback<T> {
+
+    void execute(T object) throws IOException;
+
+}