Class AppClientHTTPAdapter
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandler
-
- org.glassfish.appclient.server.core.jws.RestrictedContentAdapter
-
- org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter
-
public class AppClientHTTPAdapter extends RestrictedContentAdapter
GrizzlyAdapter for serving static and dynamic content.- Author:
- tjquinn
-
-
Field Summary
Fields Modifier and Type Field Description static String
GF_JWS_SESSION_CACHED_JNLP_NAME
static String
GF_JWS_SESSION_IS_MAIN_PROCESSED_NAME
-
Fields inherited from class org.glassfish.appclient.server.core.jws.RestrictedContentAdapter
DATE_HEADER_NAME, IF_MODIFIED_SINCE, LAST_MODIFIED_HEADER_NAME, logger
-
-
Constructor Summary
Constructors Constructor Description AppClientHTTPAdapter(String contextRoot, Map<String,StaticContent> staticContent, Map<String,DynamicContent> dynamicContent, Properties tokens, File domainDir, File installDir, IiopService iiopService, GlassFishORBFactory orbFactory)
AppClientHTTPAdapter(String contextRoot, Properties tokens, File domainDir, File installDir, IiopService iiopService, GlassFishORBFactory orbFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addContentIfAbsent(Map<String,StaticContent> staticAdditions, Map<String,DynamicContent> dynamicAdditions)
static Boolean
booleanAttr(Object attrValue)
Converts an Object to a Boolean.protected String
dumpContent(Map<String,DynamicContent> dc)
static URI
requestURI(org.glassfish.grizzly.http.server.Request gReq)
Prepares a full URI from the request.void
service(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp)
Responds to all requests routed to the context root with which this adapter was registered to the RequestDispatcher.-
Methods inherited from class org.glassfish.appclient.server.core.jws.RestrictedContentAdapter
addContentIfAbsent, addContentIfAbsent, contentStateToResponseStatus, contextRoot, dumpContent, finishErrorResponse, finishResponse, finishSuccessResponse, logPrefix, relativizeURIString, respondNotFound, resume, returnIfClientCacheIsCurrent, serviceContent, suspend, toString
-
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
-
GF_JWS_SESSION_CACHED_JNLP_NAME
public static final String GF_JWS_SESSION_CACHED_JNLP_NAME
- See Also:
- Constant Field Values
-
GF_JWS_SESSION_IS_MAIN_PROCESSED_NAME
public static final String GF_JWS_SESSION_IS_MAIN_PROCESSED_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AppClientHTTPAdapter
public AppClientHTTPAdapter(String contextRoot, Properties tokens, File domainDir, File installDir, IiopService iiopService, GlassFishORBFactory orbFactory) throws IOException
- Throws:
IOException
-
AppClientHTTPAdapter
public AppClientHTTPAdapter(String contextRoot, Map<String,StaticContent> staticContent, Map<String,DynamicContent> dynamicContent, Properties tokens, File domainDir, File installDir, IiopService iiopService, GlassFishORBFactory orbFactory) throws IOException
- Throws:
IOException
-
-
Method Detail
-
requestURI
public static URI requestURI(org.glassfish.grizzly.http.server.Request gReq) throws URISyntaxException
Prepares a full URI from the request.- Parameters:
gReq
- the request- Returns:
- URI for the request
- Throws:
URISyntaxException
-
service
public void service(org.glassfish.grizzly.http.server.Request gReq, org.glassfish.grizzly.http.server.Response gResp)
Responds to all requests routed to the context root with which this adapter was registered to the RequestDispatcher.- Overrides:
service
in classRestrictedContentAdapter
- Parameters:
gReq
-gResp
-
-
addContentIfAbsent
public void addContentIfAbsent(Map<String,StaticContent> staticAdditions, Map<String,DynamicContent> dynamicAdditions) throws IOException
- Throws:
IOException
-
booleanAttr
public static Boolean booleanAttr(Object attrValue)
Converts an Object to a Boolean.- Parameters:
attrValue
- Object (preferably a Boolean) to convert- Returns:
- if the argument is a Boolean, its value; false otherwise
-
dumpContent
protected String dumpContent(Map<String,DynamicContent> dc)
-
-