|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.client.ClientBase
public class ClientBase
A class for doing http requests.
Constructor Summary | |
---|---|
ClientBase()
Create a new ClientBase. |
Method Summary | |
---|---|
java.util.logging.Logger |
getLogger()
Get the logger that this client is using |
NioHandler |
getNioHandler()
Get the NioHandler that this client is using |
java.net.URL |
getRedirectedURL(HttpHeader request,
java.lang.String location)
Create the url that the response redirected the request to. |
HttpHeader |
getRequest(java.lang.String method,
java.lang.String url)
Submit a new request, using the given method to the given url. |
void |
sendRequest(HttpHeader request,
ClientListener client)
Send a request and let the client be notified on response. |
void |
shutdown()
Shutdown this client handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClientBase() throws java.io.IOException
java.io.IOException
- if creating the nio handler failsMethod Detail |
---|
public HttpHeader getRequest(java.lang.String method, java.lang.String url) throws java.io.IOException
method
- HEAD or GET or POST or ...url
- the url to do the http request against.
java.io.IOException
- if the url is not really an URLpublic NioHandler getNioHandler()
public java.util.logging.Logger getLogger()
public void shutdown()
public void sendRequest(HttpHeader request, ClientListener client)
request
- the request to sendclient
- the listener to notify with the responsepublic java.net.URL getRedirectedURL(HttpHeader request, java.lang.String location) throws java.io.IOException
request
- the actual request madelocation
- the redirect location
java.io.IOException
- if the redirect url can not be created
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |