Skip navigation links

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09


weblogic.management.configuration
Interface MailSessionMBean

All Superinterfaces:
ConfigurationMBean, DeploymentMBean, DescriptorBean, DynamicMBean, MBeanRegistration, NotificationBroadcaster, RMCFactoryMBean, SettableBean, WebLogicMBean

public interface MailSessionMBean
extends RMCFactoryMBean

Facilitates using the JavaMail APIs, which provide applications and other Java EE modules with access to Internet Message Access Protocol (IMAP)- and Simple Mail Transfer Protocol (SMTP)-capable mail servers on your network or the Internet.

In the reference implementation of JavaMail, applications must instantiate javax.mail.Session objects, which designate mail hosts, transport and store protocols, and a default mail user for connecting to a mail server. In WebLogic Server, you create a mail session, which configures a javax.mail.Session object and registers it in the WebLogic Server JNDI tree. Applications access the mail session through JNDI instead of instantiating their own javax.mail.Session object.


Field Summary

 

Fields inherited from interface weblogic.management.configuration.DeploymentMBean
DEFAULT_ORDER, MAX_ORDER, MIN_ORDER

 

Fields inherited from interface weblogic.management.configuration.ConfigurationMBean
DEFAULT_EMPTY_BYTE_ARRAY

 

Method Summary
abstract  String getName()
          jmsserverjmshat on
abstract  Properties getProperties()
          The configuration options and user authentication data that this mail session uses to interact with a mail server.
abstract  String getSessionPassword()
          The decrypted JavaMail Session password attribute, for use only temporarily in-memory; the value returned by this attribute should not be held in memory long term.
abstract  byte[] getSessionPasswordEncrypted()
          The encrypted JavaMail Session password as set with setSessionPassword(), setSessionPasswordEncrypted(byte[] bytes).
abstract  String getSessionUsername()
           Returns the username to be used to create an authenticated JavaMail Session, using a JavaMail Authenticator instance; if this is not set, it will be assumed that the Session is not to be authenticated.
abstract  void setProperties(Properties props)
          Sets the value of the Properties attribute.
abstract  void setSessionPassword(String password)
          Sets the password for the JavaMail session; this will in turn call MailSessionMBean.getSessionPasswordEncrypted() to store the password in an encrypted form.
abstract  void setSessionPasswordEncrypted(byte[] passwordEncrypted)
          Used to store the encrypted password value for an authenticated JavaMail session in the domain configuration.
abstract  void setSessionUsername(String user)
          Sets the user name to be used for an authenticated JavaMail session

 

Methods inherited from interface weblogic.management.configuration.RMCFactoryMBean
getJNDIName, setJNDIName

 

Methods inherited from interface weblogic.management.configuration.DeploymentMBean
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets

 

Methods inherited from interface weblogic.management.configuration.ConfigurationMBean
freezeCurrentValue, getId, getInheritedProperties, getNotes, isDynamicallyCreated, isInherited, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet

 

Methods inherited from interface weblogic.management.WebLogicMBean
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent

 

Methods inherited from interface javax.management.DynamicMBean
getAttribute, getAttributes, invoke, setAttribute, setAttributes

 

Methods inherited from interface javax.management.MBeanRegistration
postDeregister, postRegister, preDeregister, preRegister

 

Methods inherited from interface javax.management.NotificationBroadcaster
addNotificationListener, getNotificationInfo, removeNotificationListener

 

Methods inherited from interface weblogic.descriptor.DescriptorBean
addPropertyChangeListener, createChildCopyIncludingObsolete, getParentBean, isEditable, removePropertyChangeListener

 

Method Detail

getName

String getName()
jmsserverjmshat on

The user-specified name of this MBean instance.

This name is included as one of the key properties in the MBean's javax.management.ObjectName:

Name=user-specified-name

Specified by:
getName in interface ConfigurationMBean
Specified by:
getName in interface WebLogicMBean

getProperties

Properties getProperties()

The configuration options and user authentication data that this mail session uses to interact with a mail server. Each property that you specify overrides the default property value as defined by the JavaMail API Design Specification.

Include only the properties defined by the JavaMail API Design Specification.

If you do not specify any properties, this mail session will use the JavaMail default property values.

Express each property as a name=value pair. Separate multiple properties with a semicolon (;).

Returns:
The properties value

setProperties

void setProperties(Properties props)
                   throws InvalidAttributeValueException

Sets the value of the Properties attribute.

Parameters:
props - The new properties value
Throws:
InvalidAttributeValueException
See Also:
MailSessionMBean.getProperties()

getSessionUsername

String getSessionUsername()

Returns the username to be used to create an authenticated JavaMail Session, using a JavaMail Authenticator instance; if this is not set, it will be assumed that the Session is not to be authenticated.

Returns:
The user name for creating an authenticated JavaMail Session
Since:
12.1.3.0

setSessionUsername

void setSessionUsername(String user)

Sets the user name to be used for an authenticated JavaMail session

Parameters:
user -
Since:
12.1.3.0

getSessionPassword

String getSessionPassword()

The decrypted JavaMail Session password attribute, for use only temporarily in-memory; the value returned by this attribute should not be held in memory long term.

The value is stored in an encrypted form in the descriptor file and when displayed in an administration console.

Returns:
The clear text value of the password if it can be determined
Since:
12.1.3.0

setSessionPassword

void setSessionPassword(String password)

Sets the password for the JavaMail session; this will in turn call MailSessionMBean.getSessionPasswordEncrypted() to store the password in an encrypted form.

Parameters:
password -
Since:
12.1.3.0

getSessionPasswordEncrypted

byte[] getSessionPasswordEncrypted()

The encrypted JavaMail Session password as set with setSessionPassword(), setSessionPasswordEncrypted(byte[] bytes).

Returns:
The password value as an encrypted byte array
Since:
12.1.3.0

setSessionPasswordEncrypted

void setSessionPasswordEncrypted(byte[] passwordEncrypted)
Used to store the encrypted password value for an authenticated JavaMail session in the domain configuration.
Parameters:
passwordEncrypted -
Since:
12.1.3.0

Skip navigation links

Copyright 1996, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.2.1)

Part Number E55141-01
P4 Change 1723563 on 2015/10/09