|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.geronimo.mail.MailGBean
public class MailGBean
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.
ProtocolGBean
,
SMTPTransportGBean
,
POP3StoreGBean
,
IMAPStoreGBean
Field Summary | |
---|---|
static GBeanInfo |
GBEAN_INFO
|
Constructor Summary | |
---|---|
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 | |
---|---|
Object |
$getResource()
|
void |
doFail()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
Authenticator |
getAuthenticator()
Returns the authenticator object. |
Boolean |
getDebug()
Returns the debug setting for Sessions created from this GBean. |
static GBeanInfo |
getGBeanInfo()
|
String |
getHost()
Returns the default Mail server. |
String |
getJndiName()
Gets the JNDI name to which the mail Session should be bound |
String |
getObjectName()
Returns the GBean name of this Mail GBean |
Properties |
getProperties()
Returns the set of default properties for the protocols. |
Collection |
getProtocols()
Returns the set of protocol GBeans that contain protocol specific configurations. |
String |
getStoreProtocol()
Returns the store protocol that Sessions created from this GBean will return. |
String |
getTransportProtocol()
Returns the transport protocol that Sessions created from this GBean will return. |
Boolean |
getUseDefault()
Returns whether this GBean will return default Sessions or not. |
String |
getUser()
Returns the username to provide when connecting to a Mail server. |
boolean |
isEventProvider()
Determines if this object implemnts the event provider type defined in the J2EE Management specification. |
boolean |
isStateManageable()
Determines if this object implements the state manageable type defined in the J2EE Management specification. |
boolean |
isStatisticsProvider()
Determines if this object implemnts the statistics provider type defined in the J2EE Management specification. |
void |
setAuthenticator(Authenticator authenticator)
Sets the authenticator object. |
void |
setDebug(Boolean debug)
Sets the debug setting for Sessions created from this GBean. |
void |
setHost(String host)
Sets the default Mail server. |
void |
setJndiName(String jndiName)
Sets the JNDI name to which the mail Session should be bound |
void |
setProperties(Properties properties)
Sets the set of default properties for the protocols. |
void |
setStoreProtocol(String storeProtocol)
Sets the store protocol that Sessions created from this GBean will return. |
void |
setTransportProtocol(String transportProtocol)
Sets the transport protocol that Sessions created from this GBean will return. |
void |
setUseDefault(Boolean useDefault)
Sets whether this GBean will return default Sessions or not, |
void |
setUser(String user)
Sets the username to provide when connecting to a Mail server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GBeanInfo GBEAN_INFO
Constructor Detail |
---|
public MailGBean(String objectName, Collection protocols, Boolean useDefault, Properties properties, Authenticator authenticator, String storeProtocol, String transportProtocol, String host, String user, Boolean debug, String jndiName)
protocols
- the set of protocol GBeans that contain protocol specific configurationsuseDefault
- whether this GBean will return default Sessions or notproperties
- the set of default properties for the protocolsauthenticator
- the authenticator objectstoreProtocol
- the store protocol that Sessions created from this GBean will returntransportProtocol
- the transport protocol that Sessions created from this GBean will returnhost
- the default Mail serveruser
- the username to provide when connecting to a Mail serverdebug
- the debug setting for Sessions created from this GBeanjndiName
- the JNDI name to which the mail Session should be boundMethod Detail |
---|
public Collection getProtocols()
public Boolean getUseDefault()
public void setUseDefault(Boolean useDefault)
useDefault
- whether this GBean will return default Sessions or notpublic Properties getProperties()
public void setProperties(Properties properties)
properties
- the set of default properties for the protocolspublic Authenticator getAuthenticator()
public void setAuthenticator(Authenticator authenticator)
authenticator
- the authenticator objectpublic String getStoreProtocol()
public void setStoreProtocol(String storeProtocol)
storeProtocol
- the store protocol that Sessions created from this GBean will returnpublic String getTransportProtocol()
public void setTransportProtocol(String transportProtocol)
transportProtocol
- the transport protocol that Sessions created from this GBean will returnpublic String getHost()
public void setHost(String host)
host
- the default Mail serverpublic String getUser()
public void setUser(String user)
user
- the username to provide when connecting to a Mail serverpublic Boolean getDebug()
public void setDebug(Boolean debug)
debug
- the debug setting for Sessions created from this GBeanpublic String getJndiName()
public void setJndiName(String jndiName)
jndiName
- the JNDI name to which the mail Session should be boundpublic Object $getResource()
public void doStart() throws Exception
GBeanLifecycle
doStart
in interface GBeanLifecycle
Exception
- if the target failed to start; this will cause a transition to the failed statepublic void doStop() throws Exception
GBeanLifecycle
doStop
in interface GBeanLifecycle
Exception
- if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail
in interface GBeanLifecycle
public String getObjectName()
getObjectName
in interface J2EEManagedObject
public boolean isStateManageable()
J2EEManagedObject
isStateManageable
in interface J2EEManagedObject
public boolean isStatisticsProvider()
J2EEManagedObject
isStatisticsProvider
in interface J2EEManagedObject
public boolean isEventProvider()
J2EEManagedObject
isEventProvider
in interface J2EEManagedObject
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |