Package org.opennms.protocols.xml.config
Class Request
- java.lang.Object
-
- org.opennms.protocols.xml.config.Request
-
- All Implemented Interfaces:
Cloneable
public class Request extends Object implements Cloneable
The Class Request.- Author:
- Alejandro Galue
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeader(String name, String value)
Adds the header.void
addParameter(String name, String value)
Adds the parameter.Request
clone()
Content
getContent()
Gets the content.String
getHeader(String name)
Gets the value of a specific header.List<Header>
getHeaders()
Gets the headers.String
getMethod()
Gets the method.String
getParameter(String name)
Gets the value of a specific parameter.boolean
getParameterAsBoolean(String name)
int
getParameterAsInt(String name)
Gets the parameter as integer.List<Parameter>
getParameters()
Gets the parameters.void
setContent(Content content)
Sets the content.void
setHeaders(List<Header> headers)
Sets the headers.void
setMethod(String method)
Sets the method.void
setParameters(List<Parameter> parameters)
Sets the parameters.String
toString()
-
-
-
Constructor Detail
-
Request
public Request()
-
Request
public Request(Request copy)
-
-
Method Detail
-
getMethod
public String getMethod()
Gets the method.- Returns:
- the method
-
getParameter
public String getParameter(String name)
Gets the value of a specific parameter.- Parameters:
name
- the name- Returns:
- the parameter
-
getParameterAsInt
public int getParameterAsInt(String name)
Gets the parameter as integer.- Parameters:
name
- the name- Returns:
- the parameter value as integer
-
getParameterAsBoolean
public boolean getParameterAsBoolean(String name)
-
getHeader
public String getHeader(String name)
Gets the value of a specific header.- Parameters:
name
- the name- Returns:
- the header value
-
getContent
public Content getContent()
Gets the content.- Returns:
- the content
-
setMethod
public void setMethod(String method)
Sets the method.- Parameters:
method
- the new method
-
setParameters
public void setParameters(List<Parameter> parameters)
Sets the parameters.- Parameters:
parameters
- the new parameters
-
addParameter
public void addParameter(String name, String value)
Adds the parameter.- Parameters:
name
- the namevalue
- the value
-
setHeaders
public void setHeaders(List<Header> headers)
Sets the headers.- Parameters:
headers
- the new headers
-
addHeader
public void addHeader(String name, String value)
Adds the header.- Parameters:
name
- the namevalue
- the value
-
setContent
public void setContent(Content content)
Sets the content.- Parameters:
content
- the new content
-
-