com.sun.enterprise.v3.services.impl
Class ContainerMapper

java.lang.Object
  extended by org.glassfish.grizzly.http.server.HttpHandler
      extended by org.glassfish.grizzly.http.server.StaticHttpHandler
          extended by com.sun.enterprise.v3.services.impl.ContainerMapper

public class ContainerMapper
extends org.glassfish.grizzly.http.server.StaticHttpHandler

Container's mapper which maps ByteBuffer bytes representation to an HttpHandler, ApplicationContainer and ProtocolFilter chain. The mapping result is stored inside MappingData which is eventually shared with the CoyoteAdapter, which is the entry point with the Catalina Servlet Container.

Author:
Jeanfrancois Arcand, Alexey Stashok

Field Summary
protected static org.glassfish.grizzly.http.Note<org.glassfish.grizzly.http.server.util.MappingData> MAPPING_DATA
           
 
Fields inherited from class org.glassfish.grizzly.http.server.StaticHttpHandler
docRoots
 
Constructor Summary
ContainerMapper(GrizzlyService service, org.glassfish.grizzly.config.GrizzlyListener grizzlyListener)
           
 
Method Summary
protected  void configureMapper()
          Configure the V3Mapper.
protected  void customizedErrorPage(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)
          Return an error page customized for GlassFish v3.
 void initializeFileURLPattern(String ext)
           
 void register(Endpoint endpoint)
           
 void register(String contextRoot, Collection<String> vs, org.glassfish.grizzly.http.server.HttpHandler httpService, ApplicationContainer container)
           
 void service(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response response)
          Map the request to its associated Adapter.
protected  void setDefaultHost(String defaultHost)
          Set the default host that will be used when we map.
protected  void setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
          Set the V3Mapper instance used for mapping the container and its associated Adapter.
 void unregister(Endpoint endpoint)
           
 void unregister(String contextRoot)
           
 
Methods inherited from class org.glassfish.grizzly.http.server.StaticHttpHandler
addDocRoot, addDocRoot, addToFileCache, getDefaultDocRoot, getDocRoots, getRelativeURI, handle, isFileCacheEnabled, onMissingResource, removeDocRoot, sendFile, setFileCacheEnabled
 
Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler
destroy, doHandle, getName, getRequestURIEncoding, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updateContextPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPING_DATA

protected static final org.glassfish.grizzly.http.Note<org.glassfish.grizzly.http.server.util.MappingData> MAPPING_DATA
Constructor Detail

ContainerMapper

public ContainerMapper(GrizzlyService service,
                       org.glassfish.grizzly.config.GrizzlyListener grizzlyListener)
Method Detail

setDefaultHost

protected void setDefaultHost(String defaultHost)
Set the default host that will be used when we map.

Parameters:
defaultHost -

setMapper

protected void setMapper(org.glassfish.grizzly.http.server.util.Mapper mapper)
Set the V3Mapper instance used for mapping the container and its associated Adapter.

Parameters:
mapper -

configureMapper

protected void configureMapper()
Configure the V3Mapper.


service

public void service(org.glassfish.grizzly.http.server.Request request,
                    org.glassfish.grizzly.http.server.Response response)
             throws Exception
Map the request to its associated Adapter.

Overrides:
service in class org.glassfish.grizzly.http.server.StaticHttpHandler
Parameters:
request -
response -
Throws:
IOException
Exception

initializeFileURLPattern

public void initializeFileURLPattern(String ext)

customizedErrorPage

protected void customizedErrorPage(org.glassfish.grizzly.http.server.Request req,
                                   org.glassfish.grizzly.http.server.Response res)
                            throws Exception
Return an error page customized for GlassFish v3.

Overrides:
customizedErrorPage in class org.glassfish.grizzly.http.server.HttpHandler
Parameters:
req -
res -
Throws:
Exception

register

public void register(String contextRoot,
                     Collection<String> vs,
                     org.glassfish.grizzly.http.server.HttpHandler httpService,
                     ApplicationContainer container)

unregister

public void unregister(String contextRoot)

register

public void register(Endpoint endpoint)

unregister

public void unregister(Endpoint endpoint)


Copyright © 2012. All Rights Reserved.