|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.archive.distribute.ArchiveMessageHandler dk.netarkivet.archive.bitarchive.distribute.BitarchiveMonitorServer
public class BitarchiveMonitorServer
Class representing message handling for the monitor for bitarchives. The monitor is used for sending out and combining the results of executing batch jobs. Batch jobs are received on the BAMON-channel, and resent to all bitarchives, that are considered live by the bitarchive monitor. Lets the bitarchive monitor handle batch replies from the bitarchives, and observes it for when the batch job is done. Then constructs a reply from the data given, and sends it back to the originator. Also registers signs of life from the bitarchives in the bitarchive monitor.
Constructor Summary | |
---|---|
protected |
BitarchiveMonitorServer()
Creates an instance of a BitarchiveMonitorServer. |
Method Summary | |
---|---|
void |
cleanup()
Closes this BitarchiveMonitorServer cleanly. |
void |
close()
Close down this BitarchiveMonitor. |
static BitarchiveMonitorServer |
getInstance()
Returns the unique instance of a BitarchiveMonitorServer. |
void |
update(java.util.Observable o,
java.lang.Object arg)
Handles notifications from the bitarchive monitor, that a batch job is complete. |
void |
visit(BatchEndedMessage beMsg)
This is the message handling method for BatchEndedMessages. |
void |
visit(BatchMessage inbMsg)
This is the message handling method for BatchMessages. |
void |
visit(CorrectMessage cm)
This is the first step in correcting a bad entry. |
void |
visit(GetAllChecksumsMessage msg)
Method for handling the GetAllChecksumsMessage. |
void |
visit(GetAllFilenamesMessage msg)
Method for handling the GetAllFilenamesMessage. |
void |
visit(GetChecksumMessage msg)
Method for handling the GetChecksumMessage. |
void |
visit(HeartBeatMessage hbMsg)
This is the message handling method for HeartBeatMessages. |
void |
visit(RemoveAndGetFileMessage msg)
This is the second step in correcting a bad entry. |
void |
visit(UploadMessage msg)
This is the third step in correcting a bad entry. |
Methods inherited from class dk.netarkivet.archive.distribute.ArchiveMessageHandler |
---|
onMessage, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BitarchiveMonitorServer() throws IOFailure
IOFailure
- - if an error with the JMSConnection occursMethod Detail |
---|
public static BitarchiveMonitorServer getInstance() throws IOFailure
IOFailure
- - if an error with the JMSConnection occurspublic void visit(BatchMessage inbMsg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
inbMsg
- The message received
ArgumentNotValid
- If the BatchMessage is null.public void visit(BatchEndedMessage beMsg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
beMsg
- The BatchEndedMessage to be handled.
ArgumentNotValid
- If the BatchEndedMessage is null.public void visit(HeartBeatMessage hbMsg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
hbMsg
- the message that represents the sign of life
ArgumentNotValid
- If the HeartBeatMessage is null.public void visit(CorrectMessage cm) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
cm
- The CorrectMessage to handle.
ArgumentNotValid
- If the CorrectMessage is null.public void visit(RemoveAndGetFileMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The RemoteAndGetFileMessage.
ArgumentNotValid
- If the RemoveAndGetFileMessage is null.public void visit(UploadMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The reply of the UploadMessage.
ArgumentNotValid
- If the UploadMessage is null.public void visit(GetAllChecksumsMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The GetAllChecksumsMessage, which will be made into a batchjob
and sent to the bitarchives.
ArgumentNotValid
- If the GetAllChecksumsMessage is null.public void visit(GetAllFilenamesMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The GetAllFilenamesMessage, which will be made into a batchjob
and sent to the bitarchives.
ArgumentNotValid
- If the GetAllFilenamesMessage is null.public void visit(GetChecksumMessage msg) throws ArgumentNotValid
visit
in interface ArchiveMessageVisitor
visit
in class ArchiveMessageHandler
msg
- The GetAllChecksumsMessage, which will be made into a batchjob
and sent to the bitarchives.
ArgumentNotValid
- If the GetChecksumMessage is null.public void update(java.util.Observable o, java.lang.Object arg)
update
in interface java.util.Observer
o
- the observable object. Should always be the bitarchive
monitor. If it isn't, this notification will be logged and
ignored.arg
- an argument passed from the bitarchive monitor. This should
always be a batch status object indicating the end of that
batchjob. If it isn't, this notification will be logged and
ignored.public void close()
public void cleanup()
cleanup
in interface CleanupIF
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |