For bureau log redirection, expose a method to detect if it is still running. Throw in the bureau id accessor too.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5416 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -54,6 +54,23 @@ public class BureauLogRedirector
|
||||
thread.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bureau id this was created with.
|
||||
*/
|
||||
public String getBureauId ()
|
||||
{
|
||||
return _bureauId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the redirector is still active. Normally this indicates that the launched
|
||||
* process is still running.
|
||||
*/
|
||||
public boolean isRunning ()
|
||||
{
|
||||
return _reader != null;
|
||||
}
|
||||
|
||||
protected void copyLoop ()
|
||||
{
|
||||
String line;
|
||||
@@ -66,6 +83,7 @@ public class BureauLogRedirector
|
||||
log.warning("Failed to read bureau output", "bureauId", _bureauId, e);
|
||||
} finally {
|
||||
StreamUtil.close(_reader);
|
||||
_reader = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user