java.lang.Object
cloud.piranha.http.netty.NettyHttpServerRequest
- All Implemented Interfaces:
HttpServerRequest
public class NettyHttpServerRequest extends java.lang.Object implements HttpServerRequest
The Netty implementation of HTTP Server Request.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
Constructors Constructor Description NettyHttpServerRequest(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.FullHttpRequest request)
Constructor. -
Method Summary
Modifier and Type Method Description java.lang.String
getHeader(java.lang.String name)
Get the header.java.util.Iterator<java.lang.String>
getHeaderNames()
Get the header names.java.util.Iterator<java.lang.String>
getHeaders(java.lang.String name)
Get the headers.java.io.InputStream
getInputStream()
Get the input stream.java.lang.String
getLocalAddress()
Get the local address.java.lang.String
getLocalHostname()
Get the local hostname.int
getLocalPort()
Get the local port.java.lang.String
getMethod()
Get the method.java.lang.String
getProtocol()
Get the protocoljava.lang.String
getQueryParameter(java.lang.String name)
Get the query parameter.java.lang.String
getQueryString()
Get the query string.java.lang.String
getRemoteAddress()
Get the remote address.java.lang.String
getRemoteHostname()
Get the remote hostname.int
getRemotePort()
Get the remote port.java.lang.String
getRequestTarget()
Get the request target.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
NettyHttpServerRequest
public NettyHttpServerRequest(io.netty.channel.ChannelHandlerContext context, io.netty.handler.codec.http.FullHttpRequest request)Constructor.- Parameters:
request
- the HTTP request.context
- the context.
-
-
Method Details
-
getHeader
public java.lang.String getHeader(java.lang.String name)Description copied from interface:HttpServerRequest
Get the header.- Specified by:
getHeader
in interfaceHttpServerRequest
- Parameters:
name
- the name of the header.- Returns:
- the value, or null.
-
getHeaderNames
public java.util.Iterator<java.lang.String> getHeaderNames()Description copied from interface:HttpServerRequest
Get the header names.- Specified by:
getHeaderNames
in interfaceHttpServerRequest
- Returns:
- the header names.
-
getHeaders
public java.util.Iterator<java.lang.String> getHeaders(java.lang.String name)Description copied from interface:HttpServerRequest
Get the headers.- Specified by:
getHeaders
in interfaceHttpServerRequest
- Parameters:
name
- the name of the header.- Returns:
- the potentially empty collection.
-
getInputStream
public java.io.InputStream getInputStream()Description copied from interface:HttpServerRequest
Get the input stream.- Specified by:
getInputStream
in interfaceHttpServerRequest
- Returns:
- the input stream.
-
getLocalAddress
public java.lang.String getLocalAddress()Description copied from interface:HttpServerRequest
Get the local address.- Specified by:
getLocalAddress
in interfaceHttpServerRequest
- Returns:
- the local address.
-
getLocalHostname
public java.lang.String getLocalHostname()Description copied from interface:HttpServerRequest
Get the local hostname.- Specified by:
getLocalHostname
in interfaceHttpServerRequest
- Returns:
- the local hostname.
-
getLocalPort
public int getLocalPort()Description copied from interface:HttpServerRequest
Get the local port.- Specified by:
getLocalPort
in interfaceHttpServerRequest
- Returns:
- the local port.
-
getMethod
public java.lang.String getMethod()Description copied from interface:HttpServerRequest
Get the method.- Specified by:
getMethod
in interfaceHttpServerRequest
- Returns:
- the method.
-
getQueryParameter
public java.lang.String getQueryParameter(java.lang.String name)Description copied from interface:HttpServerRequest
Get the query parameter.- Specified by:
getQueryParameter
in interfaceHttpServerRequest
- Parameters:
name
- the name.- Returns:
- the value, or null if not found.
-
getQueryString
public java.lang.String getQueryString()Description copied from interface:HttpServerRequest
Get the query string.- Specified by:
getQueryString
in interfaceHttpServerRequest
- Returns:
- the query string.
-
getRemoteAddress
public java.lang.String getRemoteAddress()Description copied from interface:HttpServerRequest
Get the remote address.- Specified by:
getRemoteAddress
in interfaceHttpServerRequest
- Returns:
- the remote address.
-
getRemoteHostname
public java.lang.String getRemoteHostname()Description copied from interface:HttpServerRequest
Get the remote hostname.- Specified by:
getRemoteHostname
in interfaceHttpServerRequest
- Returns:
- the remote hostname.
-
getRemotePort
public int getRemotePort()Description copied from interface:HttpServerRequest
Get the remote port.- Specified by:
getRemotePort
in interfaceHttpServerRequest
- Returns:
- the remote port.
-
getRequestTarget
public java.lang.String getRequestTarget()Description copied from interface:HttpServerRequest
Get the request target.- Specified by:
getRequestTarget
in interfaceHttpServerRequest
- Returns:
- the request target.
-
getProtocol
public java.lang.String getProtocol()Description copied from interface:HttpServerRequest
Get the protocol- Specified by:
getProtocol
in interfaceHttpServerRequest
- Returns:
- the protocol
-