org.apache.geronimo.mail
Class IMAPStoreGBean

java.lang.Object
  extended by org.apache.geronimo.mail.ProtocolGBean
      extended by org.apache.geronimo.mail.IMAPStoreGBean
All Implemented Interfaces:
GBeanLifecycle

public class IMAPStoreGBean
extends ProtocolGBean

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.

See Also:
MailGBean

Field Summary
static String GBEAN_APPEND_SIZE
           
static String GBEAN_FETCH_SIZE
           
static GBeanInfo GBEAN_INFO
           
static String GBEAN_LOGIN_DISABLE
           
static String GBEAN_PARTIAL_FETCH
           
static String GBEAN_PLAIN_DISABLE
           
static String GBEAN_POOL_SIZE
           
static String GBEAN_POOL_TIMEOUT
           
static String GBEAN_READONLY_SELECT
           
static String GBEAN_SASL_AUTHORIZATIONID
           
static String GBEAN_SASL_ENABLE
           
static String GBEAN_SASL_MECHANISMS
           
static String GBEAN_SEPARATE_STORE_CONNECTION
           
static String GBEAN_STARTTLS_ENABLE
           
static String GBEAN_STATUS_TIMEOUT
           
static String IMAP_APPEND_SIZE
           
static String IMAP_CONNECTION_TIMEOUT
           
static String IMAP_FACTORY_CLASS
           
static String IMAP_FACTORY_FALLBACK
           
static String IMAP_FACTORY_PORT
           
static String IMAP_FETCH_SIZE
           
static String IMAP_LOCALADDRESS
           
static String IMAP_LOCALHOST
           
static String IMAP_LOCALPORT
           
static String IMAP_LOGIN_DISABLE
           
static String IMAP_PARTIAL_FETCH
           
static String IMAP_PLAIN_DISABLE
           
static String IMAP_POOL_SIZE
           
static String IMAP_POOL_TIMEOUT
           
static String IMAP_PORT
           
static String IMAP_READONLY_SELECT
           
static String IMAP_SASL_AUTHORIZATIONID
           
static String IMAP_SASL_ENABLE
           
static String IMAP_SASL_MECHANISMS
           
static String IMAP_SEPARATE_STORE_CONNECTION
           
static String IMAP_STARTTLS_ENABLE
           
static String IMAP_STATUS_TIMEOUT
           
static String IMAP_TIMEOUT
           
 
Fields inherited from class org.apache.geronimo.mail.ProtocolGBean
GBEAN_ADD_OVERRIDES, GBEAN_AUTH, GBEAN_CONNECTION_TIMEOUT, GBEAN_FACTORY_CLASS, GBEAN_FACTORY_FALLBACK, GBEAN_FACTORY_PORT, GBEAN_FROM, GBEAN_HOST, GBEAN_LOCALADDRESS, GBEAN_LOCALHOST, GBEAN_LOCALPORT, GBEAN_OBJECTNAME, GBEAN_PORT, GBEAN_PROPERTIES, GBEAN_PROTOCOL, GBEAN_QUITWAIT, GBEAN_REALM, GBEAN_TIMEOUT, GBEAN_USER
 
Constructor Summary
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.

 
Method Summary
 void addOverrides(Properties props)
          Add the overrides from the member variables to the properties file.
 void doFail()
          Fails the GBean.
 void doStart()
          Starts the GBean.
 void doStop()
          Stops the target.
 Boolean getAllowReadOnlySelect()
          Returns the flag to indicate whether SELECT commands are read-only.
 Integer getAppendBufferSize()
          Returns the maximum size of a message to buffer in memory when appending to an IMAP folder.
 Boolean getAuthLoginDisable()
          Returns the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command.
 Boolean getAuthPlainDisable()
          Returns the flag that prevents use of the AUTHENTICATE PLAIN command.
 Integer getConnectionPoolSize()
          Returns the maximum number of available connections in the connection pool.
 Integer getConnectionPoolTimeout()
          Returns the timeout value in milliseconds for connection pool connections.
 Integer getConnectionTimeout()
          Returns the socket connection timeout value in milliseconds.
 Integer getFetchSize()
          Returns the partial fetch size in bytes.
