Package io.milton.servlet
Class ServletResource
java.lang.Object
io.milton.servlet.ServletResource
- All Implemented Interfaces:
GetableResource,Resource
Used to provide access to servlet resources via milton. This just wraps the
normal processing of the resource in a milton compatible interface
- Author:
- brad
-
Constructor Summary
ConstructorsConstructorDescriptionServletResource(File file, String localPath, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse response) ServletResource(String localPath, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(String user, String password) booleanauthorise(Request request, Request.Method method, Auth auth) checkRedirect(Request request) intgetContentType(String preferredList) getMaxAgeSeconds(Auth auth) getName()getRealm()voidsendContent(OutputStream out, Range range, Map<String, String> params, String contentType)
-
Constructor Details
-
ServletResource
-
ServletResource
public ServletResource(String localPath, jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse response)
-
-
Method Details
-
getUniqueId
- Specified by:
getUniqueIdin interfaceResource
-
compareTo
-
sendContent
public void sendContent(OutputStream out, Range range, Map<String, String> params, String contentType) throws IOException- Specified by:
sendContentin interfaceGetableResource- Throws:
IOException
-
getName
-
authenticate
- Specified by:
authenticatein interfaceResource
-
authorise
-
getRealm
-
getModifiedDate
- Specified by:
getModifiedDatein interfaceResource
-
getContentLength
- Specified by:
getContentLengthin interfaceGetableResource
-
getContentType
- Specified by:
getContentTypein interfaceGetableResource
-
checkRedirect
- Specified by:
checkRedirectin interfaceResource
-
getMaxAgeSeconds
- Specified by:
getMaxAgeSecondsin interfaceGetableResource
-
getLockToken
-