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

All Implemented Interfaces:
    NNTPGBeanConstants, GBeanLifecycle

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

NNTP transport properties that are common to all NNTP transports 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.

Field Summary
public static final  GBeanInfo GBEAN_INFO     
Fields inherited from org.apache.geronimo.mail.ProtocolGBean:
GBEAN_OBJECTNAME,  GBEAN_PROTOCOL,  GBEAN_PROPERTIES,  GBEAN_HOST,  GBEAN_USER,  GBEAN_ADD_OVERRIDES,  GBEAN_PORT,  GBEAN_CONNECTION_TIMEOUT,  GBEAN_TIMEOUT,  GBEAN_FROM,  GBEAN_AUTH,  GBEAN_REALM,  GBEAN_QUITWAIT,  GBEAN_FACTORY_CLASS,  GBEAN_FACTORY_FALLBACK,  GBEAN_FACTORY_PORT,  GBEAN_LOCALHOST,  GBEAN_LOCALADDRESS,  GBEAN_LOCALPORT,  GBEAN_INFO
Constructor:
 public NNTPTransportGBean(String objectName,
    Properties properties,
    String host,
    String user,
    Integer port,
    Integer connectionTimeout,
    Integer timeout,
    String from,
    Boolean auth,
    String saslRealm,
    Boolean quitWait,
    String socketFactoryClass,
    Boolean socketFactoryFallback,
    Integer socketFactoryPort) 
    Construct an instance of NNTPTransportGBean

    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 NNTP server port
    connectionTimeout - the socket connection timeout value in milliseconds
    timeout - the socket I/O timeout value in milliseconds
    from - the email address to use for NNTP POST command
    auth - whether an attempt will be made to authenticate the user
    saslRealm - the realm to use with DIGEST-MD5 authentication
    quitWait - whether the transport will wait for the response to the QUIT command
    socketFactoryClass - the class that will be used to create NNTP 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 from org.apache.geronimo.mail.NNTPTransportGBean Summary:
addOverrides,   doFail,   doStart,   doStop,   getAuth,   getConnectionTimeout,   getFrom,   getGBeanInfo,   getPort,   getQuitWait,   getSaslRealm,   getSocketFactoryClass,   getSocketFactoryFallback,   getSocketFactoryPort,   getTimeout,   setAuth,   setConnectionTimeout,   setFrom,   setPort,   setQuitWait,   setSaslRealm,   setSocketFactoryClass,   setSocketFactoryFallback,   setSocketFactoryPort,   setTimeout
Methods from org.apache.geronimo.mail.ProtocolGBean:
addOverrides,   doFail,   doStart,   doStop,   getGBeanInfo,   getHost,   getObjectName,   getProperties,   getProtocol,   getUser,   setHost,   setProperties,   setUser
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.mail.NNTPTransportGBean Detail:
 public  void addOverrides(Properties props) 
    Add the overrides from the member variables to the properties file.
 public  void doFail() 
 public  void doStart() throws Exception 
 public  void doStop() throws Exception 
 public Boolean getAuth() 
    Returns whether an attempt will be made to authenticate the user

    Defaults to false.

 public Integer getConnectionTimeout() 
    Returns the socket connection timeout value in milliseconds.
 public String getFrom() 
    Returns the email address to use for NNTP POST command.
 public static GBeanInfo getGBeanInfo() 
 public Integer getPort() 
    Returns the NNTP server port to connect to, if the connect() method doesn't explicitly specify one.
 public Boolean getQuitWait() 
    Returns whether the transport will wait for the response to the QUIT command.

    If set to true, causes the transport to wait for the response to the QUIT command. If set to false (the default), the QUIT command is sent and the connection is immediately closed.

 public String getSaslRealm() 
    Returns the realm to use with DIGEST-MD5 authentication.
 public String getSocketFactoryClass() 
    Returns the class that will be used to create NNTP sockets.

    If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create NNTP sockets.

 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.

 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.

 public Integer getTimeout() 
    Returns the socket I/O timeout value in milliseconds.
 public  void setAuth(Boolean auth) 
    Sets whether an attempt will be made to authenticate the user.

    Defaults to false.

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

 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.

 public  void setFrom(String from) 
    Sets the email address to use for NNTP POST command

    Email address to use for NNTP POST command. This sets the envelope return address. Defaults to msg.getFrom() or InternetAddress.getLocalAddress().

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

 public  void setPort(Integer port) 
    Sets the NNTP server port to connect to, if the connect() method doesn't explicitly specify one.

    Defaults to 25.

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

 public  void setQuitWait(Boolean quitWait) 
    Sets whether the transport will wait for the response to the QUIT command

    If set to true, causes the transport to wait for the response to the QUIT command. If set to false (the default), the QUIT command is sent and the connection is immediately closed.

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

 public  void setSaslRealm(String saslRealm) 
    Sets the realm to use with DIGEST-MD5 authentication.

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

 public  void setSocketFactoryClass(String socketFactoryClass) 
    Sets the class that will be used to create NNTP sockets.

    If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create NNTP sockets.

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

 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.

 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.

 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.