@FunctionalInterface
public interface ExecuteCallback
Callback function invoked when an asynchronous session ends running.
Session has either SessionState.COMPLETED or SessionState.FAILED state when
the callback is invoked.
If it has SessionState.COMPLETED state, ReturnCode should be checked to
see the execution result.
If getState returns SessionState.FAILED then
getFailStackTrace should be used to get the failure reason.
switch (session.getState()) {
case COMPLETED: {
ReturnCode returnCode = session.getReturnCode();
} break;
case FAILED: {
String failStackTrace = session.getFailStackTrace();
} break;
}
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Session session)
Called when an asynchronous session ends running.
|
void apply(Session session)
Called when an asynchronous session ends running.
session - session