static GBeanInfo getGBeanInfo()
           
 String getLocaladdress()
          Returns the local address (host name) to bind to when creating the IMAP socket.
 Integer getLocalport()
          Returns the local port number to bind to when creating the IMAP socket.
 Boolean getPartialFetch()
          Returns whether the IMAP partial-fetch capability should be used.
 Integer getPort()
          Returns the IMAP server port to connect to, if the connect() method doesn't explicitly specify one.
 String getSaslAuthorizationId()
          Returns the authorization ID to use in the SASL authentication.
 Boolean getSaslEnable()
          Returns the flag that enables an attempt to use the javax.security.sasl package to choose an authentication mechanism for login.
 String getSaslMechanisms()
          Returns a space or comma separated list of SASL mechanism names to try to use.
 Boolean getSeparateStoreConnection()
          Returns the flag to indicate whether to use a dedicated store connection for store commands.
 String getSocketFactoryClass()
          Returns the class that will be used to create IMAP sockets.
 Boolean getSocketFactoryFallback()
          Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created.
 Integer getSocketFactoryPort()
          Returns the port to connect to when using the specified socket factory.
 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.
 Integer getStatusCacheTimeout()
          Returns the timeout value in milliseconds for cache of STATUS command response.
 Integer getTimeout()
          Returns the socket I/O timeout value in milliseconds.
 void setAllowReadOnlySelect(Boolean allowReadOnlySelect)
          Sets the flag to indicate whether SELECT commands are read-only.
 void setAppendBufferSize(Integer appendBufferSize)
          Sets the maximum size of a message to buffer in memory when appending to an IMAP folder.
 void setAuthLoginDisable(Boolean authLoginDisable)
          Sets the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command.
 void setAuthPlainDisable(Boolean authPlainDisable)
          Sets the flag that prevents use of the AUTHENTICATE PLAIN command.
 void setConnectionPoolSize(Integer connectionPoolSize)
          Sets the maximum number of available connections in the connection pool.
 void setConnectionPoolTimeout(Integer connectionPoolTimeout)
          Sets the timeout value in milliseconds for connection pool connections

Default is 45000 (45 seconds).

 void setConnectionTimeout(Integer connectionTimeout)
          Sets the socket connection timeout value in milliseconds.
 void setFetchSize(Integer fetchSize)
          Sets the partial fetch size in bytes

Defaults to 16K.

 void setLocaladdress(String localaddress)
          Sets the local address (host name) to bind to when creating the IMAP socket.
 void setLocalport(Integer localport)
          Sets the local port number to bind to when creating the IMAP socket.
 void setPartialFetch(Boolean partialFetch)
          Sets whether the IMAP partial-fetch capability should be used.
 void setPort(Integer port)
          Sets the IMAP server port to connect to, if the connect() method doesn't explicitly specify one.
 void setSaslAuthorizationId(String saslAuthorizationId)
          Sets the authorization ID to use in the SASL authentication.
 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.
 void setSaslMechanisms(String saslMechanisms)
          Sets a space or comma separated list of SASL mechanism names to try to use.
 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.

 void setSocketFactoryClass(String socketFactoryClass)
          Sets the class that will be used to create SMTP sockets.
 void setSocketFactoryFallback(Boolean socketFactoryFallback)
          Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created.
 void setSocketFactoryPort(Integer socketFactoryPort)
          Sets the port to connect to when using the specified socket factory.
 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.
 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.

 void setTimeout(Integer timeout)
          Sets the socket I/O timeout value in milliseconds.
 
Methods inherited from class org.apache.geronimo.mail.ProtocolGBean
getHost, getObjectName, getProperties, getProtocol, getUser, setHost, setProperties, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAP_PORT

public static final String IMAP_PORT
See Also:
Constant Field Values

IMAP_CONNECTION_TIMEOUT

public static final String IMAP_CONNECTION_TIMEOUT
See Also:
Constant Field Values

IMAP_TIMEOUT

public static final String IMAP_TIMEOUT
See Also:
Constant Field Values

IMAP_FACTORY_CLASS

public static final String IMAP_FACTORY_CLASS
See Also:
Constant Field Values

IMAP_FACTORY_FALLBACK

public static final String IMAP_FACTORY_FALLBACK
See Also:
Constant Field Values

IMAP_FACTORY_PORT

public static final String IMAP_FACTORY_PORT
See Also:
Constant Field Values

IMAP_LOCALHOST

public static final String IMAP_LOCALHOST
See Also:
Constant Field Values

IMAP_LOCALADDRESS

public static final String IMAP_LOCALADDRESS
See Also:
Constant Field Values

IMAP_LOCALPORT

public static final String IMAP_LOCALPORT
See Also:
Constant Field Values

IMAP_PARTIAL_FETCH

