org.fcrepo.server.utilities.status
Class ServerStatusFile

java.lang.Object
  extended by org.fcrepo.server.utilities.status.ServerStatusFile

public class ServerStatusFile
extends 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]
 


Field Summary
static String BEGIN_LINE
           
static String END_LINE
           
static String FILENAME
           
 
Constructor Summary
ServerStatusFile(File serverHome)
           
 
Method Summary
 void append(ServerState state, String detail)
           
 void appendError(ServerState state, Throwable detail)
           
 void clear()
           
 boolean exists()
           
 ServerStatusMessage[] getMessages(ServerStatusMessage afterMessage)
          Get all messages in the status file, or only those after the given message if it is non-null.
 String getPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILENAME

public static final String FILENAME
See Also:
Constant Field Values

BEGIN_LINE

public static final String BEGIN_LINE
See Also:
Constant Field Values

END_LINE

public static final String END_LINE
See Also:
Constant Field Values
Constructor Detail

ServerStatusFile

public ServerStatusFile(File serverHome)
                 throws Exception
Throws:
Exception
Method Detail

getPath

public String getPath()

clear

public void clear()
           throws Exception
Throws:
Exception

exists

public boolean exists()

appendError

public void appendError(ServerState state,
                        Throwable detail)
                 throws Exception
Throws:
Exception

append

public void append(ServerState state,
                   String detail)
            throws Exception
Throws:
Exception

getMessages

public ServerStatusMessage[] getMessages(ServerStatusMessage afterMessage)
                                  throws 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:
Exception


Copyright © 2012 DuraSpace. All Rights Reserved.