1 16 package org.apache.cocoon.mail.command; 17 18 import java.util.Iterator ; 19 import java.util.List ; 20 import javax.mail.MessagingException ; 21 22 29 public class MailCommands extends AbstractMailCommand { 30 31 34 private List commands; 35 36 37 42 public MailCommands(List commands) { 43 this.commands = commands; 44 } 45 46 47 55 public void execute() throws MessagingException { 56 Iterator i = commands.iterator(); 57 while (i.hasNext()) { 58 AbstractMailCommand command = (AbstractMailCommand) i.next(); 59 command.execute(); 60 addResults(command.getResults()); 61 } 62 } 63 } 64 65 66 | Popular Tags |