Class RestrictedContentAdapter
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandler
-
- org.glassfish.appclient.server.core.jws.RestrictedContentAdapter
-
- Direct Known Subclasses:
AppClientHTTPAdapter
public class RestrictedContentAdapter extends org.glassfish.grizzly.http.server.HttpHandler- Author:
- tjquinn
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATE_HEADER_NAMEprotected static StringIF_MODIFIED_SINCEstatic StringLAST_MODIFIED_HEADER_NAMEprotected static Loggerlogger
-
Constructor Summary
Constructors Constructor Description RestrictedContentAdapter(String contextRoot)RestrictedContentAdapter(String contextRoot, Map<String,StaticContent> content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContentIfAbsent(String relativeURIString, StaticContent newContent)voidaddContentIfAbsent(Map<String,StaticContent> staticContent)protected intcontentStateToResponseStatus(Content content, URI requestURI)StringcontextRoot()protected StringdumpContent()protected voidfinishErrorResponse(org.glassfish.grizzly.http.server.Response gResp, int status)protected voidfinishResponse(org.glassfish.grizzly.http.server.Response gResp, int status)protected voidfinishSuccessResponse(org.glassfish.grizzly.http.server.Response gResp, int status)protected StringlogPrefix()protected StringrelativizeURIString(String candidateContextRoot, String uriString)protected voidrespondNotFound(org.glassfish.grizzly.http.server.Response gResp)voidresume()protected booleanreturnIfClientCacheIsCurrent(String relativeURIString, org.glassfish.grizzly.http.server.Request gReq, long contentTimestamp)voidservice(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp)protected booleanserviceContent(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp)voidsuspend()StringtoString()-
Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler
destroy, getErrorPageGenerator, getName, getRequestExecutorProvider, getRequestURIEncoding, getSessionCookieName, getSessionManager, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updatePaths
-
-
-
-
Field Detail
-
LAST_MODIFIED_HEADER_NAME
public static final String LAST_MODIFIED_HEADER_NAME
- See Also:
- Constant Field Values
-
DATE_HEADER_NAME
public static final String DATE_HEADER_NAME
- See Also:
- Constant Field Values
-
IF_MODIFIED_SINCE
protected static final String IF_MODIFIED_SINCE
- See Also:
- Constant Field Values
-
logger
protected static final Logger logger
-
-
Constructor Detail
-
RestrictedContentAdapter
public RestrictedContentAdapter(String contextRoot, Map<String,StaticContent> content) throws IOException
- Throws:
IOException
-
RestrictedContentAdapter
public RestrictedContentAdapter(String contextRoot)
-
-
Method Detail
-
service
public void service(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp)- Specified by:
servicein classorg.glassfish.grizzly.http.server.HttpHandler
-
contextRoot
public String contextRoot()
-
addContentIfAbsent
public void addContentIfAbsent(String relativeURIString, StaticContent newContent) throws IOException
- Throws:
IOException
-
addContentIfAbsent
public void addContentIfAbsent(Map<String,StaticContent> staticContent) throws IOException
- Throws:
IOException
-
relativizeURIString
protected String relativizeURIString(String candidateContextRoot, String uriString)
-
serviceContent
protected boolean serviceContent(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp) throws IOException- Throws:
IOException
-
returnIfClientCacheIsCurrent
protected boolean returnIfClientCacheIsCurrent(String relativeURIString, org.glassfish.grizzly.http.server.Request gReq, long contentTimestamp)
-
contentStateToResponseStatus
protected int contentStateToResponseStatus(Content content, URI requestURI) throws IOException
- Throws:
IOException
-
suspend
public void suspend()
-
resume
public void resume()
-
finishResponse
protected void finishResponse(org.glassfish.grizzly.http.server.Response gResp, int status)
-
respondNotFound
protected void respondNotFound(org.glassfish.grizzly.http.server.Response gResp)
-
finishSuccessResponse
protected void finishSuccessResponse(org.glassfish.grizzly.http.server.Response gResp, int status)
-
finishErrorResponse
protected void finishErrorResponse(org.glassfish.grizzly.http.server.Response gResp, int status)
-
dumpContent
protected String dumpContent()
-
logPrefix
protected String logPrefix()
-
-