亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? service.java

?? java Email you can use it to send email to others
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License").  You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code.  If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license."  If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above.  However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. *//* * @(#)Service.java	1.33 07/05/14 */package javax.mail;import java.io.*;import java.net.*;import java.util.*;import javax.mail.event.*;/** * An abstract class that contains the functionality * common to messaging services, such as stores and transports. <p> * A messaging service is created from a <code>Session</code> and is * named using a <code>URLName</code>.  A service must be connected * before it can be used.  Connection events are sent to reflect * its connection status. * * @author Christopher Cotton * @author Bill Shannon * @author Kanwar Oberoi * @version 1.33, 07/05/14 */public abstract class Service {    /**     * The session from which this service was created.     */    protected Session	session;    /**     * The <code>URLName</code> of this service.     */    protected URLName	url = null;    /**     * Debug flag for this service.  Set from the session's debug     * flag when this service is created.     */    protected boolean	debug = false;    private boolean	connected = false;    private Vector	connectionListeners = null;    /**     * Constructor.     *     * @param	session Session object for this service     * @param	urlname	URLName object to be used for this service     */    protected Service(Session session, URLName urlname) {	this.session = session;	url = urlname;	debug = session.getDebug();    }    /**     * A generic connect method that takes no parameters. Subclasses     * can implement the appropriate authentication schemes. Subclasses     * that need additional information might want to use some properties     * or might get it interactively using a popup window. <p>     *     * If the connection is successful, an "open" <code>ConnectionEvent</code>     * is delivered to any <code>ConnectionListeners</code> on this service. <p>     *     * Most clients should just call this method to connect to the service.<p>     *     * It is an error to connect to an already connected service. <p>     *     * The implementation provided here simply calls the following     * <code>connect(String, String, String)</code> method with nulls.     *     * @exception AuthenticationFailedException	for authentication failures     * @exception MessagingException	for other failures     * @exception IllegalStateException	if the service is already connected     *     * @see javax.mail.event.ConnectionEvent     */    public void connect() throws MessagingException {	connect(null, null, null);    }    /**     * Connect to the specified address. This method provides a simple     * authentication scheme that requires a username and password. <p>     *     * If the connection is successful, an "open" <code>ConnectionEvent</code>     * is delivered to any <code>ConnectionListeners</code> on this service. <p>     *     * It is an error to connect to an already connected service. <p>     *     * The implementation in the Service class will collect defaults     * for the host, user, and password from the session, from the     * <code>URLName</code> for this service, and from the supplied     * parameters and then call the <code>protocolConnect</code> method.     * If the <code>protocolConnect</code> method returns <code>false</code>,     * the user will be prompted for any missing information and the     * <code>protocolConnect</code> method will be called again.  The     * subclass should override the <code>protocolConnect</code> method.     * The subclass should also implement the <code>getURLName</code>     * method, or use the implementation in this class. <p>     *     * On a successful connection, the <code>setURLName</code> method is     * called with a URLName that includes the information used to make     * the connection, including the password. <p>     *     * If the username passed in is null, a default value will be chosen     * as described above.     *     * If the password passed in is null and this is the first successful     * connection to this service, the user name and the password     * collected from the user will be saved as defaults for subsequent     * connection attempts to this same service when using other Service object     * instances (the connection information is typically always saved within     * a particular Service object instance).  The password is saved using the     * Session method <code>setPasswordAuthentication</code>.  If the     * password passed in is not null, it is not saved, on the assumption     * that the application is managing passwords explicitly.     *     * @param host 	the host to connect to     * @param user	the user name     * @param password	this user's password     * @exception AuthenticationFailedException	for authentication failures     * @exception MessagingException		for other failures     * @exception IllegalStateException	if the service is already connected     * @see javax.mail.event.ConnectionEvent     * @see javax.mail.Session#setPasswordAuthentication     */    public void connect(String host, String user, String password)			throws MessagingException {	connect(host, -1, user, password);    }    /**     * Connect to the current host using the specified username     * and password.  This method is equivalent to calling the     * <code>connect(host, user, password)</code> method with null     * for the host name.     *     * @param user      the user name     * @param password  this user's password     * @exception AuthenticationFailedException for authentication failures     * @exception MessagingException            for other failures     * @exception IllegalStateException if the service is already connected     * @see javax.mail.event.ConnectionEvent     * @see javax.mail.Session#setPasswordAuthentication     * @see #connect(java.lang.String, java.lang.String, java.lang.String)     * @since           JavaMail 1.4     */    public void connect(String user, String password) throws MessagingException {        connect(null, user, password);    }    /**     * Similar to connect(host, user, password) except a specific port     * can be specified.     *     * @param host 	the host to connect to     * @param port	the port to connect to (-1 means the default port)     * @param user	the user name     * @param password	this user's password     * @exception AuthenticationFailedException	for authentication failures     * @exception MessagingException		for other failures     * @exception IllegalStateException	if the service is already connected     * @see #connect(java.lang.String, java.lang.String, java.lang.String)     * @see javax.mail.event.ConnectionEvent     */    public synchronized void connect(String host, int port,		String user, String password) throws MessagingException {	// see if the service is already connected	if (isConnected())	    throw new IllegalStateException("already connected");	PasswordAuthentication pw;	boolean connected = false;	boolean save = false;	String protocol = null;	String file = null;	// get whatever information we can from the URL	// XXX - url should always be non-null here, Session	//       passes it into the constructor	if (url != null) {	    protocol = url.getProtocol();	    if (host == null)		host = url.getHost();	    if (port == -1)		port = url.getPort();	    if (user == null) {		user = url.getUsername();		if (password == null)	// get password too if we need it		    password = url.getPassword();	    } else {		if (password == null && user.equals(url.getUsername()))		    // only get the password if it matches the username		    password = url.getPassword();	    }	    file = url.getFile();	}	// try to get protocol-specific default properties	if (protocol != null) {	    if (host == null)		host = session.getProperty("mail." + protocol + ".host");	    if (user == null)		user = session.getProperty("mail." + protocol + ".user");	}	// try to get mail-wide default properties	if (host == null)	    host = session.getProperty("mail.host");	if (user == null)	    user = session.getProperty("mail.user");	// try using the system username	if (user == null) {	    try {		user = System.getProperty("user.name");	    } catch (SecurityException sex) {		if (debug)		    sex.printStackTrace(session.getDebugOut());	    }	}	// if we don't have a password, look for saved authentication info	if (password == null && url != null) {	    // canonicalize the URLName	    setURLName(new URLName(protocol, host, port, file, user, null));	    pw = session.getPasswordAuthentication(getURLName());	    if (pw != null) {		if (user == null) {		    user = pw.getUserName();		    password = pw.getPassword();		} else if (user.equals(pw.getUserName())) {		    password = pw.getPassword();		}	    } else		save = true;	}	// try connecting, if the protocol needs some missing	// information (user, password) it will not connect.	// if it tries to connect and fails, remember why for later.	AuthenticationFailedException authEx = null;	try {	    connected = protocolConnect(host, port, user, password);	} catch (AuthenticationFailedException ex) {	    authEx = ex;	}	// if not connected, ask the user and try again	if (!connected) {	    InetAddress addr;	    try {		addr = InetAddress.getByName(host);	    } catch (UnknownHostException e) {		addr = null;	    }	    pw = session.requestPasswordAuthentication(			    addr, port,			    protocol,			    null, user);	    if (pw != null) {		user = pw.getUserName();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合久久天天综合网| 国产精品自产自拍| 在线观看国产日韩| 亚洲综合图片区| 欧美日本一区二区| 美国毛片一区二区三区| 久久久久国产精品人| 99久久精品国产精品久久| 夜夜爽夜夜爽精品视频| 欧美日韩黄色一区二区| 久久99精品一区二区三区三区| 久久伊人蜜桃av一区二区| 成人国产一区二区三区精品| 亚洲精品一二三| 欧美一区二区三区日韩视频| 国产成人亚洲综合a∨猫咪| 中文字幕在线一区免费| 在线精品视频一区二区| 久久99国产精品久久99| 中文乱码免费一区二区| 欧美视频在线一区二区三区 | 国产伦精品一区二区三区免费| 国产亚洲欧美激情| 欧美少妇bbb| 国内精品国产三级国产a久久| 国产精品久久久久影院色老大| 91在线丨porny丨国产| 五月天欧美精品| 国产女人18毛片水真多成人如厕| 色视频一区二区| 国产美女在线精品| 亚洲高清视频在线| 国产欧美日韩另类一区| 欧美日韩一区久久| 不卡在线观看av| 七七婷婷婷婷精品国产| 国产精品久久777777| 日韩一区二区视频在线观看| www.日本不卡| 久久精品999| 亚洲最色的网站| 国产精品网站一区| 精品免费视频.| 欧美最猛黑人xxxxx猛交| 国产主播一区二区| 五月天精品一区二区三区| 日韩美女精品在线| 久久奇米777| 国产日产欧美一区二区视频| 欧美在线制服丝袜| 丰满岳乱妇一区二区三区| 天天色天天操综合| 亚洲精品高清视频在线观看| 欧美国产亚洲另类动漫| 欧美变态tickling挠脚心| 欧美色图激情小说| 日本韩国欧美在线| 99精品视频在线免费观看| 激情综合色综合久久综合| 日韩和欧美的一区| 亚洲一区二区五区| 1区2区3区国产精品| 久久日韩精品一区二区五区| 欧美嫩在线观看| 欧美影视一区二区三区| 91久久一区二区| 99久久精品国产毛片| 国产成人av影院| 国产精品一区二区男女羞羞无遮挡| 热久久国产精品| 亚洲福利视频三区| 一区二区三区四区乱视频| 亚洲人成在线观看一区二区| 国产精品久久毛片av大全日韩| 久久精品人人做人人爽人人| 精品国产成人系列| 日韩免费视频一区二区| 日韩欧美区一区二| 精品久久久久久无| 久久亚洲精华国产精华液| www欧美成人18+| 国产片一区二区| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 国产毛片一区二区| 国产乱子伦视频一区二区三区| 国产精品一区免费视频| 国产精品一区久久久久| 粉嫩一区二区三区在线看| 成人黄色小视频在线观看| 成人av片在线观看| 日本道色综合久久| 在线成人av网站| 欧美va亚洲va| 中文字幕第一区综合| 亚洲人被黑人高潮完整版| 亚洲电影第三页| 蜜桃av一区二区| 97超碰欧美中文字幕| 91丨九色丨蝌蚪富婆spa| 欧美日韩中文国产| 欧美成人bangbros| 国产精品久久久久久久蜜臀| 亚洲精品国产a| 久久精品国产77777蜜臀| 成人午夜伦理影院| 欧美色倩网站大全免费| 日韩精品在线一区| 国产精品毛片久久久久久久| 亚洲一级在线观看| 久久不见久久见免费视频7| 高清在线不卡av| 欧美日韩免费不卡视频一区二区三区| 欧美一区2区视频在线观看| 国产欧美综合在线| 亚洲一级片在线观看| 韩国成人在线视频| 色婷婷精品久久二区二区蜜臀av| 欧美剧在线免费观看网站 | 国产一区啦啦啦在线观看| 91在线精品秘密一区二区| 777色狠狠一区二区三区| 亚洲国产激情av| 亚洲.国产.中文慕字在线| 丁香六月久久综合狠狠色| 欧美日韩一区二区欧美激情| 2024国产精品视频| 午夜视黄欧洲亚洲| 成人免费电影视频| 色欧美片视频在线观看在线视频| 精品美女一区二区| 亚洲成人动漫在线免费观看| 国产成人亚洲精品青草天美| 欧美一区二区免费| 一区二区三区欧美在线观看| 国产激情视频一区二区三区欧美| 欧美日韩一级视频| 最近日韩中文字幕| 国产毛片精品视频| 制服丝袜一区二区三区| 一区二区三区在线不卡| 成人蜜臀av电影| 欧美精品久久久久久久多人混战| 国产精品免费av| 国产寡妇亲子伦一区二区| 日韩一区二区三区免费看| 亚洲国产一区二区三区| jlzzjlzz亚洲女人18| 久久久精品免费网站| 麻豆精品新av中文字幕| 欧美综合色免费| 日韩理论片一区二区| 成人av网站在线观看| 国产日韩欧美在线一区| 蜜桃av一区二区在线观看 | 国产乱国产乱300精品| 欧美一区二区在线不卡| 一区二区三区国产精华| 不卡的av在线| 国产欧美日韩亚州综合| 精品亚洲国产成人av制服丝袜| 91麻豆精品国产91久久久久久| 亚洲精品欧美激情| 91蝌蚪国产九色| 中文字幕中文字幕中文字幕亚洲无线| 国产一区二区美女诱惑| 久久综合狠狠综合久久综合88| 蜜桃免费网站一区二区三区| 欧美成人性福生活免费看| 久久激情五月婷婷| 精品国产一区a| 黑人巨大精品欧美黑白配亚洲 | 2欧美一区二区三区在线观看视频| 午夜a成v人精品| 日韩一本二本av| 日韩av电影天堂| 日韩午夜激情电影| 精品一区二区在线视频| 久久一二三国产| 岛国一区二区三区| 亚洲欧洲精品一区二区三区| 91在线观看高清| 亚洲国产精品一区二区久久| 欧美亚一区二区| 久久国产婷婷国产香蕉| 久久九九久久九九| av在线一区二区| 亚洲成av人**亚洲成av**| 欧美一级片在线观看| 精品亚洲免费视频| 国产精品美女久久久久久久久 | 日日夜夜精品免费视频| 日韩一级片在线播放| 国产精品资源在线| 日本一区二区三级电影在线观看| av一区二区不卡| 亚洲成人av在线电影| www国产亚洲精品久久麻豆| 成人高清av在线| 午夜精品久久久久影视| 久久综合一区二区|