|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.netarkivet.archive.bitarchive.distribute.BitarchiveClient
public class BitarchiveClient
Proxy for remote bitarchive. Establishes a JMS connection to the remote bitarchive.
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
log
|
Method Summary | |
---|---|
BatchMessage |
batch(BatchMessage bMsg)
Submit an already constructed get message to the archive. |
BatchMessage |
batch(ChannelID replyChannel,
FileBatchJob job)
Submit a batch job to the archive. |
void |
close()
Release jms connections. |
void |
correct(RemoteFile arcfile,
java.lang.String checksum)
For correcting a erroneous file in the archive. |
void |
get(GetMessage msg)
Submit an already constructed batch message to the archive. |
GetMessage |
get(java.lang.String arcfile,
long index)
Submit a get request to the bitarchive. |
void |
getAllChecksums(GetAllChecksumsMessage msg)
Retrieves the checksum for all the arc files in the replica archive. |
void |
getAllFilenames(GetAllFilenamesMessage msg)
Retrieves the names of all the arc file in the replica archive. |
GetChecksumMessage |
getChecksum(ChannelID replyChannel,
java.lang.String filename)
This should creates a batch job for retrieving the checksum of the wanted files. |
void |
getChecksum(GetChecksumMessage msg)
This should creates a batch job for retrieving the checksum of the wanted files. |
void |
getFile(GetFileMessage msg)
Submit an already constructed getfile message to the archive. |
static BitarchiveClient |
getInstance(ChannelID all_ba_in,
ChannelID any_ba_in,
ChannelID the_bamon_in)
Factory that establish the connection to the server. |
ReplicaType |
getType()
Retrieves the type of replica. |
void |
removeAndGetFile(RemoveAndGetFileMessage msg)
Forward the message to ALL_BA. |
void |
upload(RemoteFile rf)
Submit an upload request to the bitarchive. |
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 BitarchiveClient getInstance(ChannelID all_ba_in, ChannelID any_ba_in, ChannelID the_bamon_in) throws IOFailure
all_ba_in
- topic to all bitarchivesany_ba_in
- queue to one of the bitarchivesthe_bamon_in
- queue to the bitarchive monitor
IOFailure
- If there is a problem making the connection.public GetMessage get(java.lang.String arcfile, long index)
arcfile
- The file containing the requested recordindex
- Offset of the ARC record in the file
public void get(GetMessage msg)
get
in interface ReplicaClient
msg
- the message to be processed by the get command.public void getFile(GetFileMessage msg)
getFile
in interface ReplicaClient
msg
- get file message to retrieve.public void removeAndGetFile(RemoveAndGetFileMessage msg)
removeAndGetFile
in interface ReplicaClient
msg
- the message to forward.public void upload(RemoteFile rf)
upload
in interface ReplicaClient
rf
- The file to upload.
IOFailure
- If access to file denied.
ArgumentNotValid
- If arcfile is null.public BatchMessage batch(BatchMessage bMsg) throws ArgumentNotValid
batch
in interface ReplicaClient
bMsg
- a BatchMessage.
ArgumentNotValid
- If message is null.public BatchMessage batch(ChannelID replyChannel, FileBatchJob job) throws ArgumentNotValid, IOFailure
batch
in interface ReplicaClient
replyChannel
- The channel that the reply of this job should be
sent to.job
- The job that should be run on the bit archive handled by this
client.
ArgumentNotValid
- If any parameter was null.
IOFailure
- If sending the batch message did not succeed.public void close()
close
in interface ReplicaClient
public void correct(RemoteFile arcfile, java.lang.String checksum)
ReplicaClient
correct
in interface ReplicaClient
arcfile
- The file which is to replace the wrong file within the
archive.public void getAllFilenames(GetAllFilenamesMessage msg)
ReplicaClient
getAllFilenames
in interface ReplicaClient
public void getAllChecksums(GetAllChecksumsMessage msg)
ReplicaClient
getAllChecksums
in interface ReplicaClient
public void getChecksum(GetChecksumMessage msg)
getChecksum
in interface ReplicaClient
msg
- The message.public GetChecksumMessage getChecksum(ChannelID replyChannel, java.lang.String filename)
getChecksum
in interface ReplicaClient
msg
- The message.
public ReplicaType getType()
getType
in interface ReplicaClient
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |