|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.checksum.distribute.ChecksumClient
public class ChecksumClient
Proxy for remote checksum archive. Establishes the jms connection to the remote checksum archive. Can be used in combination with any type of ChecksumServerAPI.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
Method Summary | |
---|---|
BatchMessage |
batch(BatchMessage msg)
Method for sending batch job messages to the replica. |
BatchMessage |
batch(ChannelID replyChannel,
FileBatchJob job)
Method for sending batch job messages to the replica. |
void |
close()
Method for closing this instance. |
void |
correct(RemoteFile arcfile,
java.lang.String checksum)
Method for correcting a entity in the archive. |
void |
get(GetMessage msg)
This method is intended to retrieve a record from an arc-file within the archive. |
void |
getAllChecksums(GetAllChecksumsMessage msg)
Method for sending the GetAllChecksumMessage to the ChecksumReplica. |
void |
getAllFilenames(GetAllFilenamesMessage msg)
Method for sending a GetAllFilenamesMessage to a checksum archive. |
GetChecksumMessage |
getChecksum(ChannelID replyChannel,
java.lang.String filename)
Method for retrieving the checksum of a specific arcfile within the archive. |
void |
getChecksum(GetChecksumMessage msg)
Method for retrieving the checksum of a specific arcfile within the archive. |
void |
getFile(GetFileMessage gfm)
This method is intended to retrieve an arc-file from the archive. |
static ChecksumClient |
getInstance(ChannelID theCRin)
The method for retrieving the invoked the instance. |
ReplicaType |
getType()
Method for retrieving the type of replica. |
void |
removeAndGetFile(RemoveAndGetFileMessage msg)
This method is intended to retrieve an arc-file from the archive. |
void |
upload(RemoteFile rf)
Method for uploading a file to the archive. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log log
Method Detail |
---|
public static ChecksumClient getInstance(ChannelID theCRin) throws IOFailure
theCRin
- The channel for contacting the checksum archive.
IOFailure
- If there is a problem with the connection.public void correct(RemoteFile arcfile, java.lang.String checksum)
correct
in interface ReplicaClient
arcfile
- The RemoteFile which should correct the current one in the
archive, which is wrong.checksum
- The checksum of the 'wrong' entry to validate that it is
wrong.public void getAllFilenames(GetAllFilenamesMessage msg)
getAllFilenames
in interface ReplicaClient
msg
- The GetAllFilenamesMessage, which will be send through the jms
connection to the checksum archive.public void getAllChecksums(GetAllChecksumsMessage msg)
getAllChecksums
in interface ReplicaClient
msg
- The GetAllChecksumMessage, which will be sent through the jms
connection to the checksum archive.public void getChecksum(GetChecksumMessage msg)
getChecksum
in interface ReplicaClient
msg
- The GetChecksumMessage which will be sent to the checksum
archive though the jms connection.public GetChecksumMessage getChecksum(ChannelID replyChannel, java.lang.String filename)
getChecksum
in interface ReplicaClient
msg
- The GetChecksumMessage which will be sent to the checksum
archive though the jms connection.
public ReplicaType getType()
getType
in interface ReplicaClient
public void upload(RemoteFile rf)
upload
in interface ReplicaClient
rf
- The file to upload to the archive.public BatchMessage batch(ChannelID replyChannel, FileBatchJob job) throws IllegalState
batch
in interface ReplicaClient
replyChannel
- The channel where the reply should be sent.job
- The batchjob to execute.
IllegalState
- Always. Since it is not legal to send a batchjob to
a checksum replica.public BatchMessage batch(BatchMessage msg) throws IllegalState
batch
in interface ReplicaClient
msg
- The batch message.
IllegalState
- Always. Since it is not legal to send a batchjob to
a checksum replica.public void get(GetMessage msg) throws IllegalState
get
in interface ReplicaClient
msg
- The GetMessage for retrieving the arc-record from the archive.
IllegalState
- Always. Since checksum replicas cannot handle this
kind of messages.public void getFile(GetFileMessage gfm)
getFile
in interface ReplicaClient
gfm
- The GetFileMessage for retrieving the arc-file from the
archive.
IllegalState
- Always. Since checksum replicas cannot handle this
kind of messages.public void removeAndGetFile(RemoveAndGetFileMessage msg)
removeAndGetFile
in interface ReplicaClient
msg
- The RemoveAndGetFileMessage for removing and retrieving an
arc-file from the archive.
IllegalState
- Always. Since checksum replicas cannot handle this
kind of messages.public void close()
close
in interface ReplicaClient
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |