|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.Props
com.cometway.ak.Agent
com.cometway.ak.ServiceAgent
com.cometway.email.EmailBugReportAgent
public class EmailBugReportAgent
This agent registers itself with the Service Manager as a BugReportInterface and periodically submits the bug reports collects as an email message to a list of recipients using the SendEmailInterface registered with the Service Manager as "send_email".
| Field Summary |
|---|
| Fields inherited from class com.cometway.ak.Agent |
|---|
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter |
| Constructor Summary | |
|---|---|
EmailBugReportAgent()
|
|
| Method Summary | |
|---|---|
boolean |
addScheduleChangeListener(IScheduleChangeListener l)
Called by Scheduler to add a listener to our Schedule. |
ISchedule |
getSchedule()
Returns the instance to the schedule. |
void |
initProps()
Initializes the default Props for this agent: "service_name" is the name this agent uses to register with the Service Manager (default: bug_report), "schedule" describes the schedule used to wake up this agent and email bug reports (default: every 6 hours), "report_title" is used to prefix the subject line of the emails that are sent (default: Bug Report), "reply_to" is used to set the Reply To field of emails that are sent, "recipients" is a comma separated list of email addresses used to send the emails. |
boolean |
removeScheduleChangeListener(IScheduleChangeListener l)
Called by Scheduler to remove a listener from our Schedule. |
void |
resetHistory()
Checks current bug history and emails any pending reports to the recipients, then resets the history. |
void |
start()
Schedules the bug reporting mechanism using the schedule property and registers this agent with the Service Manager. |
void |
stop()
Unschedules the bug reporter, and unregisters this agent with the Service Manager. |
void |
submitBugReport(java.lang.String author,
java.lang.String description)
Submits a bug report from the specified author (or entity) using the description. |
void |
wakeup()
Called by Scheduler based on the Schedule returned by getSchedule method. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EmailBugReportAgent()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class ServiceAgentpublic void stop()
stop in interface AgentInterfacestop in class ServiceAgentpublic boolean addScheduleChangeListener(IScheduleChangeListener l)
addScheduleChangeListener in interface ISchedulablel - a reference to an IScheduleChangeListener.
public ISchedule getSchedule()
getSchedule in interface ISchedulablepublic boolean removeScheduleChangeListener(IScheduleChangeListener l)
removeScheduleChangeListener in interface ISchedulablel - a reference to an IScheduleChangeListener.
public void wakeup()
wakeup in interface ISchedulable
public void submitBugReport(java.lang.String author,
java.lang.String description)
submitBugReport in interface BugReportInterfacepublic void resetHistory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||