1 22 package org.jboss.resource.adapter.mail.inflow; 23 24 import java.io.Serializable ; 25 import javax.resource.spi.ActivationSpec ; 26 import javax.resource.spi.InvalidPropertyException ; 27 import javax.resource.spi.ResourceAdapter ; 28 import javax.resource.ResourceException ; 29 30 35 public class MailActivationSpec 36 implements ActivationSpec , Serializable 37 { 38 39 private static final long serialVersionUID = -3034364895936568423L; 40 41 42 private transient ResourceAdapter ra; 43 44 private String mailServer = "mailhost"; 45 46 private String storeProtocol = "imap"; 47 48 private String mailFolder; 49 50 private String messageSelector; 51 52 private String userName; 53 54 private String password; 55 56 private long pollingInterval = 60000; 57 58 private int maxMessages = 1; 59 60 public String getMailServer() 61 { 62 return mailServer; 63 } 64 public void setMailServer(String mailServer) 65 { 66 this.mailServer = mailServer; 67 } 68 69 public String getStoreProtocol() 70 { 71 return storeProtocol; 72 } 73 public void setStoreProtocol(String storeProtocol) 74 { 75 this.storeProtocol = storeProtocol; 76 } 77 78 public String getMailFolder() 79 { 80 return mailFolder; 81 } 82 public void setMailFolder(String mailFolder) 83 { 84 this.mailFolder = mailFolder; 85 } 86 87 public String getMessageSelector() 88 { 89 return messageSelector; 90 } 91 public void setMessageSelector(String messageSelector) 92 { 93 this.messageSelector = messageSelector; 94 } 95 96 public String getUserName() 97 { 98 return userName; 99 } 100 public void setUserName(String userName) 101 { 102 this.userName = userName; 103 } 104 105 public String getPassword() 106 { 107 return password; 108 } 109 public void setPassword(String password) 110 { 111 this.password = password; 112 } 113 114 public long getPollingInterval() 115 { 116 return pollingInterval; 117 } 118 public void setPollingInterval(long pollingInterval) 119 { 120 this.pollingInterval = pollingInterval; 121 } 122 123 public int getMaxMessages() 124 { 125 return maxMessages; 126 } 127 public void setMaxMessages(int maxMessages) 128 { 129 this.maxMessages = maxMessages; 130 } 131 132 public ResourceAdapter getResourceAdapter() 133 { 134 return ra; 135 } 136 137 public void setResourceAdapter(ResourceAdapter ra) throws ResourceException 138 { 139 this.ra = ra; 140 } 141 142 public void validate() throws InvalidPropertyException 143 { 144 145 } 146 147 public String toString() 148 { 149 StringBuffer tmp = new StringBuffer ("MailActivationSpec("); 150 tmp.append("mailServer="); 151 tmp.append(mailServer); 152 tmp.append(", storeProtocol="); 153 tmp.append(storeProtocol); 154 tmp.append(", mailFolder="); 155 tmp.append(mailFolder); 156 tmp.append(", pollingInterval="); 157 tmp.append(pollingInterval); 158 tmp.append(", messageSelector="); 159 tmp.append(messageSelector); 160 tmp.append(", userName="); 161 tmp.append(userName); 162 tmp.append(", maxMessages="); 163 tmp.append(maxMessages); 164 tmp.append(")"); 165 return tmp.toString(); 166 } 167 } 168 | Popular Tags |