org.apache.geronimo.mail
Class ProtocolGBean

java.lang.Object
  extended byorg.apache.geronimo.mail.ProtocolGBean
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle
Direct Known Subclasses:
IMAPStoreGBean, POP3StoreGBean, SMTPTransportGBean

public class ProtocolGBean
extends Object
implements org.apache.geronimo.gbean.GBeanLifecycle

A generic GBean that provides for the configuration of a JavaMail protocol.

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

Version:
$Rev: 355877 $ $Date: 2005-12-11 03:48:27 +0100 (Sun, 11 Dec 2005) $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
ProtocolGBean()
          Construct an instance of ProtocolGBean
ProtocolGBean(String objectName, String protocol, Properties properties, String host, String user)
          Construct an instance of ProtocolGBean

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()
           
 void doStart()
           
 void doStop()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getHost()
          Returns the host the protocol connects to.
 String getObjectName()
          Returns the object name of this protocol GBean
 Properties getProperties()
          Returns the set of default properties for the protocol.
 String getProtocol()
          Returns the name of the protocol
 String getUser()
          Returns the default user name for the protocol.
 void setHost(String host)
          Set the host the protocol connects to.
 void setProperties(Properties properties)
          Sets the set of default properties for the protocol.
 void setUser(String user)
          Sets the default user name for the protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

ProtocolGBean

public ProtocolGBean()
Construct an instance of ProtocolGBean


ProtocolGBean

public ProtocolGBean(String objectName,
                     String protocol,
                     Properties properties,
                     String host,
                     String user)
Construct an instance of ProtocolGBean

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
protocol - the 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
Method Detail

getObjectName

public String getObjectName()
Returns the object name of this protocol GBean


getProperties

public Properties getProperties()
Returns the set of default properties for the protocol.

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


setProperties

public void setProperties(Properties properties)
Sets the set of default properties for the protocol.

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:
properties - set of default properties for the protocol

getProtocol

public String getProtocol()
Returns the name of the protocol


getHost

public String getHost()
Returns the host the protocol connects to.


setHost

public void setHost(String host)
Set the host the protocol connects to.

Parameters:
host - the host the protocol connects to

getUser

public String getUser()
Returns the default user name for the protocol.


setUser

public void setUser(String user)
Sets the default user name for the protocol.

Parameters:
user - the default user name for the protocol

addOverrides

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


doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


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