|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.rest.util.RESTCall
public abstract class RESTCall
Constructor Summary | |
---|---|
protected |
RESTCall(org.apache.commons.httpclient.HttpMethod method)
|
Method Summary | ||
---|---|---|
void |
addRequestHeader(java.lang.String key,
java.lang.String value)
|
|
protected void |
assertExecuted()
|
|
protected void |
assertNotExecuted()
|
|
void |
execute()
|
|
protected abstract java.lang.String |
getAction()
Returns the HTTP action (POST/GET/HEAD/etc) |
|
java.io.InputStream |
getResponseAsStream()
|
|
byte[] |
getResponseBody()
Returns the response body as a byte array. |
|
int |
getStatusCode()
|
|
java.net.URI |
getURI()
|
|
protected void |
marshal(java.lang.Object obj,
java.io.OutputStream out)
|
|
void |
release()
Releases the resources held by the underlying HTTP request. |
|
void |
setBasicCredentials(java.lang.String username,
java.lang.String password)
Configured this call to use Basic HTTP Authentication using the specified username and password. |
|
void |
setClientProxy()
|
|
void |
setMarshalledClasses(java.lang.Class... classes)
|
|
|
unmarshal(java.lang.Class<T> responseType)
|
|
protected java.lang.Object |
unmarshal(java.io.InputStream in)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RESTCall(org.apache.commons.httpclient.HttpMethod method)
Method Detail |
---|
public void setMarshalledClasses(java.lang.Class... classes) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
protected abstract java.lang.String getAction()
protected void marshal(java.lang.Object obj, java.io.OutputStream out) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
protected java.lang.Object unmarshal(java.io.InputStream in) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBException
public <T> T unmarshal(java.lang.Class<T> responseType) throws java.io.IOException, javax.xml.bind.JAXBException
java.io.IOException
javax.xml.bind.JAXBException
protected void assertExecuted()
protected void assertNotExecuted()
public void setBasicCredentials(java.lang.String username, java.lang.String password)
username
- password
- public void setClientProxy()
public void addRequestHeader(java.lang.String key, java.lang.String value)
public void execute()
public int getStatusCode()
public byte[] getResponseBody()
public java.io.InputStream getResponseAsStream() throws java.io.IOException
java.io.IOException
public java.net.URI getURI() throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |