public class BatchMessage extends ArchiveMessage
The response to this message comes in the form of a BatchReplyMessage placed on the senders queue.
replyOfId
Constructor and Description |
---|
BatchMessage(ChannelID to,
ChannelID replyTo,
FileBatchJob job,
String replicaId,
String... arguments)
Creates a BatchMessage object which can be used to initiate a batch job.
|
BatchMessage(ChannelID to,
ChannelID replyTo,
FileBatchJob job,
String replicaId,
String batchId,
String... arguments)
Creates a BatchMessage object which can be used to initiate a batch job.
|
BatchMessage(ChannelID to,
FileBatchJob job,
String replicaId)
Creates a BatchMessage object which can be used to initiate a batch job.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(ArchiveMessageVisitor v)
Should be implemented as a part of the visitor pattern.
|
List<String> |
getArgs()
Returns the arguments for the batchjob.
|
String |
getBatchID()
Returns the predefined ID for the batch process.
|
FileBatchJob |
getJob()
Retrieves batch job.
|
String |
getReplicaId()
Returns the replica id.
|
String |
toString()
Retrieval of a string representation of this object.
|
getErrMsg, getID, getReplyOfId, getReplyTo, getTo, hasBeenSent, isOk, setNotOk, setNotOk
public BatchMessage(ChannelID to, FileBatchJob job, String replicaId)
Note: The id for the batchjob is the empty string, which removes the possibility of terminating the batchjob remotely while it is running.
to
- The channel to which the batch message is to be sentjob
- The batch job to be executedreplicaId
- id of this replica.public BatchMessage(ChannelID to, ChannelID replyTo, FileBatchJob job, String replicaId, String... arguments)
Note: The id for the batchjob is the empty string, which removes the possibility of terminating the batchjob remotely while it is running.
to
- The channel to which the batch message is to be sentreplyTo
- The channel whereto the reply to this message is sent.job
- The batch job to be executedreplicaId
- id of this replica.arguments
- The arguments for initialising the batchjob.ArgumentNotValid
- If the job is null, or the replica is either null or the empty string.public BatchMessage(ChannelID to, ChannelID replyTo, FileBatchJob job, String replicaId, String batchId, String... arguments) throws ArgumentNotValid
to
- The channel to which the batch message is to be sentreplyTo
- The channel whereto the reply to this message is sent.job
- The batch job to be executedreplicaId
- id of this replica.batchId
- The id for the process which runs the batchjob.arguments
- The arguments for initialising the batchjob. This is allowed to be null.ArgumentNotValid
- If the job is null, or the replica is either null or the empty string.public FileBatchJob getJob()
public String getReplicaId()
public List<String> getArgs()
public String getBatchID()
public void accept(ArchiveMessageVisitor v)
accept
in class ArchiveMessage
v
- A message visitorArchiveMessageVisitor
public String toString()
toString
in class NetarkivetMessage
NetarkivetMessage.toString()
Copyright © 2005–2015 The Royal Danish Library, the Danish State and University Library, the National Library of France and the Austrian National Library.. All rights reserved.