|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jqql.QQClient
public class QQClient
A class of QQ clinet, provid a convenient interface to user, for example send message , like that just need invoke a method to implement QQ的客户端类,这个类为用户æä¾›ä¸€ä¸ªæ–¹ä¾¿çš„æŽ¥å£ï¼Œæ¯”如å‘逿¶ˆæ¯ä¹‹ç±»çš„,åªéœ€è¦è°ƒç”¨ä¸€ä¸ª 方法便å¯ä»¥å®Œæˆäº†ã€‚ network layer of Luma QQ was implemented by NIO , each Client allocate a Selector, every Selector can listening mulity Channel and channel was package in the implmented class of IPort, for a Client , there is a Main Port ,this one define as a port of connect QQ login server there is a port before login System ,also be Main port, according to require can start other port. LumaQQ网络层通过NIO实现,æ¯ä¸ªClient分é…一个Selector,æ¯ä¸ªSelectorå¯ä»¥ç›‘å¬å¤šä¸ª Channel,channel包装在IPort的实现类ä¸ï¼Œå¯¹äºŽä¸€ä¸ªClient,有一个Main Port,这个 Main Port定义为连接QQ登陆æœåŠ¡å™¨çš„é‚£ä¸ªPort。系统登陆之åˆä¹‹æœ‰ä¸€ä¸ªPortå³Main Port, æ ¹æ®éœ€è¦å¯ä»¥å¼€å¯å…¶ä»–Port
Field Summary | |
---|---|
protected static SingleExecutor |
executor
singnal thread processor å•线程执行器 |
protected Map<InPacket,String> |
inConn
输入包和portçš„æ˜ å°„ï¼Œç”¨æ¥åˆ¤æ–一个包æ¥è‡ªäºŽå“ªä¸ªport |
protected ScheduledFuture<?> |
keepAliveFuture
|
protected Runnable |
keepAliveTrigger
Keep Alive过程 |
protected Callable<Object> |
packetEventTrigger
包事件触å‘过程 |
protected static int |
PROCESSOR_COUNT
包处ç†å™¨æ•°ç›® |
protected Queue<InPacket> |
receiveQueue
接收队列 |
protected ResendTrigger<Object> |
resendTrigger
é‡å‘过程 |
Constructor Summary | |
---|---|
QQClient()
constructor æž„é€ å‡½æ•° |
Method Summary | |
---|---|
void |
acceptSendFile(int receiver,
int directPort,
char sequence,
boolean udp)
send approve accept file package å‘é€åŒæ„接收文件包 |
void |
activateCluster(int clusterId)
activate cluster 激活群 |
void |
activateTempCluster(byte type,
int clusterId,
int parentClusterId)
activate temp cluster 激活临时群 |
char |
addFriend(int qqNum)
Add afriend æ·»åŠ ä¸€ä¸ªå¥½å‹ |
void |
addFriendToList(int group,
int qqNum)
æ·»åŠ å¥½å‹åˆ°æœåŠ¡å™¨ç«¯çš„å¥½å‹åˆ—è¡¨ä¸ |
void |
addIncomingPacket(InPacket packet,
String portName)
add a package to queue æ·»åŠ ä¸€ä¸ªåŒ…åˆ°æŽ¥æ”¶é˜Ÿåˆ— |
void |
addQQListener(IQQListener listener)
add a qq evnet listening æ·»åŠ ä¸€ä¸ªQQ事件监å¬å™¨ |
void |
addResendPacket(OutPacket packet,
String port)
add a package to resend queue æ·»åŠ ä¸€ä¸ªåŒ…åˆ°é‡å‘队列 |
void |
applyDisk(String localIp)
apply network hard disk 申请网络硬盘 |
void |
approveAddMe(int qqNum)
if i accept the request which a person who add me as friend use this method to send the approve message 如果我è¦åŒæ„ä¸€ä¸ªäººåŠ æˆ‘ä¸ºå¥½å‹çš„请求,用这个方法å‘é€åŒæ„æ¶ˆæ¯ |
void |
approveJoinCluster(int clusterId,
int receiver)
Approve join into the cluster åŒæ„åŠ å…¥ç¾¤ |
void |
authenticateDisk(String localIp,
String nick,
String password)
authenticate network disk ç½‘ç»œç¡¬ç›˜è®¤è¯ |
void |
batchDownloadFriendRemark(int page)
batch download remark of friend 批é‡ä¸‹è½½å¥½å‹å¤‡æ³¨ |
void |
cancelDiskPassword(String localIp,
String oldPassword)
cancel the pass word of network hard disk å–æ¶ˆç½‘络硬盘密ç |
void |
cancelSendFile(int receiver,
char sequence)
cansel transport file å–æ¶ˆå‘逿–‡ä»¶ |
char |
commitMemberOrganization(int clusterId,
List<Member> members)
commit member organized æäº¤æˆå‘˜ç»„织 |
char |
commitOrganization(int clusterId,
List<QQOrganization> organizations)
commit structure of organized æäº¤ç»„织架构 |
void |
createDirectory(String localIp,
String name,
int parentId)
create directory 创建目录 |
void |
createFile(String localIp,
String name,
int parentId,
int length)
create file 创建文件 |
void |
createPermanentCluster(String name,
String notice,
String description,
List<Integer> members,
int category,
byte authType)
create a fixed cluster 创建一个固定群 |
char |
createTemporaryCluster(String name,
byte type,
int parentClusterId,
List<Integer> members)
create a temp cluster 创建一个临时群 |
void |
deleteDirectory(String localIp,
int id)
delete directory åˆ é™¤ç›®å½• |
void |
deleteDirectory(String localIp,
String id)
delete directory åˆ é™¤ç›®å½• |
void |
deleteFile(String localIp,
String id)
delete file åˆ é™¤æ–‡ä»¶ |
char |
deleteFriend(int qqNum)
delete a friend åˆ é™¤ä¸€ä¸ªå¥½å‹ |
void |
deleteShared(String localIp,
int qq)
cancel other share with self å–æ¶ˆæŸäººå¯¹è‡ªå·±çš„共享 |
char |
deleteSignature()
delete the singnature åˆ é™¤ä¸ªæ€§ç¾å |
void |
detectHidden(int receiver)
explore opposite whether is hidden... |
void |
dismissCluster(int clusterId)
dismiss the cluster 解散群 |
void |
downloadFile(String localIp,
int diskOwner,
String fileId,
int offset,
int length)
dowmload file 下载一个文件 |
void |
downloadFriend(int beginFrom)
download the friends groupping 下载好å‹åˆ†ç»„ |
void |
downloadFriendRemark(int qqNum)
download remark information of friend 下载好å‹å¤‡æ³¨ä¿¡æ¯ |
void |
downloadGroup()
download groupping 下载分组åç§° |
void |
exitCluster(int clusterId)
exit a cluster 退出一个群 |
void |
exitTempCluster(byte type,
int clusterId,
int parentClusterId)
exit a temp cluster 退出一个临时群 |
void |
finalizeUpload(String localIp,
String id)
finish the upload 结æŸä¸Šä¼ |
void |
firePacketArrivedEvent(PacketEvent e)
notify the package reach event to package processor 通知包处ç†å™¨åŒ…到达事件 |
void |
fireQQEvent(QQEvent e)
fire QQ event 触å‘QQ事件 |
String |
generateCrashReport(Throwable e,
Packet p)
when catch a Exceotion , generate a crash report 在程åºå‡ºçްè¿è¡Œæ—¶å¼‚常时产生一个崩溃报告 |
void |
getCard(int clusterId,
int qq)
get the cluster Card which contain someone who is the member in thr cluster 得到æŸä¸ªæˆå‘˜çš„群å片 |
void |
getCardBatch(int clusterId,
int start)
batch get the Cards of cluster 批é‡å¾—到群å片 |
void |
getClusterInfo(int clusterId)
request for information of cluster è¯·æ±‚ç¾¤çš„ä¿¡æ¯ |
void |
getClusterMemberInfo(int clusterId,
List<? extends Object> members)
get the information of member in the cluster å¾—åˆ°ç¾¤ä¸æˆå‘˜çš„ä¿¡æ¯ |
void |
getClusterOnlineMember(int clusterId)
get the online members in the cluster 得到群的在线æˆå‘˜ |
IConnection |
getConnection(InetSocketAddress address)
according the remote address to get a port æ ¹æ®è¿œç¨‹åœ°å€å¾—到一个port |
IConnection |
getConnection(String name)
get a port å¾—åˆ°ä¸€ä¸ªç«¯å£ |
IConnectionPolicy |
getConnectionPolicy(InPacket in)
get the policy of the input package that relate port 得到和æŸä¸ªè¾“入包相关的端å£ç–ç•¥ |
IConnectionPolicyFactory |
getConnectionPolicyFactory()
|
IConnectionPool |
getConnectionPool()
|
IConnectionPoolFactory |
getConnectionPoolFactory()
|
void |
getCustomHeadData(int qq,
int timestamp,
int offset,
int length,
String port)
request get data of the custom head è¯·æ±‚å¾—åˆ°è‡ªå®šä¹‰å¤´åƒæ•°æ® |
void |
getCustomHeadData(int qq,
int timestamp,
String port)
request get the data of custom head è¯·æ±‚å¾—åˆ°è‡ªå®šä¹‰å¤´åƒæ•°æ® |
void |
getCustomHeadInfo(List<Integer> qq,
String port)
request gte the information of custom face 请求得到自定义头åƒä¿¡æ¯ |
void |
getDialogList()
requset get the list of muliti dialog 请求得到多人对è¯åˆ—表 |
void |
getDiskServerList(String localIp)
request get the list of network disk server 请求得到网络硬盘æœåŠ¡å™¨åˆ—è¡¨ |
void |
getFileSize(String localIp,
String id)
get the size of file å¾—åˆ°æ–‡ä»¶å¤§å° |
void |
getFriendLevel(List<Integer> friends)
get the level of friend 得到好å‹ç‰çº§ |
void |
getFriendList()
request to get the friends , if succesful ,will fire the event which are get Friend list success and get friend list end user need to listening the evnets to get all the informations of friend 请求å–得好å‹åå•,如果æˆåŠŸï¼Œå°†ä¼šè§¦å‘get friend list successå’Œ get friend list end事件,用户需è¦ç›‘å¬è¿™ä¸¤ä¸ªäº‹ä»¶æ¥å¾—到所有的 好å‹ä¿¡æ¯ |
void |
getFriendList(char position)
request to get the friend list , the position point to the Offset that is beginning of list, suggest that elementary user do not use the API 请求å–得好å‹åå•,position指定了åå•开始的å移,建议åˆçº§ç”¨æˆ·ä¸è¦ä½¿ç”¨æ¤API |
void |
getFriendOnline()
get the current online buddy list 请求å–得当å‰åœ¨çº¿å¥½å‹åˆ—表 |
void |
getFriendOnline(int startPosition)
get the current online buddy list 请求å–得当å‰åœ¨çº¿å¥½å‹åˆ—表 |
String |
getLoginServer()
ip of login server |
IConnectionPool |
getPortGate()
|
int |
getProxyType()
|
IRobot |
getRobot()
|
void |
getSharedDisk(String localIp)
get the share list of network dist 得到共享网络硬盘列表 |
void |
getShareList(String localIp,
int dirId)
get the diretory which the list that share with many friend 得到æŸä¸ªç›®å½•对哪些好å‹å…±äº«çš„列表 |
void |
getSignature(List<Signature> sigs)
get the singnatrue 得到个性ç¾å |
void |
getSubjectList(int clusterId)
request get the list of discussion 请求得到讨论组列表 |
void |
getTempClusterInfo(byte type,
int clusterId,
int parentClusterId)
request message of temp cluster è¯·æ±‚ä¸´æ—¶ç¾¤ä¿¡æ¯ |
QQUser |
getUser()
|
void |
getUserInfo(int qqNum)
get the detial information of user å¾—åˆ°ä¸€ä¸ªç”¨æˆ·çš„è¯¦ç»†ä¿¡æ¯ |
void |
getUserProperty(char startPosition)
get the property of user 得到用户属性 |
char |
getWeather()
request the weather forecast of self 请求自己这里的天气预报 |
char |
getWeather(byte[] ip)
request weather forecast 请求天气预报 |
boolean |
isEmpty()
|
boolean |
isLogging()
|
boolean |
isRobotMode()
|
char |
joinCluster(int clusterId)
join into cluster åŠ å…¥ç¾¤ |
void |
keepAlive()
send keep alive package å‘é€keep alive包 |
void |
listMyDiskDir(String localIp)
show the directory of my network disk 列我的网络硬盘目录 |
void |
listMyDiskDir(String localIp,
int dirId,
int unknown)
show the directory of my network disk 列我的网络硬盘目录 |
void |
listSharedDiskDir(String localIp,
int diskOwner)
show the share directory of network disk 列共享网络硬盘目录 |
void |
login()
login , use the defaul port 登陆,使用缺çœç«¯å£ |
protected void |
login(String server,
int p)
use the indicate server and port to login 用指定的æœåŠ¡å™¨å’Œç«¯å£ç™»å½• |
void |
logout()
exit the QQ dialog 退出QQä¼šè¯ |
void |
makeMeAway()
make my statu change to away ä½¿æˆ‘çš„çŠ¶æ€æ”¹å˜æˆç¦»å¼€ |
void |
makeMeHidden()
make my statu change to hidden ä½¿æˆ‘çš„çŠ¶æ€æ”¹å˜ä¸ºéšèº« |
void |
makeMeOnline()
make my statu change to online ä½¿æˆ‘çš„çŠ¶æ€æ”¹å˜æˆåœ¨çº¿ |
void |
modifyCard(int clusterId,
Card card)
modify Card of cluster 修改群å片 |
char |
modifyClusterInfo(int clusterId,
String name,
String notice,
String description,
int oldCategory,
int category,
byte authType)
modify information of fixed cluster ä¿®æ”¹å›ºå®šç¾¤ä¿¡æ¯ |
char |
modifyClusterMember(int clusterId,
byte operation,
List<Integer> members)
modify member list of cluster 修改群的æˆå‘˜åˆ—表 |
void |
modifyInfo(String oldPassword,
String newPassword,
ContactInfo contactInfo)
modify personal information of user ä¿®æ”¹ç”¨æˆ·çš„ä¸ªäººä¿¡æ¯ |
char |
modifySignature(String sig)
modify singnature 修改个性ç¾å |
char |
modifyTempClusterInfo(byte type,
int clusterId,
int parentClusterId,
String name)
modify information of temp cluster ä¿®æ”¹ä¸´æ—¶ç¾¤ä¿¡æ¯ |
char |
modifyTempClusterMember(byte type,
int clusterId,
int parentClusterId,
byte operation,
List<Integer> members)
modify information of temp cluster 修改临时群æˆå‘˜ |
void |
moveDirectory(String localIp,
int id,
int fromId,
int toId)
move directory 移动目录 |
void |
moveFile(String localIp,
String id,
int fromId,
int toId)
move file 移动文件 |
void |
notifyFilePort(int receiver,
int directPort,
byte[] localIp,
int localPort,
char sequence)
senf information package that is notity to port å‘é€é€šçŸ¥ç«¯å£ä¿¡æ¯åŒ… |
void |
pleaseConnectMe(int receiver,
int directPort,
char sequence)
request opposite connect to me 请求对方连接我 |
void |
prepareUpload(String localIp,
String id)
ready to uplaod å‡†å¤‡ä¸Šä¼ |
void |
qqEvent(QQEvent e)
QQ event, user can get concrete event type from the variable type. |
void |
rejectAddMe(int qqNum,
String message)
if i wanna reject the request which a person wanna add me as friend , invoke this method to send the reject message å¦‚æžœæˆ‘è¦æ‹’ç»ä¸€ä¸ªäººåŠ æˆ‘ä¸ºå¥½å‹çš„请求,用这个方法å‘逿‹’ç»æ¶ˆæ¯ |
void |
rejectJoinCluster(int clusterId,
int receiver,
String message)
reject join the cluster æ‹’ç»åŠ å…¥ç¾¤ |
void |
rejectSendFile(int receiver,
char sequence,
boolean udp)
send package that is reject received file å‘逿‹’ç»æŽ¥æ”¶æ–‡ä»¶åŒ… |
void |
release()
release the QQClient , if not continute to use the QQClient , must release rhe resource by singleExecutor 释放这个QQClient,如果ä¸ç»§ç»ä½¿ç”¨QQClient,则必须释放æ¤å®¢æˆ·ç«¯ä»¥ä¾¿ SingleExecutoré‡Šæ”¾èµ„æº |
void |
releaseConnection(String name)
close a port å…³é—ä¸€ä¸ªç«¯å£ |
void |
removeFriendFromList(int qqNum)
把好å‹ä»ŽæœåŠ¡å™¨ç«¯çš„å¥½å‹åˆ—表ä¸åˆ 除 |
InPacket |
removeIncomingPacket()
received the first package in the queue , and remove it 从接收队列ä¸å¾—到第一个包,并且把这个包从队列ä¸ç§»é™¤ |
void |
removeQQListener(IQQListener listener)
removed a QQ event listening 移去一个QQ事件监å¬å™¨ |
void |
removeResendPacket(InPacket packet)
delete a resend package åˆ é™¤ä¸€ä¸ªé‡å‘包 |
void |
removeSelfFrom(int qqNum)
delete self from other's buddy list 把æŸäººçš„好å‹åˆ—表ä¸çš„è‡ªå·±åˆ é™¤ |
void |
renameDirectory(String localIp,
int id,
String newName)
rename a directory é‡å‘½å一个目录 |
void |
renameDirectory(String localIp,
String id,
String newName)
rename directory é‡å‘½å一个目录 |
void |
renameFile(String localIp,
String id,
String newName)
rename file é‡å‘½å一个文件 |
char |
replyFaceData(int sessionId,
String port)
reply the data of face which transit server have received 回å¤ä¸è½¬æœåŠ¡å™¨å·²ç»æ”¶åˆ°è¡¨æƒ…æ•°æ® |
char |
requestAgent(int clusterId,
int imageLength,
byte[] md5,
String fileName,
String port)
request transit server 请求ä¸è½¬æœåС噍 |
char |
requestData(int sessionId,
String port)
request to send the face picture data 请求å‘é€è¡¨æƒ…å›¾ç‰‡æ•°æ® |
char |
requestFace(int clusterId,
int sessionId,
byte[] key,
String port)
request to get the face picture 请求得到表情图片 |
char |
requestJoinCluster(int clusterId,
String message)
request to join the cluster è¯·æ±‚åŠ å…¥ç¾¤ |
void |
requestKey(byte request)
request the key 请求密钥 |
char |
requestReceiveBegin(int sessionId,
byte[] key,
String port)
request start to received session è¯·æ±‚å¼€å§‹æŽ¥æ”¶ä¼šè¯ |
void |
requestSendBegin(int sessionId,
byte[] md5,
String port)
request start a session è¯·æ±‚å¼€å§‹ä¸€ä¸ªä¼šè¯ |
char |
requestSendFile(int receiver,
String filePath,
int fileSize,
int directPort,
boolean udp)
send request package which is transport file , return the package sequence as session sequence å‘é€ä¼ 逿–‡ä»¶è¯·æ±‚包,我们把包åºå·ç”¨ä½œä¼šè¯åºå·è¿”回 |
char |
searchClusterById(int externalId)
according external id to search the cluster æ ¹æ®å¤–部IDæœç´¢ç¾¤ |
char |
searchDemoCluster()
search the demo cluster æœç´¢ç¤ºèŒƒç¾¤ |
char |
searchUser(int page)
search all the users who is online æœç´¢æ‰€æœ‰çš„在线用户 |
char |
searchUser(int page,
String qqStr,
String nick,
String email)
custom search user 自定义æœç´¢ç”¨æˆ· |
char |
searchUserAdvanced(int page,
boolean online,
boolean hasCam,
int provinceIndex,
int cityIndex,
int ageIndex,
int genderIndex)
|
char |
sendAddFriendAuth(int qqNum,
String message)
if the person who we wanna add as friend need authorize ,use this method to send the authenticate request 如果è¦åŠ çš„äººéœ€è¦è®¤è¯ï¼Œç”¨è¿™ä¸ªæ–¹æ³•å‘é€éªŒè¯è¯·æ±‚ |
void |
sendClusterIM(int clusterId,
String message)
send cluster message å‘é€ç¾¤æ¶ˆæ¯ |
void |
sendClusterIM(int clusterId,
String message,
char messageId,
int totalFragments,
int fragmentSequence)
send the message of fixed cluster å‘é€å›ºå®šç¾¤æ¶ˆæ¯ |
void |
sendClusterIM(int clusterId,
String message,
char messageId,
int totalFragments,
int fragmentSequence,
String fontName,
boolean bold,
boolean italic,
boolean underline,
int fontSize,
int red,
int green,
int blue)
send the message of fixed cluster å‘é€å›ºå®šç¾¤æ¶ˆæ¯ |
void |
sendIM(int receiver,
byte[] message)
send a message , use the indicate font å‘é€ä¸€ä¸ªæ¶ˆæ¯ï¼Œç”¨ç»™å®šçš„å—体 |
void |
sendIM(int receiver,
byte[] message,
byte replyType)
send a message , can indicate the reply type å‘é€ä¸€æ¡æ¶ˆæ¯ï¼Œå¯ä»¥æŒ‡å®šå›žå¤ç±»åž‹ |
void |
sendIM(int receiver,
byte[] message,
char messageId,
int totalFragments,
int fragementSequence,
String fontName,
boolean bold,
boolean italic,
boolean underline,
int size,
int red,
int green,
int blue,
byte replyType)
å‘逿™®é€šæ¶ˆæ¯ |
void |
sendIM(int receiver,
byte[] message,
String fontName,
boolean bold,
boolean italic,
boolean underline,
int size,
int red,
int green,
int blue,
byte replyType)
send a message , indicate the font and color å‘é€ä¸€ä¸ªæ¶ˆæ¯ï¼ŒæŒ‡å®šå—体和å—体颜色 |
void |
sendPacket(OutPacket packet)
General method , send a package this method use in the complex circs which some construct package , for example the package that upload the information of groupping the source of the data in the package is unknow .. |
void |
sendPacket(OutPacket packet,
String port)
send a pcakage by appoint to the port 通过指定portå‘é€ä¸€ä¸ªåŒ… |
void |
sendPacket(OutPacket packet,
String port,
boolean monitor)
send a pcakage by appoint to the port 通过指定portå‘é€ä¸€ä¸ªåŒ… |
void |
sendPacketAnyway(OutPacket packet,
String port)
no matter whether is loginging , send the package anyway. |
char |
sendSMS(List<String> mobiles,
List<Integer> qq,
String senderName,
byte[] message,
char seq)
send short message å‘é€çŸä¿¡ |
void |
sendTempClusterIM(byte type,
int clusterId,
int parentClusterId,
String message)
send message of temp cluster å‘é€ä¸´æ—¶ç¾¤æ¶ˆæ¯ |
void |
sendTempClusterIM(byte type,
int clusterId,
int parentClusterId,
String message,
char messageId,
int totalFragments,
int fragmentSequence)
send message of temp cluster å‘é€ä¸´æ—¶ç¾¤æ¶ˆæ¯ |
void |
sendTempClusterIM(byte type,
int clusterId,
int parentClusterId,
String message,
char messageId,
int totalFragments,
int fragmentSequence,
String fontName,
boolean bold,
boolean italic,
boolean underline,
int fontSize,
int red,
int green,
int blue)
send message of temp cluster å‘é€ä¸´æ—¶ç¾¤æ¶ˆæ¯ |
void |
sendTempSessionIM(int receiver,
String message,
String myNick)
send the message of temp session å‘é€ä¸´æ—¶ä¼šè¯æ¶ˆæ¯ |
void |
sendTempSessionIM(int receiver,
String message,
String myNick,
String fontName,
boolean bold,
boolean italic,
boolean underline,
int size,
int red,
int green,
int blue)
å‘é€ä¸´æ—¶ä¼šè¯æ¶ˆæ¯ |
void |
setConnectionPolicyFactory(IConnectionPolicyFactory policyFactory)
|
void |
setConnectionPoolFactory(IConnectionPoolFactory poolFactory)
|
void |
setDiskPassword(String localIp,
String oldPassword,
String newPassword)
set the pass word of network hard disk 设置网络硬盘密ç |
void |
setLogging(boolean logging)
set loginig logo 设置æ£åœ¨ç™»é™†æ ‡å¿— |
void |
setLoginRedirect(boolean loginRedirect)
|
void |
setLoginServer(String loginServer)
|
void |
setMemberRole(int clusterId,
int qq,
byte opCode)
set role of member in the cluster 设置群æˆå‘˜è§’色 |
void |
setProxy(InetSocketAddress proxyAddress)
set proxy server address è®¾ç½®ä»£ç†æœåŠ¡å™¨åœ°å€ |
void |
setProxyPassword(String password)
|
void |
setProxyType(String type)
set proxy type 设置代ç†ç±»åž‹ |
void |
setProxyUsername(String username)
|
void |
setRobot(IRobot robot)
|
void |
setRobotMode(boolean robotMode)
set robot statu è®¾ç½®æœºå™¨äººçŠ¶æ€ |
void |
setSearchMeByQQOnly()
set only can find me out by QQ number 设置仅能通过QQå·æ‰¾åˆ°æˆ‘ |
void |
setTcpLoginPort(int tcpLoginPort)
|
void |
setUser(QQUser user)
|
void |
shareDirectory(String localIp,
int dirId,
List<Integer> remove,
List<Integer> add)
share the directory 共享æŸä¸ªç›®å½• |
void |
shareMyGeography()
share my geographical position 共享我的地ç†ä½ç½® |
char |
transferFaceData(int sessionId,
byte[] fragment,
boolean last,
String port)
send the face file data ä¼ é€è¡¨æƒ…æ–‡ä»¶æ•°æ® |
char |
transferFaceInfo(int sessionId,
int imageLength,
String fileName,
byte[] md5,
String port)
send the face file information ä¼ é€è¡¨æƒ…æ–‡ä»¶ä¿¡æ¯ |
void |
transferRole(int clusterId,
int qq)
trnasfer role 转让身份 |
void |
unsetSearchMeByQQOnly()
cancel set only find me out by QQ number å–æ¶ˆè®¾ç½®ä»…能通过QQå·æ‰¾åˆ°æˆ‘ |
void |
unshareDirectory(String localIp,
int dirId,
List<Integer> remove,
List<Integer> add)
cansel the direcotry that is share with others å–æ¶ˆå…±äº«æŸä¸ªç›®å½• |
void |
unshareMyGeography()
not share my geographical position ä¸å…±äº«æˆ‘的地ç†ä½ç½® |
void |
updateOrganization(int clusterId)
update structure of organized 更新组织架构 |
void |
uploadFile(String localIp,
String id,
int offset,
int length,
byte[] bytes)
upload file ä¸Šä¼ æ–‡ä»¶ |
void |
uploadFriendRemark(int qqNum,
FriendRemark remark)
upload remark information of friend ä¸Šä¼ å¥½å‹å¤‡æ³¨ä¿¡æ¯ |
void |
uploadGroup(List<String> groups)
upload groupping ä¸Šä¼ åˆ†ç»„åç§° |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final SingleExecutor executor
protected Callable<Object> packetEventTrigger
protected ResendTrigger<Object> resendTrigger
protected Runnable keepAliveTrigger
protected ScheduledFuture<?> keepAliveFuture
protected Queue<InPacket> receiveQueue
protected Map<InPacket,String> inConn
protected static final int PROCESSOR_COUNT
Constructor Detail |
---|
public QQClient()
Method Detail |
---|
public IConnectionPolicy getConnectionPolicy(InPacket in)
in
- reply package
回å¤åŒ…
public void setProxyType(String type)
type
- public int getProxyType()
public void setProxy(InetSocketAddress proxyAddress)
proxyAddress
- public void keepAlive()
public void shareMyGeography()
public void unshareMyGeography()
public void setSearchMeByQQOnly()
public void unsetSearchMeByQQOnly()
public char getWeather(byte[] ip)
ip
- public char getWeather()
ip
- public void uploadFriendRemark(int qqNum, FriendRemark remark)
qqNum
- QQ number of friend
好å‹çš„QQå·remark
- public void downloadFriendRemark(int qqNum)
qqNum
- QQ number of friend
好å‹çš„QQå·public void batchDownloadFriendRemark(int page)
page
- sequencepublic char searchUserAdvanced(int page, boolean online, boolean hasCam, int provinceIndex, int cityIndex, int ageIndex, int genderIndex)
page
- online
- hasCam
- provinceIndex
- cityIndex
- ageIndex
- genderIndex
-
public char searchUser(int page)
page
- sequence ,start 0
public char searchUser(int page, String qqStr, String nick, String email)
page
- sequenceqqNum
- Stringnick
- nickname of we wanna search the QQ useremail
- matchEntire
- whether mathc the entire string
public char addFriend(int qqNum)
qqNum
- qq number who we wanna add
public char deleteFriend(int qqNum)
qqNum
-
public void removeSelfFrom(int qqNum)
qqNum
- we wanna delete self in the other's buddy listpublic void removeFriendFromList(int qqNum)
qqNum
- è¦åˆ 除的好å‹QQå·public void addFriendToList(int group, int qqNum)
group
- 好å‹çš„组å·ï¼Œæˆ‘的好å‹ç»„是0ï¼Œç„¶åŽæ˜¯1,2,...qqNum
- è¦æ·»åŠ çš„å¥½å‹QQå·public char sendAddFriendAuth(int qqNum, String message)
qqNum
- qq number of person who we wanna add as friendmessage
- the request addistional message
public void detectHidden(int receiver)
public char requestSendFile(int receiver, String filePath, int fileSize, int directPort, boolean udp)
filePath
- the file name , but not caontian the pathfileSize
- directPort
- udp
- true indicate by UDP
public void cancelSendFile(int receiver, char sequence)
receiver
- sequence
- public void acceptSendFile(int receiver, int directPort, char sequence, boolean udp)
receiver
- directPort
- my directPortsequence
- the sequence of sessionudp
- true indicate by UDPpublic void rejectSendFile(int receiver, char sequence, boolean udp)
receiver
- sequence
- session seqenceudp
- true indicate UDP , else TCPpublic void notifyFilePort(int receiver, int directPort, byte[] localIp, int localPort, char sequence)
receiver
- directPort
- localIp
- localPort
- sequence
- public void pleaseConnectMe(int receiver, int directPort, char sequence)
receiver
- directPort
- sequence
- public void rejectAddMe(int qqNum, String message)
qqNum
- the qq number of a person who wanna add me as friendthe
- additional messagepublic void approveAddMe(int qqNum)
qqNum
- the qq number of someone who wanna add me as friendpublic void downloadFriend(int beginFrom)
beginFrom
- the number where is begin from
起始好å‹å·public void uploadGroup(List<String> groups)
groups
- public void downloadGroup()
public char createTemporaryCluster(String name, byte type, int parentClusterId, List<Integer> members)
name
- cluster's nametype
- type of the temp clusterparentClusterId
- inner ID of parent cluster
父群内部IDmembers
-
public void createPermanentCluster(String name, String notice, String description, List<Integer> members, int category, byte authType)
name
- cluster's namenotice
- notice of clusterdescription
- description of clustermembers
- members in the clusterauthType
- the type of authentication in the clustercategory
- assort clusterspublic void getClusterInfo(int clusterId)
clusterId
- cluster inner ID
群内部IDpublic void setMemberRole(int clusterId, int qq, byte opCode)
clusterId
- cluster inner ID
群内部idqq
- the member that is need to set
需è¦è®¾ç½®çš„æˆå‘˜opCode
- Operatoin codepublic void transferRole(int clusterId, int qq)
clusterId
- cluster inner ID
群内部idqq
- who you wanna transfer the role topublic void getCardBatch(int clusterId, int start)
clusterId
- start
- public void getCard(int clusterId, int qq)
clusterId
- qq
- public void modifyCard(int clusterId, Card card)
clusterId
- card
- public void updateOrganization(int clusterId)
clusterId
- cluster inner ID
群内部IDpublic char commitOrganization(int clusterId, List<QQOrganization> organizations)
clusterId
- organizations
- public char commitMemberOrganization(int clusterId, List<Member> members)
clusterId
- members
-
public void getTempClusterInfo(byte type, int clusterId, int parentClusterId)
type
- clusterId
- parentClusterId
- public void getClusterOnlineMember(int clusterId)
clusterId
- public void activateCluster(int clusterId)
clusterId
- public void activateTempCluster(byte type, int clusterId, int parentClusterId)
type
- clusterId
- parentClusterId
- public void getClusterMemberInfo(int clusterId, List<? extends Object> members)
clusterId
- the inner ID of clustermembers
- QQ number list of member, the type of elemnet is Inreger or Member
æˆå‘˜çš„QQå·åˆ—è¡¨ï¼Œå…ƒç´ ç±»åž‹æ˜¯Integer或者Memberpublic char modifyClusterMember(int clusterId, byte operation, List<Integer> members)
clusterId
- operation
- Typemembers
-
public char modifyTempClusterMember(byte type, int clusterId, int parentClusterId, byte operation, List<Integer> members)
type
- of temp clusterclusterId
- of temp cluster
临时群idparentClusterId
- 父群IDoperation
- type of operattionmembers
- æˆå‘˜QQå·æ•°ç»„
public char modifyClusterInfo(int clusterId, String name, String notice, String description, int oldCategory, int category, byte authType)
clusterId
- cluster Inner IDname
- of clusternotice
- of clusterdescription
- of clusteroldCategory
- cluster category at the old version 2004category
- authType
- authorize type of cluster
public char modifyTempClusterInfo(byte type, int clusterId, int parentClusterId, String name)
type
- clusterId
- parentClusterId
- name
-
public char sendSMS(List<String> mobiles, List<Integer> qq, String senderName, byte[] message, char seq)
mobiles
- the moblie number of receiver
接å—者的手机å·ç qq
- the qq number of receiver
接å—者的QQå·ç senderName
- å‘é€è€…åç§°message
- 消æ¯å—节数组seq
- sequence of message
消æ¯åºå·
public void sendClusterIM(int clusterId, String message)
clusterId
- the inner id of clustermessage
- message content
消æ¯å†…容public void sendClusterIM(int clusterId, String message, char messageId, int totalFragments, int fragmentSequence)
clusterId
- the inner id of cluster
群内部IDmessage
- 消æ¯messageId
- 消æ¯idtotalFragments
- the number of total fragments
分片数fragmentSequence
- 分片åºå·public void sendClusterIM(int clusterId, String message, char messageId, int totalFragments, int fragmentSequence, String fontName, boolean bold, boolean italic, boolean underline, int fontSize, int red, int green, int blue)
clusterId
- message
- messageId
- totalFragments
- fragmentSequence
- fontName
- bold
- italic
- underline
- fontSize
- red
- green
- blue
- public void sendTempClusterIM(byte type, int clusterId, int parentClusterId, String message)
type
- type is temp cluster
临时群类型clusterId
- inner id of cluster
群内部idparentClusterId
- 父群idmessage
- 消æ¯public void sendTempClusterIM(byte type, int clusterId, int parentClusterId, String message, char messageId, int totalFragments, int fragmentSequence)
type
- type is temp cluster
临时群类型clusterId
- inner id of cluster
群内部idparentClusterId
- 父群idmessage
- 消æ¯messageId
- 消æ¯idtotalFragments
- number of total fragments
分片数fragmentSequence
- 分片åºå·public void sendTempClusterIM(byte type, int clusterId, int parentClusterId, String message, char messageId, int totalFragments, int fragmentSequence, String fontName, boolean bold, boolean italic, boolean underline, int fontSize, int red, int green, int blue)
type
- clusterId
- parentClusterId
- message
- messageId
- totalFragments
- fragmentSequence
- fontName
- bold
- italic
- underline
- fontSize
- red
- green
- blue
- public void exitCluster(int clusterId)
clusterId
- inner id of cluster
群内部IDpublic void dismissCluster(int clusterId)
clusterId
- public void exitTempCluster(byte type, int clusterId, int parentClusterId)
type
- clusterId
- parentClusterId
- public char searchClusterById(int externalId)
externalId
- external id of cluster
群的外部ID
public char searchDemoCluster()
public char joinCluster(int clusterId)
clusterId
-
public char requestJoinCluster(int clusterId, String message)
clusterId
- inner id of cluster
群内部IDmessage
- addtional message of request
è¯·æ±‚çš„é™„åŠ ä¿¡æ¯
public void approveJoinCluster(int clusterId, int receiver)
clusterId
- public void rejectJoinCluster(int clusterId, int receiver, String message)
clusterId
- message
- public void modifyInfo(String oldPassword, String newPassword, ContactInfo contactInfo)
oldPassword
- the old pass word , if do not changed it ,set it null
è€å¯†ç ,如果ä¸ä¿®æ”¹å¯†ç ,设æˆnullnewPassword
- the new pass word, if do not changed it ,set it null
新密ç ,如果ä¸ä¿®æ”¹å¯†ç ,设æˆnullcontactInfo
- other information
å…¶ä»–ä¿¡æ¯public char modifySignature(String sig)
sig
- singnature
个性ç¾åpublic char deleteSignature()
public void getSignature(List<Signature> sigs)
sigs
- public void getFriendLevel(List<Integer> friends)
friends
- public void getUserInfo(int qqNum)
qqNum
- the number of user that we wanna get
想è¦å¾—到的用户QQå·public void getFriendList()
public void getFriendList(char position)
position
- public void getFriendOnline()
public void getFriendOnline(int startPosition)
public void getUserProperty(char startPosition)
startPosition
- public void makeMeOnline()
public void makeMeAway()
public void makeMeHidden()
public void requestKey(byte request)
request
- public void getDialogList()
public void getSubjectList(int clusterId)
clusterId
- cluster Idpublic void sendPacket(OutPacket packet)
packet
- sub class of the OutPacket
OutPacketåç±»public void sendPacket(OutPacket packet, String port)
packet
- port
- public void sendPacket(OutPacket packet, String port, boolean monitor)
packet
- output package object
输出包对象port
- port name
portåç§°monitor
- true mean add to listening buffer of package
trueè¡¨ç¤ºåŠ å…¥åˆ°åŒ…ç›‘è§†ç¼“å†²public void sendPacketAnyway(OutPacket packet, String port)
packet
- port
- public String getLoginServer()
public QQUser getUser()
public void addQQListener(IQQListener listener)
listener
- QQListenerpublic void removeQQListener(IQQListener listener)
listener
- QQListenerpublic void fireQQEvent(QQEvent e)
e
- QQEventpublic void login() throws Exception
Exception
- if login occur error ,throw the Exception
如果登录出错protected void login(String server, int p) throws Exception
server
- login serverp
- the port for login
Exception
- if login occur error ,throw the Exception
如果登录出错public void logout()
public void release()
public void qqEvent(QQEvent e)
IQQListener
qqEvent
in interface IQQListener
e
- QQEventpublic void sendTempSessionIM(int receiver, String message, String myNick)
receiver
- message
- public void sendTempSessionIM(int receiver, String message, String myNick, String fontName, boolean bold, boolean italic, boolean underline, int size, int red, int green, int blue)
receiver
- message
- fontName
- bold
- italic
- underline
- size
- red
- green
- blue
- public void sendIM(int receiver, byte[] message)
receiver
- the qq number of receiver
接å—者QQå·message
- 消æ¯fontName
- å—体public void sendIM(int receiver, byte[] message, byte replyType)
receiver
- the qq number of receiver
接收者QQå·message
- 消æ¯fontName
- å—体åreplyType
- reply type , normal or automatic
å›žå¤æ–¹å¼ï¼Œæ£å¸¸å›žå¤è¿˜æ˜¯è‡ªåŠ¨å›žå¤public void sendIM(int receiver, byte[] message, String fontName, boolean bold, boolean italic, boolean underline, int size, int red, int green, int blue, byte replyType)
receiver
- 接å—者QQå·message
- 消æ¯fontName
- å—体bold
- 是å¦ç²—体italic
- æ˜¯å¦æ–œä½“underline
- 是å¦ä¸‹åˆ’线size
- å—体大å°ï¼Œæœ€å¤§æ˜¯31red
- 颜色Redgreen
- 颜色Greenblue
- 颜色BluereplyType
- reply type , normal or automatic
回å¤ç±»åž‹ï¼Œè‡ªåŠ¨å›žå¤è¿˜æ˜¯æ£å¸¸å›žå¤public void sendIM(int receiver, byte[] message, char messageId, int totalFragments, int fragementSequence, String fontName, boolean bold, boolean italic, boolean underline, int size, int red, int green, int blue, byte replyType)
receiver
- message
- messageId
- totalFragments
- fragementSequence
- fontName
- bold
- italic
- underline
- size
- red
- green
- blue
- replyType
- public void setLoginServer(String loginServer)
loginServer
- the ip string of login server
登陆æœåС噍IPpublic void setUser(QQUser user)
user
- The user to set.public boolean isLogging()
public void setProxyPassword(String password)
password
- The password to set.public void setProxyUsername(String username)
username
- The username to set.public void setLoginRedirect(boolean loginRedirect)
loginRedirect
- The loginRedirect to set.public void setTcpLoginPort(int tcpLoginPort)
tcpLoginPort
- The tcpLoginPort to set.public boolean isRobotMode()
public void setRobotMode(boolean robotMode)
robotMode
- public void setLogging(boolean logging)
logging
- public void addIncomingPacket(InPacket packet, String portName)
packet
- public InPacket removeIncomingPacket()
public boolean isEmpty()
public void firePacketArrivedEvent(PacketEvent e)
e
- public IConnectionPool getPortGate()
public void removeResendPacket(InPacket packet)
packet
- public void addResendPacket(OutPacket packet, String port)
packet
- port
- public void releaseConnection(String name)
name
- port name
端å£åç§°public IConnection getConnection(String name)
name
- port name
端å£å
public IConnection getConnection(InetSocketAddress address)
address
- romote port address
端å£è¿œç¨‹åœ°å€
public char requestAgent(int clusterId, int imageLength, byte[] md5, String fileName, String port)
clusterId
- inner id of cluster
群内部IDimageLength
- length of image
图片大å°md5
- md5 of image
图片md5port
- port name
端å£åç§°
public void requestSendBegin(int sessionId, byte[] md5, String port)
sessionId
- id of session
会è¯idport
- port name
端å£åç§°public char requestReceiveBegin(int sessionId, byte[] key, String port)
sessionId
- key
- port
-
public char requestData(int sessionId, String port)
port
-
public char replyFaceData(int sessionId, String port)
sessionId
- port
-
public char transferFaceInfo(int sessionId, int imageLength, String fileName, byte[] md5, String port)
sessionId
- imageLength
- fileName
- md5
- port
-
public char transferFaceData(int sessionId, byte[] fragment, boolean last, String port)
sessionId
- fragment
- last
- port
-
public char requestFace(int clusterId, int sessionId, byte[] key, String port)
clusterId
- sessionId
- agentToken
- key
-
public void getCustomHeadInfo(List<Integer> qq, String port)
qq
- qq number list of request
请求的QQå·åˆ—表port
- send port
å‘é€ç«¯å£åpublic void getCustomHeadData(int qq, int timestamp, String port)
qq
- timestamp
- port
- public void getCustomHeadData(int qq, int timestamp, int offset, int length, String port)
qq
- timestamp
- offset
- length
- port
- public void getDiskServerList(String localIp)
localIp
- public void authenticateDisk(String localIp, String nick, String password)
localIp
- 本地ipnick
- 昵称password
- 密ç ,如果没有密ç ,置为nullpublic void getSharedDisk(String localIp)
localIp
- public void listSharedDiskDir(String localIp, int diskOwner)
localIp
- diskOwner
- public void listMyDiskDir(String localIp)
localIp
- public void listMyDiskDir(String localIp, int dirId, int unknown)
localIp
- dirId
- public void setDiskPassword(String localIp, String oldPassword, String newPassword)
localIp
- oldPassword
- newPassword
- public void cancelDiskPassword(String localIp, String oldPassword)
localIp
- oldPassword
- public void downloadFile(String localIp, int diskOwner, String fileId, int offset, int length)
localIp
- diskOwner
- fileId
- offset
- length
- public void renameFile(String localIp, String id, String newName)
localIp
- id
- newName
- public void renameDirectory(String localIp, int id, String newName)
localIp
- id
- newName
- public void renameDirectory(String localIp, String id, String newName)
localIp
- id
- newName
- public void deleteFile(String localIp, String id)
localIp
- id
- public void deleteDirectory(String localIp, int id)
localIp
- id
- public void deleteDirectory(String localIp, String id)
localIp
- id
- public void deleteShared(String localIp, int qq)
localIp
- qq
- public void createDirectory(String localIp, String name, int parentId)
localIp
- name
- parentId
- public void createFile(String localIp, String name, int parentId, int length)
localIp
- name
- parentId
- length
- public void moveFile(String localIp, String id, int fromId, int toId)
localIp
- id
- fromId
- toId
- public void moveDirectory(String localIp, int id, int fromId, int toId)
localIp
- id
- fromId
- toId
- public void uploadFile(String localIp, String id, int offset, int length, byte[] bytes)
localIp
- id
- offset
- length
- bytes
- public void finalizeUpload(String localIp, String id)
localIp
- id
- public void prepareUpload(String localIp, String id)
localIp
- id
- public void getFileSize(String localIp, String id)
localIp
- id
- public void getShareList(String localIp, int dirId)
localIp
- dirId
- public void shareDirectory(String localIp, int dirId, List<Integer> remove, List<Integer> add)
localIp
- dirId
- remove
- add
- public void unshareDirectory(String localIp, int dirId, List<Integer> remove, List<Integer> add)
localIp
- dirId
- remove
- add
- public void applyDisk(String localIp)
localIp
- public void setRobot(IRobot robot)
robot
- The robot to set.public IRobot getRobot()
public String generateCrashReport(Throwable e, Packet p)
e
- exceptoin object
异常对象p
- package object
包对象
public IConnectionPolicyFactory getConnectionPolicyFactory()
public void setConnectionPolicyFactory(IConnectionPolicyFactory policyFactory)
policyFactory
- the policyFactory to setpublic IConnectionPool getConnectionPool()
public IConnectionPoolFactory getConnectionPoolFactory()
public void setConnectionPoolFactory(IConnectionPoolFactory poolFactory)
poolFactory
- the poolFactory to set
|
JML | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |