FileDocCategorySizeDatePackage
JWSAdHocServletInfo.javaAPI DocGlassfish v2 API4202Fri May 04 22:34:12 BST 2007com.sun.enterprise.appclient.jws

JWSAdHocServletInfo

public class JWSAdHocServletInfo extends Object implements com.sun.enterprise.web.AdHocServletInfo
Info describing the ad hoc servlet that is dynamically registered with the web container to receive Java Web Start's requests for the JNLP document.

The web container uses this information in setting up the dynamic mapping from URLs to our code.

author
tjquinn

Fields Summary
private HashMap
initParams
holds init parameter names and values that will be available to the servlet
private String
servletName
holds the name that distinguishes ad hoc servlets within an app
Constructors Summary
public JWSAdHocServletInfo(String virtualContextRoot, String category)
Creates a new instance of JWSAdHocServletInfo

        setInitParams(virtualContextRoot, category);
        servletName = virtualContextRoot;
    
Methods Summary
public java.lang.ClassgetServletClass()
Reports which class implements the ad hoc servlet to be run.

return
Class for the ad hoc servlet class

        return JWSAdHocServlet.class;
    
public java.util.MapgetServletInitParams()
Returns a map from servlet init param name to value.

return
Map of init param names to values

        return initParams;
    
public java.lang.StringgetServletName()
Reports the servlet's name.

return
the name of the servlet for display purposes

        return servletName;
    
private voidsetInitParams(java.lang.String virtualContextRoot, java.lang.String category)
Sets up the map of init param names to values that will be retrieved by the web container.

param
the context root by which the ad hoc servlet will be addressed
param
the category (basically either application or appclient)

        initParams = new HashMap<String,String>();
        initParams.put(JWSAdHocServlet.CONTEXT_ROOT_PARAMETER_NAME, virtualContextRoot);
        initParams.put(JWSAdHocServlet.CATEGORY_PARAMETER_NAME, category);