Interface MessageSessionCallback<F,​T>

Type Parameters:
F - the target protocol file type.
T - the expected execution result.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

public interface MessageSessionCallback<F,​T>
Callback invoked by RemoteFileOperations.executeForMessage() - allows multiple operations on a session.
Artem Bilan
  • Method Summary

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

    • doInSession

      T doInSession​(Session<F> session, Message<?> requestMessage) throws IOException
      Called within the context of a session and requestMessage. Perform some operation(s) on the session. The caller will take care of closing the session after this method exits.
      session - The session.
      requestMessage - The message to take in account with session operation(s).
      The result of type T.
      IOException - Any IOException.