Package com.jalios.io
Class HttpClientThread
- java.lang.Object
-
- java.lang.Thread
-
- com.jalios.io.HttpClientThread
-
- All Implemented Interfaces:
java.lang.Runnable
public class HttpClientThread extends java.lang.Thread
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpClientclientprotected static intcyclesprotected static java.lang.StringINprotected static java.lang.Object[]reqCountprotected static intREQCOUNTprotected static intreqCountCptprotected static java.lang.StringREQUESTprotected static long[]timeCountprotected static inttimeCountCptprotected static longtimeMaxprotected static java.lang.Stringurl
-
Constructor Summary
Constructors Constructor Description HttpClientThread(java.lang.String commonUrl, int commonCycles)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcomputeTime(long time)The Synchronized method that compute overall timestatic voiddump()static voidmain(java.lang.String[] args)The Main Methodvoidrun()The Run method that call a request-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
REQUEST
protected static final java.lang.String REQUEST
- See Also:
- Constant Field Values
-
IN
protected static final java.lang.String IN
- See Also:
- Constant Field Values
-
REQCOUNT
protected static final int REQCOUNT
- See Also:
- Constant Field Values
-
url
protected static java.lang.String url
-
cycles
protected static int cycles
-
timeMax
protected static long timeMax
-
reqCount
protected static java.lang.Object[] reqCount
-
reqCountCpt
protected static int reqCountCpt
-
timeCount
protected static long[] timeCount
-
timeCountCpt
protected static int timeCountCpt
-
client
protected HttpClient client
-
-
Method Detail
-
run
public void run()
The Run method that call a request- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
computeTime
protected static void computeTime(long time)
The Synchronized method that compute overall time- Parameters:
time- the time to compute
-
dump
public static void dump()
-
main
public static void main(java.lang.String[] args)
The Main Method- Parameters:
args- the arguments (URL cycles clients)
-
-