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

All Implemented Interfaces:
    ResourceSource, JavaMailResource, GBeanLifecycle

GBean that provides access to JavaMail Sessions.

This GBean is used to generate JavaMail Sessions. JavaMail properties that are common to all JavaMail Sessions are provided via member variables of this class.

Field Summary
public static final  GBeanInfo GBEAN_INFO     
Constructor:
 public MailGBean(String objectName,
    Collection protocols,
    Boolean useDefault,
    Properties properties,
    Authenticator authenticator,
    String storeProtocol,
    String transportProtocol,
    String host,
    String user,
    Boolean debug,
    String jndiName) 
    Construct an instance of MailGBean

    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:
    protocols - the set of protocol GBeans that contain protocol specific configurations
    useDefault - whether this GBean will return default Sessions or not
    properties - the set of default properties for the protocols
    authenticator - the authenticator object
    storeProtocol - the store protocol that Sessions created from this GBean will return
    transportProtocol - the transport protocol that Sessions created from this GBean will return
    host - the default Mail server
    user - the username to provide when connecting to a Mail server
    debug - the debug setting for Sessions created from this GBean
    jndiName - the JNDI name to which the mail Session should be bound
Method from org.apache.geronimo.mail.MailGBean Summary:
$getResource,   doFail,   doStart,   doStop,   getAuthenticator,   getDebug,   getGBeanInfo,   getHost,   getJndiName,   getObjectName,   getProperties,   getProtocols,   getStoreProtocol,   getTransportProtocol,   getUseDefault,   getUser,   isEventProvider,   isStateManageable,   isStatisticsProvider,   setAuthenticator,   setDebug,   setHost,   setJndiName,   setProperties,   setStoreProtocol,   setTransportProtocol,   setUseDefault,   setUser
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.mail.MailGBean Detail:
 public Object $getResource() 
 public  void doFail() 
 public  void doStart() throws Exception 
 public  void doStop() throws Exception 
 public Authenticator getAuthenticator() 
    Returns the authenticator object.

    Used only if a new Session object is created. Otherwise, it must match the Authenticator used to create the Session.

 public Boolean getDebug() 
    Returns the debug setting for Sessions created from this GBean.
 public static GBeanInfo getGBeanInfo() 
 public String getHost() 
    Returns the default Mail server.

    Specifies the default Mail server. The Store and Transport object’s connect methods use this property, if the protocolspecific host property is absent, to locate the target host.

 public String getJndiName() 
    Gets the JNDI name to which the mail Session should be bound
 public String getObjectName() 
    Returns the GBean name of this Mail GBean
 public Properties getProperties() 
    Returns the set of default properties for the protocols.

    Note: Proerties that are set here will override the properties that are set in the protocol GBeans.

 public Collection getProtocols() 
    Returns the set of protocol GBeans that contain protocol specific configurations.
 public String getStoreProtocol() 
    Returns the store protocol that Sessions created from this GBean will return.

    Specifies the default Message Access Protocol. The Session.getStore() method returns a Store object that implements this protocol. The client can override this property and explicitly specify the protocol with the Session.getStore(String protocol) method.

 public String getTransportProtocol() 
    Returns the transport protocol that Sessions created from this GBean will return.

    Specifies the default Transport Protocol. The Session.getTransport() method returns a Transport object that implements this protocol. The client can override this property and explicitly specify the protocol by using Session.getTransport(String protocol) method.

 public Boolean getUseDefault() 
    Returns whether this GBean will return default Sessions or not.
 public String getUser() 
    Returns the username to provide when connecting to a Mail server.

    Specifies the username to provide when connecting to a Mail server. The Store and Transport object’s connect methods use this property, if the protocolspecific username property is absent, to obtain the username.

 public boolean isEventProvider() 
 public boolean isStateManageable() 
 public boolean isStatisticsProvider() 
 public  void setAuthenticator(Authenticator authenticator) 
    Sets the authenticator object.

    Used only if a new Session object is created. Otherwise, it must match the Authenticator used to create the Session.

 public  void setDebug(Boolean debug) 
    Sets the debug setting for Sessions created from this GBean.

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

 public  void setHost(String host) 
    Sets the default Mail server.

    Specifies the default Mail server. The Store and Transport object’s connect methods use this property, if the protocolspecific host property is absent, to locate the target host.

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

 public  void setJndiName(String jndiName) 
    Sets the JNDI name to which the mail Session should be bound
 public  void setProperties(Properties properties) 
    Sets the set of default properties for the protocols.

    Note: Proerties that are set here will override the properties that are set in the protocol GBeans.

 public  void setStoreProtocol(String storeProtocol) 
    Sets the store protocol that Sessions created from this GBean will return.

    Specifies the default Message Access Protocol. The Session.getStore() method returns a Store object that implements this protocol. The client can override this property and explicitly specify the protocol with the Session.getStore(String protocol) method.

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

 public  void setTransportProtocol(String transportProtocol) 
    Sets the transport protocol that Sessions created from this GBean will return.

    Specifies the default Transport Protocol. The Session.getTransport() method returns a Transport object that implements this protocol. The client can override this property and explicitly specify the protocol by using Session.getTransport(String protocol) method.

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

 public  void setUseDefault(Boolean useDefault) 
    Sets whether this GBean will return default Sessions or not,
 public  void setUser(String user) 
    Sets the username to provide when connecting to a Mail server.

    Specifies the username to provide when connecting to a Mail server. The Store and Transport object’s connect methods use this property, if the protocolspecific username property is absent, to obtain the username.

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