| java.lang.Object org.apache.geronimo.mail.MailGBean
MailGBean | public class MailGBean implements GBeanLifecycle,JavaMailResource,ResourceSource(Code) | | 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.
version: $Rev: 607943 $ $Date: 2008-01-01 15:07:17 -0800 (Tue, 01 Jan 2008) $ See Also: ProtocolGBean See Also: SMTPTransportGBean See Also: POP3StoreGBean See Also: IMAPStoreGBean |
Field Summary | |
final public static GBeanInfo | GBEAN_INFO |
Constructor Summary | |
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. |
Method Summary | |
public Object | $getResource() | public void | doFail() | public void | doStart() | public void | doStop() | public Authenticator | getAuthenticator() Returns the authenticator object.
Used only if a new Session object is created. | 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. | public String | getJndiName() | public String | getObjectName() | public Properties | getProperties() Returns the set of default properties for the protocols. | 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. | public String | getTransportProtocol() Returns the transport protocol that Sessions created from this GBean will return.
Specifies the default Transport Protocol. | 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. | 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. | public void | setDebug(Boolean debug) Sets the debug setting for Sessions created from this GBean. | public void | setHost(String host) Sets the default Mail server.
Specifies the default Mail server. | public void | setJndiName(String jndiName) | public void | setProperties(Properties properties) Sets the set of default properties for the protocols. | public void | setStoreProtocol(String storeProtocol) Sets the store protocol that Sessions created from this GBean will return.
Specifies the default Message Access Protocol. | public void | setTransportProtocol(String transportProtocol) Sets the transport protocol that Sessions created from this GBean will return.
Specifies the default Transport Protocol. | public void | setUseDefault(Boolean useDefault) | 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. |
GBEAN_INFO | final public static GBeanInfo GBEAN_INFO(Code) | | |
MailGBean | public MailGBean(String objectName, Collection protocols, Boolean useDefault, Properties properties, Authenticator authenticator, String storeProtocol, String transportProtocol, String host, String user, Boolean debug, String jndiName)(Code) | | 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 Parameters: useDefault - whether this GBean will return default Sessions or not Parameters: properties - the set of default properties for the protocols Parameters: authenticator - the authenticator object Parameters: storeProtocol - the store protocol that Sessions created from this GBean will return Parameters: transportProtocol - the transport protocol that Sessions created from this GBean will return Parameters: host - the default Mail server Parameters: user - the username to provide when connecting to a Mail server Parameters: debug - the debug setting for Sessions created from this GBean Parameters: jndiName - the JNDI name to which the mail Session should be bound |
doFail | public void doFail()(Code) | | |
getAuthenticator | public Authenticator getAuthenticator()(Code) | | Returns the authenticator object.
Used only if a new Session object is created. Otherwise, it must match
the Authenticator used to create the Session.
|
getDebug | public Boolean getDebug()(Code) | | Returns the debug setting for Sessions created from this GBean.
|
getGBeanInfo | public static GBeanInfo getGBeanInfo()(Code) | | |
getHost | public String getHost()(Code) | | 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.
|
getJndiName | public String getJndiName()(Code) | | Gets the JNDI name to which the mail Session should be bound
the JNDI name to which the mail Session should be bound |
getObjectName | public String getObjectName()(Code) | | Returns the GBean name of this Mail GBean
|
getProperties | public Properties getProperties()(Code) | | 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.
|
getProtocols | public Collection getProtocols()(Code) | | Returns the set of protocol GBeans that contain protocol specific configurations.
|
getStoreProtocol | public String getStoreProtocol()(Code) | | 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.
|
getTransportProtocol | public String getTransportProtocol()(Code) | | 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.
|
getUseDefault | public Boolean getUseDefault()(Code) | | Returns whether this GBean will return default Sessions or not.
|
getUser | public String getUser()(Code) | | 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.
|
isEventProvider | public boolean isEventProvider()(Code) | | |
isStateManageable | public boolean isStateManageable()(Code) | | |
isStatisticsProvider | public boolean isStatisticsProvider()(Code) | | |
setAuthenticator | public void setAuthenticator(Authenticator authenticator)(Code) | | Sets the authenticator object.
Used only if a new Session object is created. Otherwise, it must match
the Authenticator used to create the Session.
Parameters: authenticator - the authenticator object |
setDebug | public void setDebug(Boolean debug)(Code) | | 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.
Parameters: debug - the debug setting for Sessions created from this GBean |
setHost | public void setHost(String host)(Code) | | 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.
Parameters: host - the default Mail server |
setJndiName | public void setJndiName(String jndiName)(Code) | | Sets the JNDI name to which the mail Session should be bound
Parameters: jndiName - the JNDI name to which the mail Session should be bound |
setProperties | public void setProperties(Properties properties)(Code) | | 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.
Parameters: properties - the set of default properties for the protocols |
setStoreProtocol | public void setStoreProtocol(String storeProtocol)(Code) | | 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.
Parameters: storeProtocol - the store protocol that Sessions created from this GBean will return |
setTransportProtocol | public void setTransportProtocol(String transportProtocol)(Code) | | 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.
Parameters: transportProtocol - the transport protocol that Sessions created from this GBean will return |
setUseDefault | public void setUseDefault(Boolean useDefault)(Code) | | Sets whether this GBean will return default Sessions or not,
Parameters: useDefault - whether this GBean will return default Sessions or not |
setUser | public void setUser(String user)(Code) | | 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.
Parameters: user - the username to provide when connecting to a Mail server |
|
|