⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msnlistener.java

📁 聊天程序
💻 JAVA
字号:
/*
 * @(#)MsnListener.java
 *
 * Copyright (c) 2001-2002, JangHo Hwang
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 	1. Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *
 * 	2. Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 *
 * 	3. Neither the name of the JangHo Hwang nor the names of its contributors
 * may be used to endorse or promote products derived from this software
 * without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *    $Id: MsnListener.java,v 1.8 2002/08/22 13:59:37 xrath Exp $
 */
package rath.msnm.event;

import java.util.EventListener;
import java.util.Properties;

import rath.msnm.SwitchboardSession;
import rath.msnm.entity.MsnFriend;
import rath.msnm.ftp.VolatileTransferServer;
import rath.msnm.ftp.VolatileDownloader;
import rath.msnm.msg.MimeMessage;
/**
 * 厚悼扁利栏肺 MSN Server俊辑 档馒窍绰 皋矫瘤 捞亥飘甸阑
 * 贸府且 荐 乐绰 捞亥飘 府胶呈 牢磐其捞胶捞促.
 *
 * @author Jang-Ho Hwang, rath@linuxkorea.co.kr
 * @version $Id: MsnListener.java,v 1.8 2002/08/22 13:59:37 xrath Exp $
 */
public interface MsnListener extends EventListener
{
	/**
	 * 肺弊牢捞 肯丰登菌促绰 皋矫瘤捞促.
	 * 磊脚狼 肺弊牢捞抚(皋老林家)客 葱匙烙阑 带廉霖促.
	 */
	public void loginComplete( MsnFriend own );

	/**
	 * 粮犁窍瘤 臼绰 酒捞叼捞芭唱, 厚剐锅龋啊 撇啡阑 版快,
	 * 捞 捞亥飘甫 惯价窍绊, 楷搬篮 辆丰等促.
	 * 酒公瓢 肺弊牢阑 且 荐 绝阑锭 惯积登绰 捞亥飘捞促.
	 */
	public void loginError( String header );

	/**
	 * 肺弊牢 茄 饶, 惑怕甫 柯扼牢栏肺 官操菌阑锭, 磊脚狼
	 * Contact list俊 乐绰 荤侩磊吝俊 惑怕啊 Online(趣篮 substate)牢
	 * 荤侩磊甸阑 捞 皋家靛甫 烹秦 烙狼狼 辨捞肺 朝妨霖促.
	 * 巩力痢篮 龋免 辆丰瘤痢阑 沥犬窍霸 舅 荐 绝促绰 巴捞促.
	 * <p>
	 * 父距 Online Contact list甫 啊瘤绊 酵促搁, MsnFriend 按眉甫
	 * Map俊 历厘秦滴搁 祈府窍促. (Key蔼篮 loginName栏肺 窍搁 歹 亮促)
	 */
	public void listOnline( MsnFriend friend );

	/**
	 * 磊脚狼 ContactList俊 乐绰 荤侩磊 吝俊 茄疙捞 柯扼牢捞 登芭唱
	 * 惑怕甫 函版窍看阑锭, NS肺何磐 朝扼坷绰 皋矫瘤捞促.
	 */
	public void userOnline( MsnFriend friend );

	/**
	 * 磊脚狼 Foward ContactList俊 乐绰 荤侩磊吝 柯扼牢捞看带 荤侩磊啊
	 * 坷橇扼牢栏肺 惑怕啊 函版登菌阑锭 NS肺何磐 朝扼坷绰 皋矫瘤捞促.
	 */
	public void userOffline( String loginName );


	/**
	 * 穿焙啊啊 Switchboard server甫 烹秦辑 磊脚俊霸 措拳夸没阑
	 * 窍看绊, 弊 荤恩苞狼 session捞 楷搬登菌促绰 巴阑 舅妨霖促.
	 */
	public void switchboardSessionStarted( SwitchboardSession ss );

	/**
	 * 漂沥 技记栏肺 货肺款 荤侩磊啊 涝厘窍看澜阑 舅妨霖促.
	 */
	public void whoJoinSession( SwitchboardSession ss, MsnFriend join );

	/**
	 * 漂沥 技记俊辑 荤侩磊啊 BYE 窍绊 技记阑 谗菌澜阑 舅妨霖促.
	 */
	public void whoPartSession( SwitchboardSession ss, MsnFriend part );

	/**
	 * Switchboard session捞 惑措规栏肺何磐 辆丰登菌阑锭 阂妨柳促.
	 */
	public void switchboardSessionEnded( SwitchboardSession ss );

	/**
	 * Switchboard session捞 楷搬阑 肯丰窍瘤 给窍绊 SS肺何磐 楷搬捞 场绢廉滚啡阑锭
	 * 惯积窍绰 捞亥飘捞促. SwitchboardSession狼 Session id绰 null老 巴捞促.
	 */
	public void switchboardSessionAbandon( SwitchboardSession ss, String targetName );

	/**
	 * 漂沥 Switchboard session俊辑 typingUser荤侩磊啊 皋矫瘤甫 涝仿窍绰
	 * 吝老锭 惯价瞪锭 阂妨柳促.
	 */
	public void progressTyping( SwitchboardSession ss,
		MsnFriend friend, String typingUser );

	/**
	 * 漂沥 Switchboard session俊辑 牢胶畔飘 皋矫瘤甫 罐疽阑锭 阂妨柳促.
	 *
	 * @param  ss   秦寸 switchboard session
	 * @param  msg
	 */
	public void instantMessageReceived( SwitchboardSession ss,
		MsnFriend friend, MimeMessage mime );

	/**
	 * 穿焙啊啊 磊脚俊霸 颇老阑 焊郴妨绊 窃阑 舅妨林绰 皋家靛捞促.
	 *
	 * @param  ss  颇老阑 焊郴妨绊 茄 荤恩苞 楷搬等 Switchboard技记
	 * @param  cookie  览翠俊 鞘夸茄 捻虐蔼.
	 * @param  filename  焊郴妨绊窍绰 颇老狼 捞抚
	 * @param  filesize  焊郴妨绊窍绰 颇老狼 农扁(byte窜困)
	 * @since  0.3
	 */
	public void filePosted( SwitchboardSession ss, int cookie, String filename, int filesize );

	/**
	 * 焊郴妨绊 沁带 颇老俊 措窍咯 惑措规捞 Accept秦林菌澜阑 舅妨林绰 皋家靛捞促.
	 * 捞 捞亥飘啊 惯积窍看阑 版快俊 漂喊洒 秦拎具且老篮 绝促.
	 * 窜 捞 捞亥飘啊 惯积茄 饶, 梆官肺 角力肺 颇老阑 傈价窍扁困茄 thread啊
	 * 积己瞪 巴捞哥 port啊 bind登绊 颇老 傈价捞 矫累瞪 巴捞促.
	 */
	public void fileSendAccepted( SwitchboardSession ss, int cookie );

	/**
	 * 焊郴妨绊 沁带 颇老俊 措窍咯 惑措规捞 Reject沁澜阑 舅妨林绰 皋家靛捞促.
	 * 捞 捞亥飘啊 惯积窍看阑 版快俊 漂喊洒 秦拎具且老篮 绝促.
	 */
	public void fileSendRejected( SwitchboardSession ss, int cookie, String reason );

	/**
	 * 颇老 焊郴扁 累诀捞 矫累登菌澜阑 舅妨霖促.
	 *
	 * @param  server  颇老 价脚 辑滚 按眉.
	 */
	public void fileSendStarted( VolatileTransferServer server );

	/**
	 * 颇老 焊郴扁 累诀捞 辆丰登菌澜阑 舅妨霖促.
	 */
	public void fileSendEnded( VolatileTransferServer server );

	/**
	 * 颇老 促款肺靛 累诀捞 矫累登菌澜阑 舅妨霖促.
	 *
	 * @param  downloader  颇老 促款肺靛 thread 按眉.
	 */
	public void fileReceiveStarted( VolatileDownloader downloader );

