Added javadoc to indicate that close() should always be called on a Command, before inspecting the result(s) (Fixes #114)

This commit is contained in:
Jeroen van Erp
2016-03-18 13:31:25 +01:00
parent 50403483da
commit a2cccd5cef

View File

@@ -48,18 +48,24 @@ public interface Session
/** /**
* If the command exit violently {@link #getExitSignal() with a signal}, an error message would have been * If the command exit violently {@link #getExitSignal() with a signal}, an error message would have been
* received and can be retrieved via this method. Otherwise, this method will return {@code null}. * received and can be retrieved via this method. Otherwise, this method will return {@code null}.
* <p/>
* <strong>NOTE: </strong> Always call {@link #close()} first before inspecting the exit error message.
*/ */
String getExitErrorMessage(); String getExitErrorMessage();
/** /**
* Returns the {@link Signal signal} if the command exit violently, or {@code null} if this information was not * Returns the {@link Signal signal} if the command exit violently, or {@code null} if this information was not
* received. * received.
* <p/>
* <strong>NOTE: </strong> Always call {@link #close()} first before inspecting the exit signal.
*/ */
Signal getExitSignal(); Signal getExitSignal();
/** /**
* Returns the exit status of the command if it was received, or {@code null} if this information was not * Returns the exit status of the command if it was received, or {@code null} if this information was not
* received. * received.
* <p/>
* <strong>NOTE: </strong> Always call {@link #close()} first before inspecting the exit status.
*/ */
Integer getExitStatus(); Integer getExitStatus();