blob: 28bb8cddd3420543f7578d363989a7d76deea32c [file] [log] [blame]
/*
*/
package org.taverna.server.master.worker;
/**
* How to convert a notification about the completion of a job into a message.
*
* @author Donal Fellows
*/
public interface CompletionNotifier {
/**
* @return The name of this notifier.
*/
String getName();
/**
* Called to get the content of a message that a workflow run has finished.
*
* @param name
* The name of the run.
* @param run
* What run are we talking about.
* @param code
* What the exit code was.
* @return The plain-text content of the message.
*/
String makeCompletionMessage(String name, RemoteRunDelegate run, int code);
/**
* Called to get the subject of the message to dispatch.
*
* @param name
* The name of the run.
* @param run
* What run are we talking about.
* @param code
* What the exit code was.
* @return The plain-text subject of the message.
*/
String makeMessageSubject(String name, RemoteRunDelegate run, int code);
}