fedora.server.utilities.status
Class ServerStatusFile
java.lang.Object
fedora.server.utilities.status.ServerStatusFile
public class ServerStatusFile
- extends java.lang.Object
The file consists of one or more serialized ServerStatusMessages.
The format of the file is simple:
[STATUS]
State
Date
[/STATUS]
[STATUS]
State
Date
DetailLine1
DetailLine2
[/STATUS]
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILENAME
public static final java.lang.String FILENAME
- See Also:
- Constant Field Values
BEGIN_LINE
public static final java.lang.String BEGIN_LINE
- See Also:
- Constant Field Values
END_LINE
public static final java.lang.String END_LINE
- See Also:
- Constant Field Values
ServerStatusFile
public ServerStatusFile(java.io.File serverHome)
throws java.lang.Exception
- Throws:
java.lang.Exception
getPath
public java.lang.String getPath()
clear
public void clear()
throws java.lang.Exception
- Throws:
java.lang.Exception
exists
public boolean exists()
appendError
public void appendError(ServerState state,
java.lang.Throwable detail)
throws java.lang.Exception
- Throws:
java.lang.Exception
append
public void append(ServerState state,
java.lang.String detail)
throws java.lang.Exception
- Throws:
java.lang.Exception
getMessages
public ServerStatusMessage[] getMessages(ServerStatusMessage afterMessage)
throws java.lang.Exception
- Get all messages in the status file, or only those after the given
message if it is non-null.
If the status file doesn't exist or can't be parsed, throw an exception.
- Throws:
java.lang.Exception