|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.common.distribute.NetarkivetMessage
dk.netarkivet.archive.distribute.ArchiveMessage
dk.netarkivet.archive.bitarchive.distribute.RemoveAndGetFileMessage
public class RemoveAndGetFileMessage
Message requesting a file to be removed and returned from a bitarchive. Messages is forwarded through arcrepository, but reponds directly to sender.
Field Summary |
---|
Fields inherited from class dk.netarkivet.common.distribute.NetarkivetMessage |
---|
replyOfId |
Constructor Summary | |
---|---|
RemoveAndGetFileMessage(java.lang.String arcfileName,
java.lang.String locationName,
java.lang.String checksum,
java.lang.String credentials)
Constructor. |
Method Summary | |
---|---|
void |
accept(ArchiveMessageVisitor v)
Should be implemented as a part of the visitor pattern. |
void |
clearBuffer()
Clear content buffer. |
java.lang.String |
getArcfileName()
Get name of the file to retrieve. |
java.lang.String |
getCheckSum()
Get the checksum of the file to remove. |
java.lang.String |
getCredentials()
Get the credentials for the remove operation. |
java.io.File |
getData()
Writes the the content of the retrieved file into a local file. |
java.lang.String |
getLocationName()
Retrieve the location name. |
void |
setFile(java.io.File data)
Set the file this message should remove and return. |
java.lang.String |
toString()
Returns a string containing: |
Methods inherited from class dk.netarkivet.common.distribute.NetarkivetMessage |
---|
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, isOk, setNotOk, setNotOk |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoveAndGetFileMessage(java.lang.String arcfileName, java.lang.String locationName, java.lang.String checksum, java.lang.String credentials)
arcfileName
- The file to retrieve & removelocationName
- The bitarchive to receive the responsechecksum
- the checksum of the file to retrieve & removecredentials
- the right credentials for this operationMethod Detail |
---|
public void setFile(java.io.File data)
data
- Content of the file to retrievedata
- Content of the file to retrievepublic java.io.File getData()
IOFailure
- on error reading the filepublic java.lang.String getLocationName()
public java.lang.String getArcfileName()
public java.lang.String getCheckSum()
public java.lang.String getCredentials()
public void clearBuffer()
public void accept(ArchiveMessageVisitor v)
accept
in class ArchiveMessage
v
- A message visitorArchiveMessageVisitor
public java.lang.String toString()
NetarkivetMessage
toString
in class NetarkivetMessage
NetarkivetMessage.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |