Interface SocketExecutor<T>

Type Parameters:
T - the type of the value returned by this executor.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SocketExecutor<T>
Executes network I/O using a managed socket conection.
  • Method Summary

    Modifier and Type
    Method
    Description
    Executes network I/O using a managed socket conection.
  • Method Details

    • executeSocket

      T executeSocket(Socket socket) throws IOException, Exception
      Executes network I/O using a managed socket conection.
      Parameters:
      socket - a reusable and connected socket.
      Returns:
      the result of the network I/O execution.
      Throws:
      IOException - if an I/O error occurs.
      Exception - if another error occurs.