|
|||||||||
| 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.ak.RequestAgent
com.cometway.email.AutoReplyAgent
public class AutoReplyAgent
This agent sets itself up to receive messages from a ReceiveEmailAgent and automatically respond to the sender using the SendEmailAgent. In most cases, this will be subclassed and the getReply method should be overridden.
| 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 | |
|---|---|
AutoReplyAgent()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getReply(AgentRequest request)
This method can be overridden to provide an automatic response message. |
void |
handleRequest(AgentRequest request)
Processes an email AgentRequest by parsing out the recipient's Reply To address, and responding with the text message returned by calling the getReply method. |
void |
initProps()
Initializes properties for this agent: |
void |
start()
Registers with the Service Manager to receive and respond to e-mail requests. |
| Methods inherited from class com.cometway.ak.ServiceAgent |
|---|
stop |
| 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 AutoReplyAgent()
| Method Detail |
|---|
public void initProps()
service_name - is the agent's email address, reply_to - the agent's reply to email address (usually the same as service_name), send_email_service_name - is the service name of the SendEmailAgent (send_email), reply_message - is the static text response this agent replys with.
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class ServiceAgentpublic void handleRequest(AgentRequest request)
public java.lang.String getReply(AgentRequest request)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||