Interface SessionCallback<F,​T>

Type Parameters:
F - the type the operations accepts.
T - the type the callback returns.
All Known Subinterfaces:
SessionCallbackWithoutResult<F>
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 SessionCallback<F,​T>
Callback invoked by RemoteFileOperations.execute() - allows multiple operations on a session.
Since:
3.0
Author:
Gary Russell
  • Method Summary

    Modifier and Type Method Description
    T doInSession​(Session<F> session)
    Called within the context of a session.
  • Method Details

    • doInSession

      T doInSession​(Session<F> session) throws IOException
      Called within the context of a session. Perform some operation(s) on the session. The caller will take care of closing the session after this method exits.
      Parameters:
      session - The session.
      Returns:
      The result of type T.
      Throws:
      IOException - Any IOException.