public class ArcRepositoryServer extends ArchiveMessageHandler
Constructor and Description |
---|
ArcRepositoryServer(ArcRepository ar)
Creates and adds a ArcRepositoryMessageHandler as listener on the "TheArcrepos"-queue.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Removes the ArcRepositoryMessageHandler as listener.
|
void |
visit(AdminDataMessage msg)
Update the admin data in the arcrepository.
|
void |
visit(BatchMessage msg)
Resends a batch message to the requested bitarchive.
|
void |
visit(BatchReplyMessage msg)
Forwards the handling of batch replies to the arc repository.
|
void |
visit(CorrectMessage msg)
Method for handling CorrectMessages.
|
void |
visit(GetAllChecksumsMessage msg)
Method for retrieving all the checksums from a replica.
|
void |
visit(GetAllFilenamesMessage msg)
For retrieving all the filenames from a replica.
|
void |
visit(GetChecksumMessage msg)
Method for handling the results of a GetChecksumMessage.
|
void |
visit(GetFileMessage msg)
Forwards a getfile message to requested bitarchive replica.
|
void |
visit(GetMessage msg)
Forwards a get message to the local bitarchive.
|
void |
visit(RemoveAndGetFileMessage msg)
Request a file to be deleted from bitarchives.
|
void |
visit(StoreMessage msg)
Forwards the call to the ArcRepository.store() method with the StoreMessage as parameter.
|
void |
visit(UploadMessage msg)
Forwards the handling of upload replies to the arc repository.
|
onMessage, visit, visit
public ArcRepositoryServer(ArcRepository ar)
ar
- the ArcRepositorypublic void visit(StoreMessage msg)
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the message to be processed by the store command.public void visit(RemoveAndGetFileMessage msg)
Will send a not-ok reply on exceptions handling this request.
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the message to be processedpublic void visit(AdminDataMessage msg)
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the message to be processedpublic void visit(UploadMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a UploadMessageArgumentNotValid
- If the message is null.public void visit(BatchReplyMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- a BatchReplyMessageArgumentNotValid
- If the message is null.public void visit(BatchMessage msg) throws ArgumentNotValid
Note that this circumvents the ArcRepository entirely and that the reply goes directly back to whoever set the message.
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the batch message to be resend.ArgumentNotValid
- if parameters are nullpublic void visit(GetMessage msg) throws ArgumentNotValid
Note that this circumvents the ArcRepository entirely and that the reply goes directly back to whoever sent the message.
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the message to be processed by the get command.ArgumentNotValid
- If the message is null.public void visit(GetFileMessage msg) throws ArgumentNotValid
Note that this circumvents the ArcRepository entirely and that the reply goes directly back to whoever set the message.
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- the message to be processed by the get command.ArgumentNotValid
- If one of the arguments are null.public void visit(GetAllFilenamesMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The message to be processed.ArgumentNotValid
- If the argument is null.public void visit(GetAllChecksumsMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The GetAllChecksumsMessage.ArgumentNotValid
- If the GetAllChecksumsMessage is null.public void visit(GetChecksumMessage msg)
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The GetChecksumMessage message.public void visit(CorrectMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The message for correcting a bad entry in an archive.ArgumentNotValid
- If the CorrectMessage is null.public void close()
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.