public abstract class RestCall extends java.lang.Object implements java.util.concurrent.Callable<Response>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
agent |
protected java.io.File |
body |
protected ContentType |
contentType |
protected boolean |
disableGZIP |
protected DispositionType |
dispositionType |
ReSTTask |
fjt |
protected Friend |
friend |
static java.lang.String |
HEADER_LOCATION |
protected Method |
method |
protected ReSTPlugin |
plugin |
protected java.io.File |
propertiesFile |
int |
timeoutMS |
protected java.net.URL |
url |
Constructor and Description |
---|
RestCall(Method method,
java.net.URL url,
ReSTPlugin plugin,
java.lang.String agent,
java.io.File propertiesFile,
java.io.File body,
int timeoutMS,
boolean disableGZIP,
Friend friend,
ContentType contentType,
DispositionType dispositionType)
The ReST call.
|
Modifier and Type | Method and Description |
---|---|
Response |
call()
Make the call
|
protected abstract Response |
doCall()
Make the call
|
java.io.File |
getBody() |
Method |
getMethod() |
java.lang.String |
getURL() |
protected void |
mantainFileHistory(java.util.Properties p,
java.io.File cacheFile) |
java.lang.String |
toString() |
public static final java.lang.String HEADER_LOCATION
public ReSTTask fjt
protected final java.io.File propertiesFile
protected final java.io.File body
protected final Method method
protected final java.net.URL url
protected final java.lang.String agent
protected final ReSTPlugin plugin
public final int timeoutMS
protected final Friend friend
protected final boolean disableGZIP
protected final ContentType contentType
protected final DispositionType dispositionType
public RestCall(@Nonnull Method method, @Nonnull java.net.URL url, @Nullable ReSTPlugin plugin, @Nullable java.lang.String agent, @Nullable java.io.File propertiesFile, @Nullable java.io.File body, @Nonnegative int timeoutMS, boolean disableGZIP, @Nullable Friend friend, @Nullable ContentType contentType, @Nullable DispositionType dispositionType)
method
- the methodurl
- the URL.plugin
- any authorization.agent
- the agent string to use.propertiesFile
- the properties filebody
- the call bodytimeoutMS
- the timeout in milliseconds ( if any)disableGZIP
- true to NOT accept GZIP encoding, default is falsefriend
- the friendcontentType
- the content typedispositionType
- the disposition type@CheckReturnValue @Nonnull public java.lang.String getURL()
@CheckReturnValue @Nonnull public Method getMethod()
public java.io.File getBody()
@CheckReturnValue @Nonnull public java.lang.String toString()
toString
in class java.lang.Object
@CheckReturnValue @Nonnull public Response call() throws java.lang.Exception
call
in interface java.util.concurrent.Callable<Response>
java.lang.Exception
- a serious problem.@CheckReturnValue @Nonnull protected abstract Response doCall() throws java.lang.Exception
java.lang.Exception
- a serious problem.protected void mantainFileHistory(@Nonnull java.util.Properties p, @Nonnull java.io.File cacheFile) throws java.io.IOException
java.io.IOException
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.