Class BatchEndedMessage

  • All Implemented Interfaces:
    java.io.Serializable

    public class BatchEndedMessage
    extends ArchiveMessage
    An instance of this class is sent by a bitarchive machine (Bitarchive class) to a BitarchiveMonitorServer to indicate that that single machine has finished processing a batch job.
    See Also:
    Serialized Form
    • Constructor Detail

      • BatchEndedMessage

        public BatchEndedMessage​(ChannelID to,
                                 java.lang.String baAppId,
                                 java.lang.String originatingBatchMsgId,
                                 RemoteFile rf)
                          throws ArgumentNotValid
        Message to signal from a BitarchiveServer to the BitarchiveMonitorServer that the Bit Archive Application identified by BA_ApplicationId has completed its part of the batch job.

        Holds status information: list of files processed and a list of ARC files (file names) on which the batch job failed.

        Parameters:
        to - the channel to which this message is to be sent (must be a BAMON channel)
        baAppId - Identifier for the machine sending this message, usually containing the IP address and http port number
        originatingBatchMsgId - the Id field from the original batch message
        rf - he remote file reference containing the output of the batch job (may be null if no output is generated).
        Throws:
        ArgumentNotValid - If the BA_ApplicationId or the originatingBatchMsgId are null or empty, or if the channel 'to' is null.
      • BatchEndedMessage

        public BatchEndedMessage​(ChannelID to,
                                 java.lang.String originatingBatchMsgId,
                                 BatchStatus status)
        Message to signal from a BitarchiveServer to the BitarchiveMonitorServer that the Bit Archive Application identified by BA_ApplicationId has completed its part of the batch job.

        Holds status information: list of files processed and a list of ARC files (file names) on which the batch job failed.

        Parameters:
        to - the channel to which this message is to be sent (must be a BAMON channel)
        originatingBatchMsgId - the Id field from the original batch message
        status - The object containing status info.
    • Method Detail

      • getBitarchiveID

        public java.lang.String getBitarchiveID()
        Returns id information for the bitarchive which generated this message.
        Returns:
        the id information
      • getOriginatingBatchMsgID

        public java.lang.String getOriginatingBatchMsgID()
        Returns the Id of the BatchMessage which originated this message.
        Returns:
        the Id
      • getNoOfFilesProcessed

        public int getNoOfFilesProcessed()
        Returns the number of files processed by this batch job on this machine.
        Returns:
        the number of files processed
      • getFilesFailed

        public java.util.Collection<java.io.File> getFilesFailed()
        Returns a collection of the names of files on which this batch job. failed
        Returns:
        a Collection of strings with the file names
      • setNoOfFilesProcessed

        public void setNoOfFilesProcessed​(int number)
        Set the number of files processed in batch job.
        Parameters:
        number - The number of processed files
      • setFilesFailed

        public void setFilesFailed​(java.util.Collection<java.io.File> files)
        Set the files that failed in batch job.
        Parameters:
        files - The collection of files that failed
      • getRemoteFile

        public RemoteFile getRemoteFile()
        Returns the remote file object containing the output of this job.
        Returns:
        the remote file object. May be null if this job generates no output
      • toString

        public java.lang.String toString()
        Human readable version of this object.
        Overrides:
        toString in class NetarkivetMessage
        Returns:
        A human readable version of this object