org.apache.geronimo.javamail.store.imap.connection
Class IMAPFetchResponse

java.lang.Object
  extended by org.apache.geronimo.javamail.store.imap.connection.IMAPResponse
      extended by org.apache.geronimo.javamail.store.imap.connection.IMAPUntaggedResponse
          extended by org.apache.geronimo.javamail.store.imap.connection.IMAPFetchResponse

public class IMAPFetchResponse
extends IMAPUntaggedResponse

Util class to represent a composite FETCH response from an IMAP server. The response may have information about multiple message dataItems.

Version:
$Rev: 594520 $ $Date: 2007-11-13 07:57:39 -0500 (Tue, 13 Nov 2007) $

Field Summary
protected  List dataItems
           
 int sequenceNumber
           
 
Fields inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPUntaggedResponse
keyword
 
Fields inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPResponse
response
 
Constructor Summary
IMAPFetchResponse(int sequenceNumber, byte[] data, IMAPResponseTokenizer source)
           
 
Method Summary
 int getCount()
          Get the section count.
 IMAPFetchDataItem getDataItem(int type)
          Fetch a particular response type from the response dataItems.
 List getDataItems()
          Get the complete set of response dataItems.
 int getSequenceNumber()
          Retrieve the sequence number for the FETCH item.
 
Methods inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPUntaggedResponse
getKeyword, isKeyword
 
Methods inherited from class org.apache.geronimo.javamail.store.imap.connection.IMAPResponse
getResponseData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataItems

protected List dataItems

sequenceNumber

public int sequenceNumber
Constructor Detail

IMAPFetchResponse

public IMAPFetchResponse(int sequenceNumber,
                         byte[] data,
                         IMAPResponseTokenizer source)
                  throws MessagingException
Throws:
MessagingException
Method Detail

getSequenceNumber

public int getSequenceNumber()
Retrieve the sequence number for the FETCH item.

Returns:
The message sequence number this FETCH applies to.

getCount

public int getCount()
Get the section count.

Returns:
The number of sections in the response.

getDataItems

public List getDataItems()
Get the complete set of response dataItems.

Returns:
The List of IMAPFetchResponse values.

getDataItem

public IMAPFetchDataItem getDataItem(int type)
Fetch a particular response type from the response dataItems.

Parameters:
type - The target FETCH type.
Returns:
The first IMAPFetchDataItem item that matches the response type.


Copyright © 2003-2009 The Apache Software Foundation. All Rights Reserved.