Home » geronimo-2.2-source-release » org.apache.geronimo.mail » [javadoc | source]
org.apache.geronimo.mail
public class: IMAPStoreGBean [javadoc | source]
java.lang.Object
   org.apache.geronimo.mail.ProtocolGBean
      org.apache.geronimo.mail.IMAPStoreGBean

All Implemented Interfaces:
    GBeanLifecycle

A GBean that provides for the configuration of a JavaMail IMAP message store protocol.

IMAP store properties that are common to all IMAP stores are provided via member variables of this class. Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.

Field Summary
public static final  String IMAP_PORT     
public static final  String IMAP_CONNECTION_TIMEOUT     
public static final  String IMAP_TIMEOUT     
public static final  String IMAP_FACTORY_CLASS     
public static final  String IMAP_FACTORY_FALLBACK     
public static final  String IMAP_FACTORY_PORT     
public static final  String IMAP_LOCALHOST     
public static final  String IMAP_LOCALADDRESS     
public static final  String IMAP_LOCALPORT     
public static final  String IMAP_PARTIAL_FETCH     
public static final  String IMAP_FETCH_SIZE     
public static final  String IMAP_STATUS_TIMEOUT     
public static final  String IMAP_APPEND_SIZE     
public static final  String IMAP_POOL_SIZE     
public static final  String IMAP_POOL_TIMEOUT     
public static final  String IMAP_SEPARATE_STORE_CONNECTION     
public static final  String IMAP_READONLY_SELECT     
public static final  String IMAP_LOGIN_DISABLE     
public static final  String IMAP_PLAIN_DISABLE     
public static final  String IMAP_STARTTLS_ENABLE     
public static final  String IMAP_SASL_ENABLE     
public static final  String IMAP_SASL_MECHANISMS     
public static final  String IMAP_SASL_AUTHORIZATIONID     
public static final  String GBEAN_PARTIAL_FETCH     
public static final  String GBEAN_FETCH_SIZE     
public static final  String GBEAN_STATUS_TIMEOUT     
public static final  String GBEAN_APPEND_SIZE     
public static final  String GBEAN_POOL_SIZE     
public static final  String GBEAN_POOL_TIMEOUT     
public static final  String GBEAN_SEPARATE_STORE_CONNECTION     
public static final  String GBEAN_READONLY_SELECT     
public static final  String GBEAN_LOGIN_DISABLE     
public static final  String GBEAN_PLAIN_DISABLE     
public static final  String GBEAN_STARTTLS_ENABLE     
public static final  String GBEAN_SASL_ENABLE     
public static final  String GBEAN_SASL_MECHANISMS     
public static final  String GBEAN_SASL_AUTHORIZATIONID     
public static final  GBeanInfo GBEAN_INFO     
Fields inherited from org.apache.geronimo.mail.ProtocolGBean:
GBEAN_OBJECTNAME,  GBEAN_PROTOCOL,  GBEAN_PROPERTIES,  GBEAN_HOST,  GBEAN_USER,  GBEAN_ADD_OVERRIDES,  GBEAN_PORT,  GBEAN_CONNECTION_TIMEOUT,  GBEAN_TIMEOUT,  GBEAN_FROM,  GBEAN_AUTH,  GBEAN_REALM,  GBEAN_QUITWAIT,  GBEAN_FACTORY_CLASS,  GBEAN_FACTORY_FALLBACK,  GBEAN_FACTORY_PORT,  GBEAN_LOCALHOST,  GBEAN_LOCALADDRESS,  GBEAN_LOCALPORT,  GBEAN_INFO
Constructor:
 public IMAPStoreGBean(String objectName,
    Properties properties,
    String host,
    String user,
    Integer port,
    Boolean partialFetch,
    Integer fetchSize,
    Integer connectionTimeout,
    Integer timeout,
    Integer statusCacheTimeout,
    Integer appendBufferSize,
    Integer connectionPoolSize,
    Integer connectionPoolTimeout,
    Boolean separateStoreConnection,
    Boolean allowReadOnlySelect,
    Boolean authLoginDisable,
    Boolean authPlainDisable,
    Boolean startTLSEnable,
    String localaddress,
    Integer localport,
    Boolean saslEnable,
    String saslMechanisms,
    String saslAuthorizationId,
    String socketFactoryClass,
    Boolean socketFactoryFallback,
    Integer socketFactoryPort) 
    Construct an instance of IMAPStoreGBean

    Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.

    Parameters:
    objectName - the object name of the protocol
    properties - the set of default properties for the protocol
    host - the host the protocol connects to
    user - the default name for the protocol
    port - the IMAP server port
    partialFetch - whether the IMAP partial-fetch capability should be used
    fetchSize - the partial fetch size in bytes
    connectionTimeout - the socket connection timeout value in milliseconds
    timeout - the socket I/O timeout value in milliseconds
    statusCacheTimeout - the timeout value in milliseconds for cache of STATUS command response
    appendBufferSize - the maximum size of a message to buffer in memory when appending to an IMAP folder
    connectionPoolSize - the maximum number of available connections in the connection pool
    connectionPoolTimeout - the timeout value in milliseconds for connection pool connections
    separateStoreConnection - the flag to indicate whether to use a dedicated store connection for store commands
    allowReadOnlySelect - the flag to indicate whether SELECT commands are read-only
    authLoginDisable - the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command
    authPlainDisable - the flag that prevents use of the AUTHENTICATE PLAIN command
    startTLSEnable - the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands
    localaddress - the local address (host name) to bind to when creating the IMAP socket
    localport - the local port number to bind to when creating the IMAP socket
    saslEnable - the flag that enables an attempt to use the javax.security.sasl package to choose an authentication mechanism for login
    saslMechanisms - a space or comma separated list of SASL mechanism names to try to use
    saslAuthorizationId - the authorization ID to use in the SASL authentication
    socketFactoryClass - the class that will be used to create IMAP sockets
    socketFactoryFallback - whether java.net.Socket class will be created if the specified socket factory class cannot be created
    socketFactoryPort - whether java.net.Socket class will be created if the specified socket factory class cannot be created
