org.pandora.sense.email
Class Email

java.lang.Object
  extended by org.pandora.sense.BasicSense
      extended by org.pandora.sense.email.Email
All Implemented Interfaces:
Sense

public class Email
extends BasicSense

Receive and respond to incoming email. Can use any pop mail server, such as gmail.


Field Summary
static int SLEEP
           
 
Fields inherited from class org.pandora.sense.BasicSense
DEFAULT_SPEAKER, RETRY
 
Constructor Summary
Email()
           
 
Method Summary
 void checkEmail()
          Check the inbox for new messages, and process each message.
 javax.mail.Store connectStore()
           
 javax.mail.Store connectStoreSSL()
           
 java.lang.String getEmailAddress()
           
 java.lang.String getIncomingHost()
           
 int getIncomingPort()
           
 java.lang.String getOutgoingHost()
           
 int getOutgoingPort()
           
 java.lang.String getPassword()
           
 java.lang.String getProtocol()
           
 java.lang.String getSignature()
           
 java.lang.String getUsername()
           
 void input(java.lang.Object input, Network network)
          Process the email message.
 void inputSentence(java.lang.String text, java.lang.String subject, java.lang.String userName, java.lang.String targetUserName, Network network)
          Process the text sentence.
 boolean isSSLRequired()
           
 void output(Vertex output)
          Output the email reply.
 void sendEmail(java.lang.String text, java.lang.String subject, java.lang.String replyTo)
          Send the email reply.
 void setEmailAddress(java.lang.String emailAddress)
           
 void setIncomingHost(java.lang.String incomingHost)
           
 void setIncomingPort(int incomingPort)
           
 void setIsEnabled(boolean isEnabled)
          Allow the sense to disabled/enabled.
 void setOutgoingHost(java.lang.String outgoingHost)
           
 void setOutgoingPort(int outgoingPort)
           
 void setPassword(java.lang.String password)
           
 void setProtocol(java.lang.String protocol)
           
 void setSignature(java.lang.String signature)
           
 void setSSLRequired(boolean isSSLRequired)
           
 void setUsername(java.lang.String username)
           
 void startCheckingEmail()
           
 
Methods inherited from class org.pandora.sense.BasicSense
awake, getEmotionalState, getLanguageState, getName, getPandora, getPrimitive, getShortTermMemory, initialize, input, isEnabled, log, log, log, setEmotionalState, setLanguageState, setName, setPandora, shutdown, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SLEEP

public static int SLEEP
Constructor Detail

Email

public Email()
Method Detail

setIsEnabled

public void setIsEnabled(boolean isEnabled)
Description copied from class: BasicSense
Allow the sense to disabled/enabled.

Specified by:
setIsEnabled in interface Sense
Overrides:
setIsEnabled in class BasicSense

startCheckingEmail

public void startCheckingEmail()

connectStore

public javax.mail.Store connectStore()
                              throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

connectStoreSSL

public javax.mail.Store connectStoreSSL()
                                 throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException

checkEmail

public void checkEmail()
Check the inbox for new messages, and process each message.


sendEmail

public void sendEmail(java.lang.String text,
                      java.lang.String subject,
                      java.lang.String replyTo)
Send the email reply.


input

public void input(java.lang.Object input,
                  Network network)
           throws java.lang.Exception
Process the email message.

Specified by:
input in interface Sense
Overrides:
input in class BasicSense
Throws:
java.lang.Exception

output

public void output(Vertex output)
Output the email reply.

Specified by:
output in interface Sense
Overrides:
output in class BasicSense

getSignature

public java.lang.String getSignature()

setSignature

public void setSignature(java.lang.String signature)

getEmailAddress

public java.lang.String getEmailAddress()

setEmailAddress

public void setEmailAddress(java.lang.String emailAddress)

getIncomingHost

public java.lang.String getIncomingHost()

setIncomingHost

public void setIncomingHost(java.lang.String incomingHost)

getIncomingPort

public int getIncomingPort()

setIncomingPort

public void setIncomingPort(int incomingPort)

getOutgoingHost

public java.lang.String getOutgoingHost()

setOutgoingHost

public void setOutgoingHost(java.lang.String outgoingHost)

getOutgoingPort

public int getOutgoingPort()

setOutgoingPort

public void setOutgoingPort(int outgoingPort)

getUsername

public java.lang.String getUsername()

setUsername

public void setUsername(java.lang.String username)

getPassword

public java.lang.String getPassword()

setPassword

public void setPassword(java.lang.String password)

getProtocol

public java.lang.String getProtocol()

setProtocol

public void setProtocol(java.lang.String protocol)

isSSLRequired

public boolean isSSLRequired()

setSSLRequired

public void setSSLRequired(boolean isSSLRequired)

inputSentence

public void inputSentence(java.lang.String text,
                          java.lang.String subject,
                          java.lang.String userName,
                          java.lang.String targetUserName,
                          Network network)
Process the text sentence.