public class AccessBitarchiveServer extends BitarchiveServer
batchProcesses, con
Modifier and Type | Method and Description |
---|---|
static AccessBitarchiveServer |
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
|
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.
|
cleanup, close, getBitarchiveAppId, visit, visit, visit, visit
public static AccessBitarchiveServer getInstance() throws ArgumentNotValid, UnknownID
Also, heartbeats are sent out at regular intervals to the Bitarchive Monitor, to tell that this bitarchive is alive.
UnknownID
- - if there was no heartbeat frequency defined in settingsArgumentNotValid
- - if the heartbeat frequency in settings is invalid or either argument is nullpublic void visit(UploadMessage msg) throws ArgumentNotValid
BitarchiveServer
visit
in interface ArchiveMessageVisitor
visit
in class BitarchiveServer
msg
- a container for upload requestArgumentNotValid
- If the message is null.public void visit(RemoveAndGetFileMessage msg) throws ArgumentNotValid
BitarchiveServer
Answers OK if the file is actually removed. Answers notOk if the file exists with wrong checksum or wrong credentials Doesn't answer if the file doesn't exist.
This method always generates a warning when deleting a file.
Before the file is removed it is verified that - the file exists in the bitarchive - the file has the correct checksum - the supplied credentials are correct
visit
in interface ArchiveMessageVisitor
visit
in class BitarchiveServer
msg
- a container for remove requestArgumentNotValid
- If the RemoveAndGetFileMessage is null.Copyright © 2005–2016 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.