Method from org.apache.geronimo.mail.IMAPStoreGBean Summary:
addOverrides,   doFail,   doStart,   doStop,   getAllowReadOnlySelect,   getAppendBufferSize,   getAuthLoginDisable,   getAuthPlainDisable,   getConnectionPoolSize,   getConnectionPoolTimeout,   getConnectionTimeout,   getFetchSize,   getGBeanInfo,   getLocaladdress,   getLocalport,   getPartialFetch,   getPort,   getSaslAuthorizationId,   getSaslEnable,   getSaslMechanisms,   getSeparateStoreConnection,   getSocketFactoryClass,   getSocketFactoryFallback,   getSocketFactoryPort,   getStartTLSEnable,   getStatusCacheTimeout,   getTimeout,   setAllowReadOnlySelect,   setAppendBufferSize,   setAuthLoginDisable,   setAuthPlainDisable,   setConnectionPoolSize,   setConnectionPoolTimeout,   setConnectionTimeout,   setFetchSize,   setLocaladdress,   setLocalport,   setPartialFetch,   setPort,   setSaslAuthorizationId,   setSaslEnable,   setSaslMechanisms,   setSeparateStoreConnection,   setSocketFactoryClass,   setSocketFactoryFallback,   setSocketFactoryPort,   setStartTLSEnable,   setStatusCacheTimeout,   setTimeout
Methods from org.apache.geronimo.mail.ProtocolGBean:
addOverrides,   doFail,   doStart,   doStop,   getGBeanInfo,   getHost,   getObjectName,   getProperties,   getProtocol,   getUser,   setHost,   setProperties,   setUser
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.mail.IMAPStoreGBean Detail:
 public  void addOverrides(Properties props) 
    Add the overrides from the member variables to the properties file.
 public  void doFail() 
 public  void doStart() throws Exception 
 public  void doStop() throws Exception 
 public Boolean getAllowReadOnlySelect() 
    Returns the flag to indicate whether SELECT commands are read-only.

    If false, attempts to open a folder read/write will fail if the SELECT command succeeds but indicates that the folder is READ-ONLY. This sometimes indicates that the folder contents can'tbe changed, but the flags are per-user and can be changed, such as might be the case for public shared folders. If true, such open attempts will succeed, allowing the flags to be changed. The getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified Folder.READ_WRITE. Default is false.

 public Integer getAppendBufferSize() 
    Returns the maximum size of a message to buffer in memory when appending to an IMAP folder.

    Maximum size of a message to buffer in memory when appending to an IMAP folder. If not set, or set to -1, there is no maximum and all messages are buffered. If set to 0, no messages are buffered. If set to (e.g.) 8192, messages of 8K bytes or less are buffered, larger messages are not buffered. Buffering saves cpu time at the expense of short term memory usage. If you commonly append very large messages to IMAP mailboxes you might want to set this to a moderate value (1M or less).

 public Boolean getAuthLoginDisable() 
    Returns the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command.

    Default is false.

 public Boolean getAuthPlainDisable() 
    Returns the flag that prevents use of the AUTHENTICATE PLAIN command.

    Default is false.

 public Integer getConnectionPoolSize() 
    Returns the maximum number of available connections in the connection pool.

    Default is 1.

 public Integer getConnectionPoolTimeout() 
    Returns the timeout value in milliseconds for connection pool connections.

    Default is 45000 (45 seconds).

 public Integer getConnectionTimeout() 
    Returns the socket connection timeout value in milliseconds.
 public Integer getFetchSize() 
    Returns the partial fetch size in bytes.

    Defaults to 16K.

 public static GBeanInfo getGBeanInfo() 
 public String getLocaladdress() 
    Returns the local address (host name) to bind to when creating the IMAP socket.
 public Integer getLocalport() 
    Returns the local port number to bind to when creating the IMAP socket.
 public Boolean getPartialFetch() 
    Returns whether the IMAP partial-fetch capability should be used.

    Controls whether the IMAP partial-fetch capability should be used. Defaults to true.

 public Integer getPort() 
    Returns the IMAP server port to connect to, if the connect() method doesn't explicitly specify one.
 public String getSaslAuthorizationId() 
    Returns the authorization ID to use in the SASL authentication.

    If not set, the authetication ID (user name) is used.

 public Boolean getSaslEnable() 
    Returns the flag that enables an attempt to use the javax.security.sasl package to choose an authentication mechanism for login.

    Defaults to false.

 public String getSaslMechanisms() 
    Returns a space or comma separated list of SASL mechanism names to try to use.
 public Boolean getSeparateStoreConnection() 
    Returns the flag to indicate whether to use a dedicated store connection for store commands.

    Flag to indicate whether to use a dedicated store connection for store commands. Default is false.

 public String getSocketFactoryClass() 
    Returns the class that will be used to create IMAP sockets.

    If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create IMAP sockets.

 public Boolean getSocketFactoryFallback() 
    Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created.

    If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.

 public Integer getSocketFactoryPort() 
    Returns the port to connect to when using the specified socket factory.

    Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.

 public Boolean getStartTLSEnable() 
    Returns the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

    If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is false.

 public Integer getStatusCacheTimeout() 
    Returns the timeout value in milliseconds for cache of STATUS command response.

    Timeout value in milliseconds for cache of STATUS command response. Default is 1000 (1 second). Zero disables cache.

 public Integer getTimeout() 
    Returns the socket I/O timeout value in milliseconds.
 public  void setAllowReadOnlySelect(Boolean allowReadOnlySelect) 
    Sets the flag to indicate whether SELECT commands are read-only.

    If false, attempts to open a folder read/write will fail if the SELECT command succeeds but indicates that the folder is READ-ONLY. This sometimes indicates that the folder contents can'tbe changed, but the flags are per-user and can be changed, such as might be the case for public shared folders. If true, such open attempts will succeed, allowing the flags to be changed. The getMode method on the Folder object will return Folder.READ_ONLY in this case even though the open method specified Folder.READ_WRITE. Default is false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setAppendBufferSize(Integer appendBufferSize) 
    Sets the maximum size of a message to buffer in memory when appending to an IMAP folder.

    Maximum size of a message to buffer in memory when appending to an IMAP folder. If not set, or set to -1, there is no maximum and all messages are buffered. If set to 0, no messages are buffered. If set to (e.g.) 8192, messages of 8K bytes or less are buffered, larger messages are not buffered. Buffering saves cpu time at the expense of short term memory usage. If you commonly append very large messages to IMAP mailboxes you might want to set this to a moderate value (1M or less).

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setAuthLoginDisable(Boolean authLoginDisable) 
    Sets the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command.

    Default is false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setAuthPlainDisable(Boolean authPlainDisable) 
    Sets the flag that prevents use of the AUTHENTICATE PLAIN command.

    Default is false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setConnectionPoolSize(Integer connectionPoolSize) 
    Sets the maximum number of available connections in the connection pool.

    Default is 1.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setConnectionPoolTimeout(Integer connectionPoolTimeout) 
    Sets the timeout value in milliseconds for connection pool connections

    Default is 45000 (45 seconds).

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setConnectionTimeout(Integer connectionTimeout) 
    Sets the socket connection timeout value in milliseconds.

    Default is infinite timeout.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setFetchSize(Integer fetchSize) 
    Sets the partial fetch size in bytes

    Defaults to 16K.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setLocaladdress(String localaddress) 
    Sets the local address (host name) to bind to when creating the IMAP socket.

    Local address (host name) to bind to when creating the IMAP socket. Defaults to the address picked by the Socket class. Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setLocalport(Integer localport) 
    Sets the local port number to bind to when creating the IMAP socket.

    Local port number to bind to when creating the IMAP socket. Defaults to the port number picked by the Socket class.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setPartialFetch(Boolean partialFetch) 
    Sets whether the IMAP partial-fetch capability should be used.

    Controls whether the IMAP partial-fetch capability should be used. Defaults to true.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setPort(Integer port) 
    Sets the IMAP server port to connect to, if the connect() method doesn't explicitly specify one.

    Defaults to 143.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSaslAuthorizationId(String saslAuthorizationId) 
    Sets the authorization ID to use in the SASL authentication.

    If not set, the authetication ID (user name) is used.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSaslEnable(Boolean saslEnable) 
    Sets the flag that enables an attempt to use the javax.security.sasl package to choose an authentication mechanism for login.

    Defaults to false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSaslMechanisms(String saslMechanisms) 
    Sets a space or comma separated list of SASL mechanism names to try to use.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSeparateStoreConnection(Boolean separateStoreConnection) 
    Sets the flag to indicate whether to use a dedicated store connection for store commands

    Flag to indicate whether to use a dedicated store connection for store commands. Default is false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSocketFactoryClass(String socketFactoryClass) 
    Sets the class that will be used to create SMTP sockets.

    If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSocketFactoryFallback(Boolean socketFactoryFallback) 
    Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created.

    If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setSocketFactoryPort(Integer socketFactoryPort) 
    Sets the port to connect to when using the specified socket factory.

    Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setStartTLSEnable(Boolean startTLSEnable) 
    Sets the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

    If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is false.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setStatusCacheTimeout(Integer statusCacheTimeout) 
    Sets the timeout value in milliseconds for cache of STATUS command response

    Timeout value in milliseconds for cache of STATUS command response. Default is 1000 (1 second). Zero disables cache.

    Values that are set here will override any of the corresponding value that has been set in the properties.

 public  void setTimeout(Integer timeout) 
    Sets the socket I/O timeout value in milliseconds.

    Default is infinite timeout.

    Values that are set here will override any of the corresponding value that has been set in the properties.