javax.mail
Class FetchProfile

java.lang.Object
  extended by javax.mail.FetchProfile

public class FetchProfile
extends Object

A FetchProfile defines a list of message attributes that a client wishes to prefetch from the server during a fetch operation. Clients can either specify individual headers, or can reference common profiles as defined by FetchProfile.Item.

Version:
$Rev: 582797 $ $Date: 2007-10-08 08:29:12 -0400 (Mon, 08 Oct 2007) $

Nested Class Summary
static class FetchProfile.Item
          Inner class that defines sets of headers that are commonly bundled together in a FetchProfile.
 
Constructor Summary
FetchProfile()
           
 
Method Summary
 void add(FetchProfile.Item item)
          Add a predefined profile of headers.
 void add(String header)
          Add a specific header.
 boolean contains(FetchProfile.Item item)
          Determine if the given profile item is already included.
 boolean contains(String header)
          Determine if the specified header is already included.
 String[] getHeaderNames()
          Get the headers that have already been included.
 FetchProfile.Item[] getItems()
          Get the profile items already included.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FetchProfile

public FetchProfile()
Method Detail

add

public void add(FetchProfile.Item item)
Add a predefined profile of headers.

Parameters:
item - the profile to add

add

public void add(String header)
Add a specific header.

Parameters:
header - the header whose value should be prefetched

contains

public boolean contains(FetchProfile.Item item)
Determine if the given profile item is already included.

Parameters:
item - the profile to check for
Returns:
true if the profile item is already included

contains

public boolean contains(String header)
Determine if the specified header is already included.

Parameters:
header - the header to check for
Returns:
true if the header is already included

getItems

public FetchProfile.Item[] getItems()
Get the profile items already included.

Returns:
the items already added to this profile

getHeaderNames

public String[] getHeaderNames()
Get the headers that have already been included.

Returns:
the headers already added to this profile


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