|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.util.HttpClient
public final class HttpClient
| Constructor Summary | |
|---|---|
HttpClient()
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
boolean |
isValidEndPoint(String url)
|
boolean |
isValidEndPoint(URL url)
|
boolean |
sendMessageToEndPoint(String url,
String message,
boolean async)
Sends a message to a particular endpoint. |
void |
setAcceptableCodes(int[] acceptableCodes)
Set the acceptable HTTP status codes that we will use to determine if the response from the URL was correct. |
void |
setConnectionTimeout(int connectionTimeout)
|
void |
setExecutorService(ExecutorService executorService)
Note that changing this executor will affect all httpClients. |
void |
setFollowRedirects(boolean follow)
Determines the behavior on receiving 3xx responses from HTTP endpoints. |
void |
setReadTimeout(int readTimeout)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpClient()
| Method Detail |
|---|
public void setExecutorService(ExecutorService executorService)
executorService -
public boolean sendMessageToEndPoint(String url,
String message,
boolean async)
This is useful when it doesn't matter about the response as you'll perform no action based on the response.
url - the url to send the message tomessage - the message itselfasync - true if you don't want to wait for the response, false otherwise.
public boolean isValidEndPoint(String url)
public boolean isValidEndPoint(URL url)
public final void setAcceptableCodes(int[] acceptableCodes)
acceptableCodes - an array of status code integers.public void setConnectionTimeout(int connectionTimeout)
public void setReadTimeout(int readTimeout)
public void setFollowRedirects(boolean follow)
follow - True to follow 3xx redirects (default), false otherwise.
public void destroy()
throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||