|
||||||||||
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.bitarchive.distribute.BitarchiveServer
public class BitarchiveServer
Bitarchive container responsible for processing the different classes of message which can be received by a bitarchive and returning appropriate data.
Field Summary | |
---|---|
java.util.Map<java.lang.String,java.lang.Thread> |
batchProcesses
Map between running batchjob processes and their message id. |
Method Summary | |
---|---|
void |
cleanup()
Ends the heartbeat sender before next loop. |
void |
close()
Ends the heartbeat sender before next loop and removes the server as listener on allBa and anyBa. |
java.lang.String |
getBitarchiveAppId()
Returns a String that identifies this bit archive application (within the bit archive, i.e. |
static BitarchiveServer |
getInstance()
Returns the unique instance of this class The server creates an instance of the bitarchive it provides access to and starts to listen to JMS messages on the incomming jms queue Also, heartbeats are sent out at regular intervals to the Bitarchive Monitor, to tell that this bitarchive is alive. |
void |
visit(BatchMessage msg)
Process a batch job and send the result back to the client. |
void |
visit(BatchTerminationMessage msg)
|
void |
visit(GetFileMessage msg)
Process a getFile request and send the result back to the client. |
void |
visit(GetMessage msg)
Process a get request and send the result back to the client. |
void |
visit(RemoveAndGetFileMessage msg)
Removes an arcfile from the bitarchive and returns the removed file as an remotefile. |
void |
visit(UploadMessage msg)
Process a upload request and send the result back to the client. |
Methods inherited from class dk.netarkivet.archive.distribute.ArchiveMessageHandler |
---|
onMessage, 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 |
Field Detail |
---|
public java.util.Map<java.lang.String,java.lang.Thread> batchProcesses
Method Detail |
---|
public static BitarchiveServer getInstance() throws ArgumentNotValid, UnknownID
UnknownID
- - if there was no heartbeat frequency defined in
settings
ArgumentNotValid
- - if the heartbeat frequency in settings is
invalid or either argument is nullpublic void close()
public void cleanup()
cleanup
in interface CleanupIF
public void visit(GetMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a container for upload request
ArgumentNotValid
- If the message is null.public void visit(UploadMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a container for upload request
ArgumentNotValid
- If the message is null.public void visit(RemoveAndGetFileMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a container for remove request
ArgumentNotValid
- If the RemoveAndGetFileMessage is null.public void visit(BatchMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a container for batch jobs
ArgumentNotValid
- If the BatchMessage is null.public void visit(BatchTerminationMessage msg) throws ArgumentNotValid
ArgumentNotValid
public void visit(GetFileMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a container for a getfile request
ArgumentNotValid
- If the GetFileMessage is null.public java.lang.String getBitarchiveAppId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |