|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.distribute.NetarkivetMessage dk.netarkivet.archive.distribute.ArchiveMessage dk.netarkivet.archive.checksum.distribute.CorrectMessage
public class CorrectMessage
The message to correct a bad entry in an archive.
Field Summary |
---|
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage |
---|
replyOfId |
Constructor Summary | |
---|---|
CorrectMessage(ChannelID to,
ChannelID replyTo,
java.lang.String badChecksum,
RemoteFile rf,
java.lang.String repId,
java.lang.String cred)
Constructor. |
Method Summary | |
---|---|
void |
accept(ArchiveMessageVisitor v)
Accept this message. |
java.lang.String |
getArcfileName()
Retrieve name of the uploaded file. |
RemoteFile |
getCorrectFile()
Method for retrieving the correct file. |
java.lang.String |
getCredentials()
The credentials to allow correction of an entry in the archive. |
void |
getData(java.io.File toFile)
Retrieves the content of the remoteFile and writes it into the local file. |
java.lang.String |
getIncorrectChecksum()
Method for retrieving the 'bad' checksum which should correspond to the checksum of the current entry on this file in the archive. |
RemoteFile |
getRemovedFile()
Returns the removed file. |
java.lang.String |
getReplicaId()
Method for retrieving the replica, where this message should be sent. |
void |
setRemovedFile(RemoteFile rf)
Sets the removed file. |
java.lang.String |
toString()
Generate String representation of this object. |
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage |
---|
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CorrectMessage(ChannelID to, ChannelID replyTo, java.lang.String badChecksum, RemoteFile rf, java.lang.String repId, java.lang.String cred) throws ArgumentNotValid
to
- Where the message should be sent.replyTo
- Who is sending this message.badChecksum
- The checksum of the 'bad' entry.rf
- The remote file to replace the 'bad' entry.repId
- The identification of the replica, where this message
should be sent.cred
- The credentials to allow the correction of an entry.
ArgumentNotValid
- If any of the arguments are null, or any of the
strings are empty.Method Detail |
---|
public java.lang.String getArcfileName()
public void getData(java.io.File toFile) throws IOFailure, ArgumentNotValid
toFile
- where to write the content
IOFailure
- on error reading the remote file
or writing the local file
ArgumentNotValid
- If toFile is null.public RemoteFile getCorrectFile()
public java.lang.String getIncorrectChecksum()
public java.lang.String getReplicaId()
public java.lang.String getCredentials()
public RemoteFile getRemovedFile() throws IOFailure
IOFailure
- If the removed file is null.public void setRemovedFile(RemoteFile rf) throws ArgumentNotValid
rf
- The removed file which is part of the reply of this message.
ArgumentNotValid
- If the remote file is null.public void accept(ArchiveMessageVisitor v)
accept
in class ArchiveMessage
v
- The message visitor accepting this message.ArchiveMessageVisitor
public java.lang.String toString()
toString
in class NetarkivetMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |