Package com.avoka.tm.vo
Class RestCFG
- java.lang.Object
-
- com.avoka.tm.vo.RestCFG
-
public class RestCFG extends Object
Provide a Rest CFG value object class to map Json Object to HttpRequest.- Since:
- 22.4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RestCFG.Authorisation
Provides an Authorisation.static class
RestCFG.FileParam
Provides a multi-part FileParam.static class
RestCFG.MethodType
The HTTP Methods.static class
RestCFG.Proxy
Provides a proxy.
-
Constructor Summary
Constructors Constructor Description RestCFG()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RestCFG.Authorisation
getAuthorisation()
Return the config authorisation.int
getConnectionTimeout()
return the connection timeout in milliseconds.List<RestCFG.FileParam>
getFiles()
Return the list of multi-part FileParam.Map<String,String>
getHeaders()
Return the config request headers.String
getMessage()
Get the POST or PUT message body.byte[]
getMessageData()
Get the POST or PUT message body.RestCFG.MethodType
getMethodType()
return the HTTP Method.Map<String,String>
getParameters()
return the request form parameters.RestCFG.Proxy
getProxy()
Return the proxy details.String
getRestURL()
Return the request URL.int
getSocketTimeout()
Get the socket timeout in milliseconds.void
setAuthorisation(RestCFG.Authorisation authorisation)
Set the config authorisation.void
setConnectionTimeout(int connectionTimeout)
Set the connection timeouts in milliseconds.void
setFiles(List<RestCFG.FileParam> files)
Set the List of multi-part FileParam.void
setHeaders(Map<String,String> headers)
Set the config request headers.void
setMessage(String message)
Set the POST or PUT message body.void
setMessageData(byte[] messageData)
Set the POST or PUT message body.void
setMethodType(RestCFG.MethodType methodType)
Set the HTTP Method.void
setParameters(Map<String,String> parameters)
Set the request form parameters.void
setProxy(RestCFG.Proxy proxy)
Set the proxy details.void
setRestURL(String restURL)
Set the request URL.void
setSocketTimeout(int socketTimeout)
Set the socket timeout in milliseconds.The default socket read timeout is 60 seconds.
-
-
-
Method Detail
-
getAuthorisation
public RestCFG.Authorisation getAuthorisation()
Return the config authorisation.- Returns:
- the config authorisation
-
setAuthorisation
public void setAuthorisation(RestCFG.Authorisation authorisation)
Set the config authorisation.- Parameters:
authorisation
- the config authorisation- See Also:
RestCFG.Authorisation
-
getConnectionTimeout
public int getConnectionTimeout()
return the connection timeout in milliseconds.- Returns:
- the connection timeout
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
Set the connection timeouts in milliseconds.- Parameters:
connectionTimeout
- the connection timeouts
-
getFiles
public List<RestCFG.FileParam> getFiles()
Return the list of multi-part FileParam.- Returns:
- the list of multi-part FileParam
-
setFiles
public void setFiles(List<RestCFG.FileParam> files)
Set the List of multi-part FileParam.- Parameters:
files
- the List of multi-part FileParam
-
getHeaders
public Map<String,String> getHeaders()
Return the config request headers.- Returns:
- the map of request headers
-
setHeaders
public void setHeaders(Map<String,String> headers)
Set the config request headers.- Parameters:
headers
- the map of request headers
-
getMessage
public String getMessage()
Get the POST or PUT message body.- Returns:
- the POST or PUT message body
-
setMessage
public void setMessage(String message)
Set the POST or PUT message body. If specified the Content-Type will be set to 'plain/text'.- Parameters:
message
- the POST or PUT message body
-
getMessageData
public byte[] getMessageData()
Get the POST or PUT message body.- Returns:
- the POST or PUT message body
-
setMessageData
public void setMessageData(byte[] messageData)
Set the POST or PUT message body. If specified the Content-Type will be set to 'application/octet-stream'.- Parameters:
messageData
- the POST or PUT message body
-
getMethodType
public RestCFG.MethodType getMethodType()
return the HTTP Method.- Returns:
- the HTTP Method
-
setMethodType
public void setMethodType(RestCFG.MethodType methodType)
Set the HTTP Method.- Parameters:
methodType
- the HTTP Method
-
getParameters
public Map<String,String> getParameters()
return the request form parameters.- Returns:
- the request form parameters
-
setParameters
public void setParameters(Map<String,String> parameters)
Set the request form parameters.- Parameters:
parameters
- the request form parameters
-
getProxy
public RestCFG.Proxy getProxy()
Return the proxy details.- Returns:
- the proxy details
- See Also:
RestCFG.Proxy
-
setProxy
public void setProxy(RestCFG.Proxy proxy)
Set the proxy details.- Parameters:
proxy
- the proxy details
-
getRestURL
public String getRestURL()
Return the request URL.- Returns:
- the request URL
-
setRestURL
public void setRestURL(String restURL)
Set the request URL.- Parameters:
restURL
- the request URL
-
getSocketTimeout
public int getSocketTimeout()
Get the socket timeout in milliseconds.- Returns:
- the socket timeout in milliseconds
-
setSocketTimeout
public void setSocketTimeout(int socketTimeout)
Set the socket timeout in milliseconds.The default socket read timeout is 60 seconds.- Parameters:
socketTimeout
- the socket timeout in milliseconds
-
-