Package de.alexanderwodarz.code.rest
Class ClientThread
java.lang.Object
java.lang.Thread
de.alexanderwodarz.code.rest.ClientThread
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionClientThread(String url, ClientThread.RequestMethod method) ClientThread(String url, ClientThread.RequestMethod method, com.sun.jersey.api.client.config.ClientConfig config) ClientThread(String url, ClientThread.RequestMethod method, com.sun.jersey.api.client.config.ClientConfig config, int readTimeOut) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoidaddMultiPart(String key, String value) com.sun.jersey.api.client.ClientResponsestatic SSLContextgetKeyStore(String path, String password) intvoidrerun(String url, ClientThread.RequestMethod method) voidrun()voidsetBody(org.json.JSONObject body) voidsetBodyRaw(String body) voidsetHeaders(HashMap<String, String> headers) voidsetMediaType(String type) voidsetResponse(String response) voidsetStatus(int status) 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
-
Constructor Details
-
ClientThread
-
ClientThread
public ClientThread(String url, ClientThread.RequestMethod method, com.sun.jersey.api.client.config.ClientConfig config) -
ClientThread
public ClientThread(String url, ClientThread.RequestMethod method, com.sun.jersey.api.client.config.ClientConfig config, int readTimeOut)
-
-
Method Details
-
getKeyStore
-
addCookie
-
addCookie
-
rerun
-
getClientResponse
public com.sun.jersey.api.client.ClientResponse getClientResponse() -
getResponse
-
setResponse
-
getStatus
public int getStatus() -
setStatus
public void setStatus(int status) -
setHeaders
-
setBodyRaw
-
setMediaType
-
setBody
public void setBody(org.json.JSONObject body) -
addForm
-
addMultiPart
-
run
public void run()
-