Terminate this command and return a result code to the remote client. Commands should invoke this at most once. Once invoked, the command may lose access to request based resources as any callbacks previously registered with RequestCleanup will fire. @param rc exit code for the remote c
(int rc)
| 337 | * @param rc exit code for the remote client. |
| 338 | */ |
| 339 | protected void onExit(int rc) { |
| 340 | exit.onExit(rc); |
| 341 | if (cleanup != null) { |
| 342 | cleanup.run(); |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | /** Wrap the supplied output stream in a UTF-8 encoded PrintWriter. */ |
| 347 | protected static PrintWriter toPrintWriter(OutputStream o) { |