public class IMAPMailBoxReader extends Object implements ResourceAwareRealTimeLineReader<javax.mail.Message>
| Modifier and Type | Field and Description | 
|---|---|
| protected String | folderName | 
| protected javax.mail.Folder | mailbox | 
| Constructor and Description | 
|---|
| IMAPMailBoxReader() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close()Any cleanup | 
| void | dispose()Un-initialize reader, so that it maybe re consumed
  Except for the main Resource& configuration set by Spring context 
  all other instance variables used will be re-set/disposed/cleared. | 
| protected List<MessagePart<String,String>> | getContentAsString(String type,
                  Object content)Marshal content from an Email (IMAP) to a  MessagePart | 
| List<MessagePart<String,String>> | getContentFromMail(javax.mail.Message mail) | 
| Long | getCurrentIndex()Depending on the resource the  ResourceAwareRealTimeLineReader.size()may factor in redundant rows also that maybe filtered by the reader if it uses some sort of filter. | 
| String | getFolderName() | 
| String | getHost() | 
| int | getIndex() | 
| Properties | getJavaMailProperties() | 
| javax.mail.Folder | getMailbox() | 
| String | getPassword() | 
| int | getSize() | 
| String | getSourceLocation() | 
| String | getUsername() | 
| boolean | hasNext()True if there is another record that can be read by the parser, false implies end of parse/read | 
| void | init()Allow lazy initialization of Reader in cases where the resource may not be known @  PostConstructtime | 
| boolean | isInitialized()Allow the calling API to determine if the reader has been initialized via  RealTimeLineReader.init()orPostConstructphaseIf not RealTimeLineReader.init()should be called upon the instance. | 
| javax.mail.Message | next()Read line from Source, on Record construction complete return the Record. | 
| void | setFolderName(String folderName) | 
| void | setHost(String host) | 
| void | setIndex(int index) | 
| void | setJavaMailProperties(Properties javaMailProperties) | 
| void | setMailbox(javax.mail.Folder mailbox) | 
| void | setPassword(String password) | 
| void | setUsername(String username) | 
| Long | size()Get number of tuples/records in resource | 
protected String folderName
protected transient javax.mail.Folder mailbox
protected List<MessagePart<String,String>> getContentAsString(String type, Object content) throws javax.mail.MessagingException, IOException
MessageParttype - as String (part details)content - as String (raw content)MessagePartjavax.mail.MessagingExceptionIOExceptionpublic List<MessagePart<String,String>> getContentFromMail(javax.mail.Message mail) throws javax.mail.MessagingException, IOException
javax.mail.MessagingExceptionIOExceptionpublic javax.mail.Message next()
                        throws javax.mail.MessagingException
RealTimeLineReadernext in interface RealTimeLineReader<javax.mail.Message>javax.mail.MessagingExceptionpublic boolean hasNext()
RealTimeLineReaderhasNext in interface RealTimeLineReader<javax.mail.Message>public void close()
           throws Exception
RealTimeLineReaderclose in interface RealTimeLineReader<javax.mail.Message>Exceptionpublic String getSourceLocation()
getSourceLocation in interface RealTimeLineReader<javax.mail.Message>public void init()
          throws Exception
RealTimeLineReaderPostConstruct timeinit in interface RealTimeLineReader<javax.mail.Message>Exceptionpublic boolean isInitialized()
                      throws Exception
RealTimeLineReaderRealTimeLineReader.init() or PostConstruct phase
 RealTimeLineReader.init() should be called upon the instance.isInitialized in interface RealTimeLineReader<javax.mail.Message>Exceptionpublic void dispose()
             throws Exception
RealTimeLineReaderResource & configuration set by Spring context 
  all other instance variables used will be re-set/disposed/cleared.dispose in interface RealTimeLineReader<javax.mail.Message>Exceptionpublic Long size()
ResourceAwareRealTimeLineReadersize in interface ResourceAwareRealTimeLineReader<javax.mail.Message>public Long getCurrentIndex()
ResourceAwareRealTimeLineReaderResourceAwareRealTimeLineReader.size() may factor in redundant rows also that maybe filtered by the reader if it uses some sort of filter.
 getCurrentIndex in interface ResourceAwareRealTimeLineReader<javax.mail.Message>public String getHost()
public void setHost(String host)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getFolderName()
public void setFolderName(String folderName)
public javax.mail.Folder getMailbox()
public void setMailbox(javax.mail.Folder mailbox)
public int getIndex()
public void setIndex(int index)
public int getSize()
public Properties getJavaMailProperties()
public void setJavaMailProperties(Properties javaMailProperties)
Copyright © 2018. All rights reserved.