Package org.yamcs.http
Class StaticFileHandler
java.lang.Object
org.yamcs.http.HttpHandler
org.yamcs.http.StaticFileHandler
- Direct Known Subclasses:
 AngularHandler
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final Stringprotected StringFields inherited from class org.yamcs.http.HttpHandler
log, MIME - 
Constructor Summary
ConstructorsConstructorDescriptionStaticFileHandler(String route, Path staticRoot) StaticFileHandler(String route, List<Path> staticRoots)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected Stringvoidhandle(HandlerContext ctx) protected FilelocateFile(String pathString) booleanprotected voidsetContentTypeHeader(io.netty.handler.codec.http.HttpResponse response, File file) Sets the content type header for the HTTP Responseprotected static voidsetDateHeader(io.netty.handler.codec.http.HttpResponse response) Sets the Date header for the HTTP responsevoidsetStaticRoots(List<Path> staticRoots) voidsetZeroCopyEnabled(boolean zeroCopyEnabled) Methods inherited from class org.yamcs.http.HttpHandler
doHandle, getAccessTokenFromCookie 
- 
Field Details
- 
HTTP_CACHE_SECONDS
public static final int HTTP_CACHE_SECONDS- See Also:
 
 - 
HTTP_DATE_FORMAT
- See Also:
 
 - 
HTTP_DATE_GMT_TIMEZONE
- See Also:
 
 - 
route
 - 
staticRoots
 
 - 
 - 
Constructor Details
- 
StaticFileHandler
 - 
StaticFileHandler
 
 - 
 - 
Method Details
- 
requireAuth
public boolean requireAuth()- Specified by:
 requireAuthin classHttpHandler
 - 
setZeroCopyEnabled
public void setZeroCopyEnabled(boolean zeroCopyEnabled)  - 
setStaticRoots
 - 
handle
- Specified by:
 handlein classHttpHandler
 - 
getFilePath
 - 
locateFile
 - 
setContentTypeHeader
Sets the content type header for the HTTP Response- Parameters:
 file- file to extract content type
 - 
setDateHeader
protected static void setDateHeader(io.netty.handler.codec.http.HttpResponse response) Sets the Date header for the HTTP response 
 -