Package org.apache.tika.server
Class ServerStatus
- java.lang.Object
-
- org.apache.tika.server.ServerStatus
-
public class ServerStatus extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ServerStatus.STATUS
static class
ServerStatus.TASK
-
Constructor Summary
Constructors Constructor Description ServerStatus()
ServerStatus(boolean isLegacy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(long taskId)
Removes the task from the collection of currently running tasks.long
getFilesProcessed()
ServerStatus.STATUS
getStatus()
Map<Long,TaskStatus>
getTasks()
boolean
isOperating()
void
setStatus(ServerStatus.STATUS status)
long
start(ServerStatus.TASK task, String fileName)
-
-
-
Method Detail
-
start
public long start(ServerStatus.TASK task, String fileName)
-
complete
public void complete(long taskId) throws IllegalArgumentException
Removes the task from the collection of currently running tasks.- Parameters:
taskId
-- Throws:
IllegalArgumentException
- if there is no task by that taskId in the collection
-
setStatus
public void setStatus(ServerStatus.STATUS status)
-
getStatus
public ServerStatus.STATUS getStatus()
-
getTasks
public Map<Long,TaskStatus> getTasks()
-
getFilesProcessed
public long getFilesProcessed()
-
isOperating
public boolean isOperating()
- Returns:
- true if this is legacy, otherwise whether or not status == OPERATING.
-
-