org.csource.fastdfs
Class ClientGlobal

java.lang.Object
  extended by org.csource.fastdfs.ClientGlobal

public class ClientGlobal
extends java.lang.Object

Global variables

Version:
Version 1.11
Author:
Happy Fish / YuQing

Field Summary
static int DEFAULT_CONNECT_TIMEOUT
           
static int DEFAULT_NETWORK_TIMEOUT
           
static boolean g_anti_steal_token
           
static java.lang.String g_charset
           
static int g_connect_timeout
           
static int g_network_timeout
           
static java.lang.String g_secret_key
           
static TrackerGroup g_tracker_group
           
static int g_tracker_http_port
           
 
Method Summary
static boolean getG_anti_steal_token()
           
static java.lang.String getG_charset()
           
static int getG_connect_timeout()
           
static int getG_network_timeout()
           
static java.lang.String getG_secret_key()
           
static TrackerGroup getG_tracker_group()
           
static int getG_tracker_http_port()
           
static java.net.Socket getSocket(java.net.InetSocketAddress addr)
          construct Socket object
static java.net.Socket getSocket(java.lang.String ip_addr, int port)
          construct Socket object
static void init(java.lang.String conf_filename)
          load global variables
static boolean isG_anti_steal_token()
           
static void setG_anti_steal_token(boolean anti_steal_token)
           
static void setG_charset(java.lang.String charset)
           
static void setG_connect_timeout(int connect_timeout)
           
static void setG_network_timeout(int network_timeout)
           
static void setG_secret_key(java.lang.String secret_key)
           
static void setG_tracker_group(TrackerGroup tracker_group)
           
static void setG_tracker_http_port(int tracker_http_port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

g_connect_timeout

public static int g_connect_timeout

g_network_timeout

public static int g_network_timeout

g_charset

public static java.lang.String g_charset

g_tracker_http_port

public static int g_tracker_http_port

g_anti_steal_token

public static boolean g_anti_steal_token

g_secret_key

public static java.lang.String g_secret_key

g_tracker_group

public static TrackerGroup g_tracker_group

DEFAULT_CONNECT_TIMEOUT

public static final int DEFAULT_CONNECT_TIMEOUT
See Also:
Constant Field Values

DEFAULT_NETWORK_TIMEOUT

public static final int DEFAULT_NETWORK_TIMEOUT
See Also:
Constant Field Values
Method Detail

init

public static void init(java.lang.String conf_filename)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        MyException
load global variables

Parameters:
conf_filename - config filename
Throws:
java.io.FileNotFoundException
java.io.IOException
MyException

getSocket

public static java.net.Socket getSocket(java.lang.String ip_addr,
                                        int port)
                                 throws java.io.IOException
construct Socket object

Parameters:
ip_addr - ip address or hostname
port - port number
Returns:
connected Socket object
Throws:
java.io.IOException

getSocket

public static java.net.Socket getSocket(java.net.InetSocketAddress addr)
                                 throws java.io.IOException
construct Socket object

Parameters:
addr - InetSocketAddress object, including ip address and port
Returns:
connected Socket object
Throws:
java.io.IOException

getG_connect_timeout

public static int getG_connect_timeout()

setG_connect_timeout

public static void setG_connect_timeout(int connect_timeout)

getG_network_timeout

public static int getG_network_timeout()

setG_network_timeout

public static void setG_network_timeout(int network_timeout)

getG_charset

public static java.lang.String getG_charset()

setG_charset

public static void setG_charset(java.lang.String charset)

getG_tracker_http_port

public static int getG_tracker_http_port()

setG_tracker_http_port

public static void setG_tracker_http_port(int tracker_http_port)

getG_anti_steal_token

public static boolean getG_anti_steal_token()

isG_anti_steal_token

public static boolean isG_anti_steal_token()

setG_anti_steal_token

public static void setG_anti_steal_token(boolean anti_steal_token)

getG_secret_key

public static java.lang.String getG_secret_key()

setG_secret_key

public static void setG_secret_key(java.lang.String secret_key)

getG_tracker_group

public static TrackerGroup getG_tracker_group()

setG_tracker_group

public static void setG_tracker_group(TrackerGroup tracker_group)