|
|||||||||
| 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.ScheduledAgent
com.cometway.email.EmailReporter
public class EmailReporter
This is a Reporter Agent that extends FileLoggerAgent in order to log AK agent output to sequentially named text files. Upon loading, this agent replaces the default Reporter.
| Field Summary | |
|---|---|
protected static java.lang.String |
DEBUG_AFTER
|
protected static java.lang.String |
DEBUG_BEFORE
|
protected ReporterInterface |
defaultReporter
|
protected static java.lang.String |
ERROR_AFTER
|
protected static java.lang.String |
ERROR_BEFORE
|
protected java.lang.StringBuffer |
history
|
protected static java.lang.String |
PRINTLN_AFTER
|
protected static java.lang.String |
PRINTLN_BEFORE
|
protected java.util.Vector |
recipients
|
protected java.lang.String |
reply_to
|
protected static java.text.SimpleDateFormat |
SDF
|
protected boolean |
send_debug
|
protected boolean |
send_error
|
protected boolean |
send_println
|
protected boolean |
send_warning
|
protected java.lang.Object |
synchObject
|
protected static java.lang.String |
WARNING_AFTER
|
protected static java.lang.String |
WARNING_BEFORE
|
| Fields inherited from class com.cometway.ak.ScheduledAgent |
|---|
schedule |
| 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 | |
|---|---|
EmailReporter()
|
|
| Method Summary | |
|---|---|
void |
debug(java.lang.Object objectRef,
java.lang.String message)
Use this method to report an event for debugging. |
void |
error(java.lang.Object objectRef,
java.lang.String message)
Use this method to report a critical error with an Exception. |
void |
error(java.lang.Object objectRef,
java.lang.String message,
java.lang.Exception e)
Use this method to report a critical error message. |
void |
initProps()
Override this method to provide default properties for subclasses. |
void |
println(java.lang.Object objectRef,
java.lang.String message)
Use this method to report an event message. |
void |
start()
Creates a Schedule as specified by the schedule property and schedules this agent. |
void |
wakeup()
Override this method to handle schedule wakeup notifications. |
void |
warning(java.lang.Object objectRef,
java.lang.String message)
Use this method to report a warning message. |
void |
warning(java.lang.Object objectRef,
java.lang.String message,
java.lang.Exception e)
Use this method to report a warning message with an Exception. |
| Methods inherited from class com.cometway.ak.ScheduledAgent |
|---|
addScheduleChangeListener, getSchedule, removeScheduleChangeListener, schedule, stop, unschedule |
| 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 |
| Field Detail |
|---|
protected static final java.text.SimpleDateFormat SDF
protected static final java.lang.String DEBUG_BEFORE
protected static final java.lang.String DEBUG_AFTER
protected static final java.lang.String ERROR_BEFORE
protected static final java.lang.String ERROR_AFTER
protected static final java.lang.String PRINTLN_BEFORE
protected static final java.lang.String PRINTLN_AFTER
protected static final java.lang.String WARNING_BEFORE
protected static final java.lang.String WARNING_AFTER
protected java.lang.StringBuffer history
protected java.util.Vector recipients
protected java.lang.String reply_to
protected java.lang.Object synchObject
protected ReporterInterface defaultReporter
protected boolean send_println
protected boolean send_debug
protected boolean send_warning
protected boolean send_error
| Constructor Detail |
|---|
public EmailReporter()
| Method Detail |
|---|
public void initProps()
ScheduledAgent
initProps in interface AgentInterfaceinitProps in class ScheduledAgentpublic void start()
ScheduledAgent
start in interface AgentInterfacestart in class ScheduledAgentpublic void wakeup()
ScheduledAgent
wakeup in interface ISchedulablewakeup in class ScheduledAgent
public void debug(java.lang.Object objectRef,
java.lang.String message)
debug in interface ReporterInterface
public void warning(java.lang.Object objectRef,
java.lang.String message)
warning in interface ReporterInterface
public void warning(java.lang.Object objectRef,
java.lang.String message,
java.lang.Exception e)
warning in interface ReporterInterface
public void error(java.lang.Object objectRef,
java.lang.String message)
error in interface ReporterInterface
public void error(java.lang.Object objectRef,
java.lang.String message,
java.lang.Exception e)
error in interface ReporterInterface
public void println(java.lang.Object objectRef,
java.lang.String message)
println in interface ReporterInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||