Interface ClientCallback<C,​T>

Type Parameters:
C - The type of the underlying client object.
T - The return type of the callback method.
All Known Subinterfaces:
ClientCallbackWithoutResult<C>
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 ClientCallback<C,​T>
RemoteFileTemplate callback with the underlying client instance providing access to lower level methods.
Since:
4.1
Author:
Gary Russell
  • Method Summary

    Modifier and Type Method Description
    T doWithClient​(C client)
    Called within the context of a Session.
  • Method Details

    • doWithClient

      T doWithClient​(C client)
      Called within the context of a Session. Perform some operation(s) on the client instance underlying the session. The caller will take care of closing the session after this method exits. However, the implementation is required to perform any clean up required by the client after performing operations.
      Parameters:
      client - The client instance.
      Returns:
      The return value.