JML

net.sf.jqql
Enum QQPort

java.lang.Object
  extended by java.lang.Enum<QQPort>
      extended by net.sf.jqql.QQPort
All Implemented Interfaces:
Serializable, Comparable<QQPort>

public enum QQPort
extends Enum<QQPort>

some default port's difinition of QQ 一些缺省的QQ端口定义

Author:
luma

Enum Constant Summary
CLUSTER_CUSTOM_FACE
           
CUSTOM_HEAD_DATA
           
CUSTOM_HEAD_INFO
           
DISK
           
MAIN
           
 
Field Summary
 String name
           
 
Method Summary
 IConnection create(QQClient client, InetSocketAddress server, InetSocketAddress proxy, boolean start)
          Create port 创建Port
 IConnection create(QQClient client, InetSocketAddress server, InetSocketAddress proxy, String username, String password, boolean start)
          Create port 创建Port
static QQPort valueOf(String name)
          Returns the enum constant of this type with the specified name.
static QQPort[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MAIN

public static final QQPort MAIN

CLUSTER_CUSTOM_FACE

public static final QQPort CLUSTER_CUSTOM_FACE

CUSTOM_HEAD_INFO

public static final QQPort CUSTOM_HEAD_INFO

CUSTOM_HEAD_DATA

public static final QQPort CUSTOM_HEAD_DATA

DISK

public static final QQPort DISK
Field Detail

name

public String name
Method Detail

values

public static final QQPort[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QQPort c : QQPort.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QQPort valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

create

public IConnection create(QQClient client,
                          InetSocketAddress server,
                          InetSocketAddress proxy,
                          boolean start)
                   throws IOException
Create port 创建Port

Parameters:
client - QQClient Object QQClient对象
server - Server Address 服务器地址
proxy - Agent Address ,if no ,set it null. 代理地址,如果不用代理,为null
start - true indicate start at once true表示立刻启动
Returns:
IPort Object, if create it fail ,return null. IPort对象,如果创建失败,返回null
Throws:
IOException
UnknownHostException

create

public IConnection create(QQClient client,
                          InetSocketAddress server,
                          InetSocketAddress proxy,
                          String username,
                          String password,
                          boolean start)
                   throws IOException,
                          UnknownHostException
Create port 创建Port

Parameters:
client - QQClient Object QQClient对象
server - Server Address 服务器地址
proxy - Agent Address ,if no ,set it null. 代理地址,如果不用代理,为null
username - username of Agent 代理用户名
password - password of Agent 代理密码
start - true indicate start at once true表示立刻启动
Returns:
IPort Object, if create it fail ,return null. IPort对象,如果创建失败,返回null
Throws:
IOException
UnknownHostException

JML