public static final String IMAP_PARTIAL_FETCH
See Also:
Constant Field Values

IMAP_FETCH_SIZE

public static final String IMAP_FETCH_SIZE
See Also:
Constant Field Values

IMAP_STATUS_TIMEOUT

public static final String IMAP_STATUS_TIMEOUT
See Also:
Constant Field Values

IMAP_APPEND_SIZE

public static final String IMAP_APPEND_SIZE
See Also:
Constant Field Values

IMAP_POOL_SIZE

public static final String IMAP_POOL_SIZE
See Also:
Constant Field Values

IMAP_POOL_TIMEOUT

public static final String IMAP_POOL_TIMEOUT
See Also:
Constant Field Values

IMAP_SEPARATE_STORE_CONNECTION

public static final String IMAP_SEPARATE_STORE_CONNECTION
See Also:
Constant Field Values

IMAP_READONLY_SELECT

public static final String IMAP_READONLY_SELECT
See Also:
Constant Field Values

IMAP_LOGIN_DISABLE

public static final String IMAP_LOGIN_DISABLE
See Also:
Constant Field Values

IMAP_PLAIN_DISABLE

public static final String IMAP_PLAIN_DISABLE
See Also:
Constant Field Values

IMAP_STARTTLS_ENABLE

public static final String IMAP_STARTTLS_ENABLE
See Also:
Constant Field Values

IMAP_SASL_ENABLE

public static final String IMAP_SASL_ENABLE
See Also:
Constant Field Values

IMAP_SASL_MECHANISMS

public static final String IMAP_SASL_MECHANISMS
See Also:
Constant Field Values

IMAP_SASL_AUTHORIZATIONID

public static final String IMAP_SASL_AUTHORIZATIONID
See Also:
Constant Field Values

GBEAN_PARTIAL_FETCH

public static final String GBEAN_PARTIAL_FETCH
See Also:
Constant Field Values

GBEAN_FETCH_SIZE

public static final String GBEAN_FETCH_SIZE
See Also:
Constant Field Values

GBEAN_STATUS_TIMEOUT

public static final String GBEAN_STATUS_TIMEOUT
See Also:
Constant Field Values

GBEAN_APPEND_SIZE

public static final String GBEAN_APPEND_SIZE
See Also:
Constant Field Values

GBEAN_POOL_SIZE

public static final String GBEAN_POOL_SIZE
See Also:
Constant Field Values

GBEAN_POOL_TIMEOUT

public static final String GBEAN_POOL_TIMEOUT
See Also:
Constant Field Values

GBEAN_SEPARATE_STORE_CONNECTION

public static final String GBEAN_SEPARATE_STORE_CONNECTION
See Also:
Constant Field Values

GBEAN_READONLY_SELECT

public static final String GBEAN_READONLY_SELECT
See Also:
Constant Field Values

GBEAN_LOGIN_DISABLE

public static final String GBEAN_LOGIN_DISABLE
See Also:
Constant Field Values

GBEAN_PLAIN_DISABLE

public static final String GBEAN_PLAIN_DISABLE
See Also:
Constant Field Values

GBEAN_STARTTLS_ENABLE

public static final String GBEAN_STARTTLS_ENABLE
See Also:
Constant Field Values

GBEAN_SASL_ENABLE

public static final String GBEAN_SASL_ENABLE
See Also:
Constant Field Values

GBEAN_SASL_MECHANISMS

public static final String GBEAN_SASL_MECHANISMS
See Also:
Constant Field Values

GBEAN_SASL_AUTHORIZATIONID

public static final String GBEAN_SASL_AUTHORIZATIONID
See Also:
Constant Field Values

GBEAN_INFO

public static final GBeanInfo GBEAN_INFO
Constructor Detail

IMAPStoreGBean

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 Detail

getPort

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


setPort

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.

Parameters:
port - the IMAP server port to connect to, if the connect() method doesn't explicitly specify one

getPartialFetch

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.


setPartialFetch

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.

Parameters:
partialFetch - whether the IMAP partial-fetch capability should be used

getFetchSize

public Integer getFetchSize()
Returns the partial fetch size in bytes.

Defaults to 16K.


setFetchSize

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.

Parameters:
fetchSize - the partial fetch size in bytes

getConnectionTimeout

public Integer getConnectionTimeout()
Returns the socket connection timeout value in milliseconds.


setConnectionTimeout

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.

Parameters:
connectionTimeout - the socket connection timeout value in milliseconds.

