|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.archive.distribute.ArchiveMessageHandler dk.netarkivet.archive.indexserver.distribute.IndexRequestServer
public class IndexRequestServer
Index request server singleton. This class contains a singleton that handles requesting an index over JMS. It will ALWAYS reply to such messages, either with the index, a message telling that only a subset is available, and which, or an error message,
Method Summary | |
---|---|
void |
cleanup()
Releases the JMS-connection and resets the singleton. |
void |
close()
Releases the JMS-connection and resets the singleton. |
static IndexRequestServer |
getInstance()
Get the unique index request server instance. |
void |
setHandler(RequestType t,
FileBasedCache<java.util.Set<java.lang.Long>> handler)
Set handler for certain type of index request. |
void |
start()
Look for stored messages to be preprocessed, and start processing those. |
void |
visit(IndexRequestMessage irMsg)
Given a request for an index over a set of job ids, use a cache to try to create the index, Then reply result. |
Methods inherited from class dk.netarkivet.archive.distribute.ArchiveMessageHandler |
---|
onMessage, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IndexRequestServer getInstance()
public void setHandler(RequestType t, FileBasedCache<java.util.Set<java.lang.Long>> handler)
t
- The type of index requestedhandler
- The handler that should handle this request.public void visit(IndexRequestMessage irMsg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
irMsg
- A message requesting an index.
ArgumentNotValid
- on null parameterpublic void close()
public void cleanup()
cleanup
in interface CleanupIF
public void start()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |