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 voidaddHeader(String name, String value)Adds the header.voidaddParameter(String name, String value)Adds the parameter.Requestclone()ContentgetContent()Gets the content.StringgetHeader(String name)Gets the value of a specific header.List<Header>getHeaders()Gets the headers.StringgetMethod()Gets the method.StringgetParameter(String name)Gets the value of a specific parameter.booleangetParameterAsBoolean(String name)intgetParameterAsInt(String name)Gets the parameter as integer.List<Parameter>getParameters()Gets the parameters.voidsetContent(Content content)Sets the content.voidsetHeaders(List<Header> headers)Sets the headers.voidsetMethod(String method)Sets the method.voidsetParameters(List<Parameter> parameters)Sets the parameters.StringtoString()
-
-
-
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
-
-