getTimeout

public Integer getTimeout()
Returns the socket I/O timeout value in milliseconds.


setTimeout

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.

Parameters:
timeout - the socket I/O timeout value in milliseconds

getStatusCacheTimeout

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.


setStatusCacheTimeout

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.

Parameters:
statusCacheTimeout - the timeout value in milliseconds for cache of STATUS command response

getAppendBufferSize

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).


setAppendBufferSize

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.

Parameters:
appendBufferSize - the maximum size of a message to buffer in memory when appending to an IMAP folder

getConnectionPoolSize

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

Default is 1.


setConnectionPoolSize

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.

Parameters:
connectionPoolSize - the maximum number of available connections in the connection pool

getConnectionPoolTimeout

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

Default is 45000 (45 seconds).


setConnectionPoolTimeout

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.

Parameters:
connectionPoolTimeout - the timeout value in milliseconds for connection pool connections

getSeparateStoreConnection

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.


setSeparateStoreConnection

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.

Parameters:
separateStoreConnection - the flag to indicate whether to use a dedicated store connection for store commands

getAllowReadOnlySelect

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.


setAllowReadOnlySelect

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.

Parameters:
allowReadOnlySelect - the flag to indicate whether SELECT commands are read-only

getAuthLoginDisable

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.


setAuthLoginDisable

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.

Parameters:
authLoginDisable - the flag that prevents use of the non-standard AUTHENTICATE LOGIN command, instead using the plain LOGIN command

getAuthPlainDisable

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

Default is false.


setAuthPlainDisable

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.

Parameters:
authPlainDisable - the flag that prevents use of the AUTHENTICATE PLAIN command

getStartTLSEnable

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.


setStartTLSEnable

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.

Parameters:
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

getLocaladdress

public String getLocaladdress()
Returns the local address (host name) to bind to when creating the IMAP socket.


setLocaladdress

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.

Parameters:
localaddress - the local address (host name) to bind to when creating the IMAP socket

getLocalport

public Integer getLocalport()
Returns the local port number to bind to when creating the IMAP socket.


setLocalport

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.

Parameters:
localport - the local port number to bind to when creating the IMAP socket

getSaslEnable

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.


setSaslEnable

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.

Parameters:
saslEnable - the flag that enables an attempt to use the javax.security.sasl package to choose an authentication mechanism for login

getSaslMechanisms

public String getSaslMechanisms()
Returns a space or comma separated list of SASL mechanism names to try to use.


setSaslMechanisms

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.

Parameters:
saslMechanisms - a space or comma separated list of SASL mechanism names to try to use

getSaslAuthorizationId

public String getSaslAuthorizationId()
Returns the authorization ID to use in the SASL authentication.

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


setSaslAuthorizationId

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.

Parameters:
saslAuthorizationId - the authorization ID to use in the SASL authentication

getSocketFactoryClass

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.


setSocketFactoryClass

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.

Parameters:
socketFactoryClass - the class that will be used to create SMTP sockets

getSocketFactoryFallback

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.


setSocketFactoryFallback

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.

Parameters:
socketFactoryFallback - whether java.net.Socket class will be created if the specified socket factory class cannot be created

getSocketFactoryPort

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.


setSocketFactoryPort

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.

Parameters:
socketFactoryPort - the port to connect to when using the specified socket factory

addOverrides

public void addOverrides(Properties props)
Add the overrides from the member variables to the properties file.

Overrides:
addOverrides in class ProtocolGBean

doStart

public void doStart()
             throws Exception
Description copied from interface: GBeanLifecycle
Starts the GBean. This informs the GBean that it is about to transition to the running state.

Specified by:
doStart in interface GBeanLifecycle
Overrides:
doStart in class ProtocolGBean
Throws:
Exception - if the target failed to start; this will cause a transition to the failed state

doStop

public void doStop()
            throws Exception
Description copied from interface: GBeanLifecycle
Stops the target. This informs the GBean that it is about to transition to the stopped state.

Specified by:
doStop in interface GBeanLifecycle
Overrides:
doStop in class ProtocolGBean
Throws:
Exception - if the target failed to stop; this will cause a transition to the failed state

doFail

public void doFail()
Description copied from interface: GBeanLifecycle
Fails the GBean. This informs the GBean that it is about to transition to the failed state.

Specified by:
doFail in interface GBeanLifecycle
Overrides:
doFail in class ProtocolGBean

getGBeanInfo

public static GBeanInfo getGBeanInfo()


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.