net.sourceforge.sconman.agents
Class MailAdderAgent

java.lang.Object
  extended by net.sourceforge.sconman.agents.AbstractAgent
      extended by net.sourceforge.sconman.agents.MailAdderAgent
All Implemented Interfaces:
IAgent

public class MailAdderAgent
extends AbstractAgent

This class is an IAgent implementation that checks periodically a mailbox for new mails and adds them to the content repository.

Author:
mikeshadow

Field Summary
 
Fields inherited from class net.sourceforge.sconman.agents.AbstractAgent
actor
 
Constructor Summary
MailAdderAgent()
          Constructor for MailAdderAgent.
 
Method Summary
 java.lang.String getHost()
           
 java.lang.String getLogin()
           
 java.lang.String getPassword()
           
 void run(Project prj)
          This method will be called by the SCM engine each AbstractAgent.getPeriod() miliseconds to perform some maintenance task.
 void setHost(java.lang.String host)
           
 void setLogin(java.lang.String login)
           
 void setPassword(java.lang.String password)
           
 void storeMail(Project prj, User user, javax.mail.Message msg)
          Adds an email to the content repository
 
Methods inherited from class net.sourceforge.sconman.agents.AbstractAgent
getActor, getName, getPeriod, setActor, setName, setPeriod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailAdderAgent

public MailAdderAgent()
Constructor for MailAdderAgent.

Method Detail

getHost

public java.lang.String getHost()
Returns:

setHost

public void setHost(java.lang.String host)
Parameters:
host -

getLogin

public java.lang.String getLogin()
Returns:

setLogin

public void setLogin(java.lang.String login)
Parameters:
login -

getPassword

public java.lang.String getPassword()
Returns:

setPassword

public void setPassword(java.lang.String password)
Parameters:
password -

run

public void run(Project prj)
Description copied from class: AbstractAgent
This method will be called by the SCM engine each AbstractAgent.getPeriod() miliseconds to perform some maintenance task.

Specified by:
run in interface IAgent
Specified by:
run in class AbstractAgent
Parameters:
prj - The project where the contents will be added

storeMail

public void storeMail(Project prj,
                      User user,
                      javax.mail.Message msg)
               throws SCMException
Adds an email to the content repository

Parameters:
cm - The content manager where mail contents will be added
msg - The javamail massage to add
Throws:
SCMException - Throw if there's a problem reading or storing the mail contents


Copyright null null. All Rights Reserved.