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