	/**
	 * 颇老阑 价脚窍带吝 抗寇啊 惯积窍看澜阑 舅妨林绰 皋家靛捞促.
	 * 绢路电, 颇老 傈价 thread绰 辆丰等促.
	 */
	public void fileSendError( VolatileTransferServer server, Throwable e );

	/**
	 * 颇老阑 荐脚窍带吝 抗寇啊 惯积窍看澜阑 舅妨林绰 皋家靛捞促.
	 * 绢路电, 颇老 傈价 thread绰 辆丰等促.
	 */
	public void fileReceiveError( VolatileDownloader downloader, Throwable e );

	/**
	 * 穿焙啊 磊脚阑 殿废沁澜阑 舅妨霖促. RL父捞 殿废登绢乐栏骨肺,
	 * 角力 磊脚狼 FL俊 殿废窍绰 巴篮 磊脚捞 流立秦林绢具 茄促.
	 *
	 * @param  friend  殿废茄 荤恩狼 LoginName, FriendlyName捞 历厘.
	 */
	public void whoAddedMe( MsnFriend friend );

	/**
	 * 穿焙啊 磊脚阑 昏力沁澜阑 舅妨霖促. RL俊辑父 昏力登骨肺, 备瘤 舅妨临 鞘夸绰 绝促.
	 *
	 * @param  friend  殿废茄 荤恩狼 LoginName父捞 柯促. FriendlyName篮 null老 巴捞促.
	 */
	public void whoRemovedMe( MsnFriend friend );

	/**
	 * BuddyList啊 荐沥登绢 Serial number啊 函版等 流 饶, 惯价登绰 捞亥飘捞促.
	 */
	public void buddyListModified();

	/**
	 * 荤侩磊 殿废阑 角菩窍看阑锭 惯价登绰 捞亥飘捞促.
	 *
	 * @param  errorCode  辑滚肺何磐 罐篮 俊矾 内靛 庆歹
	 */
	public void addFailed( int errorCode );

	/**
	 * 模槛茄 捞抚(FriendlyName)捞 函版登菌阑锭 惯价登绰 捞亥飘捞促.
	 * 磊脚捞 函版阑 沁阑锭档, 捞 捞亥飘啊 惯价登哥, 促弗 牢埃捞 函版秦档
	 * 惯价等促.
	 * <p>
	 * 父距 null捞扼搁, 磊扁 磊脚狼 捞抚 函版俊 角菩茄 case捞促.
	 */
	public void renameNotify( MsnFriend friend );

	/**
	 * 肺弊牢 矫, Synchronization value啊 崔耳阑锭, 辑滚肺何磐
	 * FL/AL/BL/RL, Group list殿阑 葛滴 罐霸 登绰单, 父父摹 臼篮
	 * 累诀捞骨肺, 葛滴 促 Update登菌阑锭 烹瘤登绰 捞亥飘捞促.
	 */
	public void allListUpdated();

	/**
	 * 肺弊酒眶 登菌澜阑 舅妨林绰 捞亥飘捞促. 馆靛矫 沥惑利牢 肺弊酒眶父阑
	 * 舅妨林绰 巴篮 酒聪促. Emergency exception阑 烹秦 NotificationProcessor啊
	 * 辆丰登菌阑 版快俊档 捞亥飘啊 惯积茄促.
	 * <p>
	 * 溜, 搬惫 connection捞 terminate登菌澜阑 舅妨林绰 巴捞促.
	 */
	public void logoutNotify();

	/**
	 * HotMail 拌沥荤侩矫, 肺弊牢矫 佬瘤臼篮 祈瘤俊 措茄 沥焊甫 逞败霖促.
	 * Properties绰 MSN 辑滚俊辑 逞败霖 MIME properties甸捞哥, 捞 吝
	 * Inbox-Unread property甫 荤侩窍搁 等促. 捞巴篮 祈狼惑 unread variable肺
	 * 傈崔等促.
	 */
	public void notifyUnreadMail( Properties prop, int unread );
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -