Package cloud.piranha.http.impl
Class DefaultHttpServerRequest
java.lang.Object
cloud.piranha.http.impl.DefaultHttpServerRequest
- All Implemented Interfaces:
HttpServerRequest
public class DefaultHttpServerRequest extends Object implements HttpServerRequest
The default implementation of HTTP Server Request.
- Author:
- Manfred Riem (mriem@manorrock.com)
-
Constructor Summary
Constructors Constructor Description DefaultHttpServerRequest(Socket socket)Constructor. -
Method Summary
Modifier and Type Method Description voidaddHeader(String name, String value)Add the header.StringgetHeader(String name)Iterator<String>getHeaderNames()InputStreamgetInputStream()StringgetLocalAddress()StringgetLocalHostname()intgetLocalPort()StringgetMethod()StringgetQueryParameter(String name)StringgetQueryString()StringgetRemoteAddress()Get the remote address.StringgetRemoteHostname()intgetRemotePort()StringgetRequestTarget()voidsetMethod(String method)Set the method.voidsetRequestTarget(String requestTarget)Set the request target.
-
Constructor Details
-
DefaultHttpServerRequest
Constructor.- Parameters:
socket- the socket.
-
-
Method Details
-
addHeader
Add the header.- Parameters:
name- the name.value- the value.
-
getHeader
- Specified by:
getHeaderin interfaceHttpServerRequest- See Also:
HttpServerRequest.getHeader(java.lang.String)
-
getHeaderNames
- Specified by:
getHeaderNamesin interfaceHttpServerRequest- See Also:
HttpServerRequest.getHeaderNames()
-
getInputStream
- Specified by:
getInputStreamin interfaceHttpServerRequest- See Also:
HttpServerRequest.getInputStream()
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceHttpServerRequest- See Also:
HttpServerRequest.getLocalAddress()
-
getLocalHostname
- Specified by:
getLocalHostnamein interfaceHttpServerRequest- See Also:
HttpServerRequest.getLocalHostname()
-
getLocalPort
public int getLocalPort()- Specified by:
getLocalPortin interfaceHttpServerRequest- See Also:
HttpServerRequest.getLocalPort()
-
getMethod
- Specified by:
getMethodin interfaceHttpServerRequest- See Also:
HttpServerRequest.getMethod()
-
getQueryParameter
- Specified by:
getQueryParameterin interfaceHttpServerRequest- See Also:
HttpServerRequest.getQueryParameter(java.lang.String)
-
getQueryString
- Specified by:
getQueryStringin interfaceHttpServerRequest- See Also:
HttpServerRequest.getQueryString()
-
getRemoteAddress
Get the remote address.- Specified by:
getRemoteAddressin interfaceHttpServerRequest- Returns:
- the remote address.
-
getRemoteHostname
- Specified by:
getRemoteHostnamein interfaceHttpServerRequest- See Also:
HttpServerRequest.getRemoteHostname()
-
getRemotePort
public int getRemotePort()- Specified by:
getRemotePortin interfaceHttpServerRequest- See Also:
HttpServerRequest.getRemotePort()
-
getRequestTarget
- Specified by:
getRequestTargetin interfaceHttpServerRequest- See Also:
HttpServerRequest.getRequestTarget()
-
setMethod
Set the method.- Parameters:
method- the method.
-
setRequestTarget
Set the request target.- Parameters:
requestTarget- the request target.
-