Package de.dytanic.cloudnet.http
Class V1HttpHandler
- java.lang.Object
-
- de.dytanic.cloudnet.driver.network.http.MethodHttpHandlerAdapter
-
- de.dytanic.cloudnet.http.V1HttpHandler
-
- All Implemented Interfaces:
IHttpHandler
,IMethodHttpHandler
- Direct Known Subclasses:
V1BridgeConfigurationHttpHandler
,V1CloudflareConfigurationHttpHandler
,V1HttpHandlerAuthentication
,V1HttpHandlerCluster
,V1HttpHandlerCommand
,V1HttpHandlerDatabase
,V1HttpHandlerGroups
,V1HttpHandlerLocalTemplate
,V1HttpHandlerLocalTemplateFileSystem
,V1HttpHandlerLogout
,V1HttpHandlerModules
,V1HttpHandlerPing
,V1HttpHandlerServices
,V1HttpHandlerStatus
,V1HttpHandlerTasks
,V1SecurityProtectionHttpHandler
,V1SignConfigurationHttpHandler
,V1SyncProxyConfigurationHttpHandler
public abstract class V1HttpHandler extends MethodHttpHandlerAdapter
-
-
Field Summary
Fields Modifier and Type Field Description protected static com.google.gson.Gson
GSON
protected static V1HttpSession
HTTP_SESSION
private java.lang.String
permission
-
Fields inherited from interface de.dytanic.cloudnet.driver.network.http.IHttpHandler
PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_LOWEST, PRIORITY_NORMAL
-
-
Constructor Summary
Constructors Constructor Description V1HttpHandler(java.lang.String permission)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkPermission(IHttpContext context, java.lang.String permission)
protected boolean
containsStringElementInCollection(java.util.Collection<java.lang.String> collection, java.lang.String name)
protected CloudNet
getCloudNet()
java.lang.String
getPermission()
void
handle(java.lang.String path, IHttpContext context)
protected IHttpContext
send400Response(IHttpContext context, java.lang.String reason)
protected IHttpContext
send403Response(IHttpContext context, java.lang.String reason)
protected IHttpContext
sendOptions(IHttpContext context, java.lang.String allowedMethods)
-
Methods inherited from class de.dytanic.cloudnet.driver.network.http.MethodHttpHandlerAdapter
handleConnect, handleDelete, handleGet, handleHead, handleOptions, handlePatch, handlePost, handlePut, handleTrace
-
-
-
-
Field Detail
-
GSON
protected static final com.google.gson.Gson GSON
-
HTTP_SESSION
protected static final V1HttpSession HTTP_SESSION
-
permission
private final java.lang.String permission
-
-
Method Detail
-
handle
public void handle(java.lang.String path, IHttpContext context) throws java.lang.Exception
- Throws:
java.lang.Exception
-
send400Response
protected IHttpContext send400Response(IHttpContext context, java.lang.String reason)
-
send403Response
protected IHttpContext send403Response(IHttpContext context, java.lang.String reason)
-
sendOptions
protected IHttpContext sendOptions(IHttpContext context, java.lang.String allowedMethods)
-
checkPermission
protected boolean checkPermission(IHttpContext context, java.lang.String permission)
-
containsStringElementInCollection
protected boolean containsStringElementInCollection(java.util.Collection<java.lang.String> collection, java.lang.String name)
-
getCloudNet
protected final CloudNet getCloudNet()
-
getPermission
public java.lang.String getPermission()
-
-