public class HttpRequest
extends io.netty.handler.codec.http.DefaultFullHttpRequest
DefaultFullHttpRequest| Modifier and Type | Class and Description |
|---|---|
class |
HttpRequest.Auth
The authentication parameters for a request.
|
| Constructor and Description |
|---|
HttpRequest(io.netty.handler.codec.http.FullHttpRequest req) |
HttpRequest(io.netty.handler.codec.http.HttpVersion httpVersion,
io.netty.handler.codec.http.HttpMethod method,
String uri,
io.netty.buffer.ByteBuf content)
Application code will not have any use with the constructors as the application
code will always process on an initialized request object.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequest.Auth |
auth()
Returns the auth object of this request.
|
String |
getStaticFile()
Get the static file set in this request
|
String |
getStaticUrlResource()
Get the static resource set in this request
|
String |
methodName()
Get the HTTP method
|
Map<String,List<String>> |
params()
Returns the URL parameters.
|
String |
path()
Returns the URL path, example, for url
GET /aalam/base/users?param1=value¶m2=value, the path will be
/aalam/base/users
|
RouteMatch |
routeMatch()
Application will have no use with this method.
|
void |
setAnonymousAuth()
This method will be used by the framework internally.
|
void |
setCookieAuth(String email)
This method will be used by the framework internally.
|
void |
setCookieAuth(String email,
Integer userId)
This method will be used by the framework internally.
|
void |
setExternalAuth(String from)
This method will be used by the framework internally.
|
void |
setExternalAuth(String from,
String userEmail,
Integer id)
This method will be used by the framework internally.
|
void |
setInternalAuth(String from,
String userEmail)
This method will be used by the framework internally.
|
void |
setRouteMatch(RouteMatch obj)
Application will have no use with this method.
|
void |
setStaticInfo(String resource,
String file)
Though applications can pre-inform the static URL and the way to access the
static data through build plugin, there might be some situation which would
want to send a static file on a non-static URL.
|
void |
setTokenAuth(String appId)
This method will be used by the framework internally.
|
void |
setUserPermissions(HashSet<Integer> permissions)
Application will have no use with this method.
|
HashSet<Integer> |
userPermissions()
Get the permissions of the user initiating this request
|
content, copy, copy, duplicate, equals, hashCode, refCnt, release, release, retain, retain, setMethod, setProtocolVersion, setUri, toString, touch, touch, trailingHeadersgetMethod, getUri, method, urigetProtocolVersion, headers, protocolVersiondecoderResult, getDecoderResult, setDecoderResultclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMethod, getUri, method, uripublic HttpRequest(io.netty.handler.codec.http.HttpVersion httpVersion,
io.netty.handler.codec.http.HttpMethod method,
String uri,
io.netty.buffer.ByteBuf content)
public HttpRequest(io.netty.handler.codec.http.FullHttpRequest req)
public String path()
public Map<String,List<String>> params()
public void setRouteMatch(RouteMatch obj)
public RouteMatch routeMatch()
public String methodName()
public void setUserPermissions(HashSet<Integer> permissions)
public HashSet<Integer> userPermissions()
public void setStaticInfo(String resource, String file)
resource - A unique name of this resource. This name should not clash
with any of the other static resources.file - The path to the resourcepublic String getStaticUrlResource()
public String getStaticFile()
public HttpRequest.Auth auth()
public void setCookieAuth(String email, Integer userId)
public void setCookieAuth(String email)
public void setTokenAuth(String appId)
public void setInternalAuth(String from, String userEmail)
public void setExternalAuth(String from)
public void setExternalAuth(String from, String userEmail, Integer id)
public void setAnonymousAuth()
Copyright © 2017. All rights reserved.