|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.mail.ProtocolGBean
org.apache.geronimo.mail.NNTPStoreGBean
public class NNTPStoreGBean
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.
MailGBean
Field Summary | |
---|---|
static GBeanInfo |
GBEAN_INFO
|
Fields inherited from class org.apache.geronimo.mail.ProtocolGBean |
---|
GBEAN_ADD_OVERRIDES, GBEAN_AUTH, GBEAN_CONNECTION_TIMEOUT, GBEAN_FACTORY_CLASS, GBEAN_FACTORY_FALLBACK, GBEAN_FACTORY_PORT, GBEAN_FROM, GBEAN_HOST, GBEAN_LOCALADDRESS, GBEAN_LOCALHOST, GBEAN_LOCALPORT, GBEAN_OBJECTNAME, GBEAN_PORT, GBEAN_PROPERTIES, GBEAN_PROTOCOL, GBEAN_QUITWAIT, GBEAN_REALM, GBEAN_TIMEOUT, GBEAN_USER |
Fields inherited from interface org.apache.geronimo.mail.NNTPGBeanConstants |
---|
NNTP_AUTH, NNTP_CONNECTION_TIMEOUT, NNTP_FACTORY_CLASS, NNTP_FACTORY_FALLBACK, NNTP_FACTORY_PORT, NNTP_FROM, NNTP_PORT, NNTP_QUITWAIT, NNTP_REALM, NNTP_TIMEOUT, NNTPS_AUTH, NNTPS_CONNECTION_TIMEOUT, NNTPS_FACTORY_CLASS, NNTPS_FACTORY_FALLBACK, NNTPS_FACTORY_PORT, NNTPS_FROM, NNTPS_PORT, NNTPS_QUITWAIT, NNTPS_REALM, NNTPS_TIMEOUT |
Constructor Summary | |
---|---|
NNTPStoreGBean(String objectName,
Properties properties,
String host,
String user,
Integer port,
Integer connectionTimeout,
Integer timeout,
Boolean auth,
String saslRealm,
Boolean quitWait,
String socketFactoryClass,
Boolean socketFactoryFallback,
Integer socketFactoryPort)
Construct an instance of NNTPStoreGBean 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()
Fails the GBean. |
void |
doStart()
Starts the GBean. |
void |
doStop()
Stops the target. |
Boolean |
getAuth()
Returns whether an attempt will be made to authenticate the user. |
Integer |
getConnectionTimeout()
Returns the socket connection timeout value in milliseconds. |
static GBeanInfo |
getGBeanInfo()
|
Integer |
getPort()
Returns the NNTP server port to connect to, if the connect() method doesn't explicitly specify one. |
Boolean |
getQuitWait()
Returns whether the transport will wait for the response to the QUIT command. |
String |
getSaslRealm()
Returns the realm to use with DIGEST-MD5 authentication. |
String |
getSocketFactoryClass()
Returns the class that will be used to create NNTP sockets. |
Boolean |
getSocketFactoryFallback()
Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created. |
Integer |
getSocketFactoryPort()
Returns the port to connect to when using the specified socket factory. |
Integer |
getTimeout()
Returns the socket I/O timeout value in milliseconds. |
void |
setAuth(Boolean auth)
Sets whether an attempt will be made to authenticate the user. |
void |
setConnectionTimeout(Integer connectionTimeout)
Sets the socket connection timeout value in milliseconds. |
void |
setPort(Integer port)
Sets the NNTP server port to connect to, if the connect() method doesn't explicitly specify one. |
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. |
void |
setSaslRealm(String saslRealm)
Sets the realm to use with DIGEST-MD5 authentication. |
void |
setSocketFactoryClass(String socketFactoryClass)
Sets the class that will be used to create NNTP sockets. |
void |
setSocketFactoryFallback(Boolean socketFactoryFallback)
Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created. |
void |
setSocketFactoryPort(Integer socketFactoryPort)
Sets the port to connect to when using the specified socket factory. |
void |
setTimeout(Integer timeout)
Sets the socket I/O timeout value in milliseconds. |
Methods inherited from class org.apache.geronimo.mail.ProtocolGBean |
---|
getHost, getObjectName, getProperties, getProtocol, getUser, setHost, setProperties, setUser |
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 NNTPStoreGBean(String objectName, Properties properties, String host, String user, Integer port, Integer connectionTimeout, Integer timeout, Boolean auth, String saslRealm, Boolean quitWait, String socketFactoryClass, Boolean socketFactoryFallback, Integer socketFactoryPort)
Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.
objectName
- the object name of the protocolproperties
- the set of default properties for the protocolhost
- the host the protocol connects touser
- the default name for the protocolport
- the NNTP server portconnectionTimeout
- the socket connection timeout value in millisecondstimeout
- the socket I/O timeout value in millisecondsauth
- whether an attempt will be made to authenticate the usersaslRealm
- the realm to use with DIGEST-MD5 authenticationquitWait
- whether the transport will wait for the response to the QUIT commandsocketFactoryClass
- the class that will be used to create NNTP socketssocketFactoryFallback
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdsocketFactoryPort
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdMethod Detail |
---|
public Integer getPort()
public void setPort(Integer port)
Defaults to 25.
Values that are set here will override any of the corresponding value that has been set in the properties.
port
- the NNTP server port to connect topublic Integer getConnectionTimeout()
public void setConnectionTimeout(Integer connectionTimeout)
Default is infinite timeout.
Values that are set here will override any of the corresponding value that has been set in the properties.
connectionTimeout
- the socket connection timeout value in milliseconds.public Integer getTimeout()
public void setTimeout(Integer timeout)
Default is infinite timeout.
Values that are set here will override any of the corresponding value that has been set in the properties.
timeout
- the socket I/O timeout value in millisecondspublic Boolean getAuth()
Defaults to false.
public void setAuth(Boolean auth)
Defaults to false.
Values that are set here will override any of the corresponding value that has been set in the properties.
auth
- whether an attempt will be made to authenticate the user.public String getSaslRealm()
public void setSaslRealm(String saslRealm)
Values that are set here will override any of the corresponding value that has been set in the properties.
saslRealm
- the realm to use with DIGEST-MD5 authenticationpublic Boolean getQuitWait()
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 void setQuitWait(Boolean quitWait)
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.
quitWait
- whether the transport will wait for the response to the QUIT commandpublic String getSocketFactoryClass()
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 void setSocketFactoryClass(String socketFactoryClass)
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.
socketFactoryClass
- the class that will be used to create NNTP socketspublic Boolean getSocketFactoryFallback()
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 void setSocketFactoryFallback(Boolean socketFactoryFallback)
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.
socketFactoryFallback
- whether java.net.Socket class will be created if the specified
socket factory class cannot be createdpublic Integer getSocketFactoryPort()
Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.
public void setSocketFactoryPort(Integer socketFactoryPort)
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.
socketFactoryPort
- the port to connect to when using the specified socket factorypublic void addOverrides(Properties props)
addOverrides
in class ProtocolGBean
public void doStart() throws Exception
GBeanLifecycle
doStart
in interface GBeanLifecycle
doStart
in class ProtocolGBean
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
doStop
in class ProtocolGBean
Exception
- if the target failed to stop; this will cause a transition to the failed statepublic void doFail()
GBeanLifecycle
doFail
in interface GBeanLifecycle
doFail
in class ProtocolGBean
public static GBeanInfo getGBeanInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |