public final class HttpClient extends Object implements Serializable, org.springframework.beans.factory.DisposableBean
| Constructor and Description |
|---|
HttpClient() |
| Modifier and Type | Method and Description |
|---|---|
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 |
setReadTimeout(int readTimeout) |
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)
Copyright © 2004-2012 Jasig. All Rights Reserved.