Java Doc for ContextHandler.java in  » Sevlet-Container » jetty-modules » org » mortbay » jetty » handler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » jetty modules » org.mortbay.jetty.handler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.mortbay.jetty.handler.AbstractHandler
   org.mortbay.jetty.handler.AbstractHandlerContainer
      org.mortbay.jetty.handler.HandlerWrapper
         org.mortbay.jetty.handler.ContextHandler

All known Subclasses:   org.mortbay.jetty.handler.MovedContextHandler,  org.mortbay.jetty.servlet.Context,
ContextHandler
public class ContextHandler extends HandlerWrapper implements Attributes(Code)
ContextHandler. This handler wraps a call to handle by setting the context and servlet path, plus setting the context classloader. Note. Because of http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4425695 directly replacing war or jar files in a context is not supported. You should use classes instead of jars if they will change, or deploy a packed war file that gets extracted on deployment.
author:
   gregw

Inner Class :public class SContext implements ServletContext

Field Summary
protected  SContext_scontext
    

Constructor Summary
public  ContextHandler()
    
protected  ContextHandler(SContext context)
    
public  ContextHandler(String contextPath)
    
public  ContextHandler(HandlerContainer parent, String contextPath)
    

Method Summary
public  voidaddEventListener(EventListener listener)
    
public  voidaddLocaleEncoding(String locale, String encoding)
    
public  voidclearAttributes()
    
protected  voiddoStart()
    
protected  voiddoStop()
    
public  ObjectgetAttribute(String name)
    
public  EnumerationgetAttributeNames()
    
public  AttributesgetAttributes()
    
public  ResourcegetBaseResource()
    
public  ClassLoadergetClassLoader()
    
public  StringgetClassPath()
    
public  String[]getConnectorNames()
    
public  StringgetContextPath()
    
public static  SContextgetCurrentContext()
     Get the current ServletContext implementation.
public  StringgetDisplayName()
    
public  ErrorHandlergetErrorHandler()
    
public  EventListener[]getEventListeners()
    
public  String[]getHosts()
     Get the hosts for the context.
public  StringgetInitParameter(String name)
    
public  EnumerationgetInitParameterNames()
    
public  MapgetInitParams()
    
public  StringgetLocaleEncoding(Locale locale)
     Get the character encoding for a locale.
public  intgetMaxFormContentSize()
    
public  MimeTypesgetMimeTypes()
    
public  ResourcegetResource(String path)
    
public  StringgetResourceBase()
    
public  SetgetResourcePaths(String path)
    
public  SContextgetServletContext()
    
public  String[]getVirtualHosts()
     Get the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a matching virtual host name. Array of virtual hosts that this context responds to.
public  String[]getWelcomeFiles()
    
public  voidhandle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch)
    
protected  booleanisProtectedTarget(String target)
     Check the target. Called by ContextHandler.handle(String,HttpServletRequest,HttpServletResponse,int) when a target within a context is determined.
public  booleanisShutdown()
    
public synchronized  ClassloadClass(String className)
    
public  voidremoveAttribute(String name)
    
public  voidsetAttribute(String name, Object value)
    
public  voidsetAttributes(Attributes attributes)
    
public  voidsetBaseResource(Resource base)
    
public  voidsetClassLoader(ClassLoader classLoader)
    
public  voidsetConnectorNames(String[] connectors)
     Set the names of accepted connectors.
public  voidsetContextPath(String contextPath)
    
public  voidsetDisplayName(String servletContextName)
    
public  voidsetErrorHandler(ErrorHandler errorHandler)
    
public  voidsetEventListeners(EventListener[] eventListeners)
    
public  voidsetHosts(String[] hosts)
    
public  voidsetInitParams(Map initParams)
    
public  voidsetMaxFormContentSize(int maxSize)
    
public  voidsetMimeTypes(MimeTypes mimeTypes)
    
public  voidsetResourceBase(String resourceBase)
    
public  voidsetServer(Server server)
    
public  voidsetShutdown(boolean shutdown)
     Set shutdown status. This field allows for graceful shutdown of a context.
public  voidsetVirtualHosts(String[] vhosts)
     Set the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a matching virtual host name.
Parameters:
  vhosts - Array of virtual hosts that this context responds to.
public  voidsetWelcomeFiles(String[] files)
    
protected  voidstartContext()
    
public  StringtoString()
    

Field Detail
_scontext
protected SContext _scontext(Code)




Constructor Detail
ContextHandler
public ContextHandler()(Code)



ContextHandler
protected ContextHandler(SContext context)(Code)



ContextHandler
public ContextHandler(String contextPath)(Code)



ContextHandler
public ContextHandler(HandlerContainer parent, String contextPath)(Code)




Method Detail
addEventListener
public void addEventListener(EventListener listener)(Code)



addLocaleEncoding
public void addLocaleEncoding(String locale, String encoding)(Code)



clearAttributes
public void clearAttributes()(Code)



doStart
protected void doStart() throws Exception(Code)



doStop
protected void doStop() throws Exception(Code)



getAttribute
public Object getAttribute(String name)(Code)



getAttributeNames
public Enumeration getAttributeNames()(Code)



getAttributes
public Attributes getAttributes()(Code)
Returns the attributes.



getBaseResource
public Resource getBaseResource()(Code)
Returns the resourceBase.



getClassLoader
public ClassLoader getClassLoader()(Code)
Returns the classLoader.



getClassPath
public String getClassPath()(Code)
Make best effort to extract a file classpath from the context classloader Returns the classLoader.



getConnectorNames
public String[] getConnectorNames()(Code)
an array of connector names that this contextwill accept a request from.



getContextPath
public String getContextPath()(Code)
Returns the _contextPath.



getCurrentContext
public static SContext getCurrentContext()(Code)
Get the current ServletContext implementation. This call is only valid during a call to doStart and is available to nested handlers to access the context. ServletContext implementation



getDisplayName
public String getDisplayName()(Code)



getErrorHandler
public ErrorHandler getErrorHandler()(Code)
Returns the errorHandler.



getEventListeners
public EventListener[] getEventListeners()(Code)



getHosts
public String[] getHosts()(Code)
Get the hosts for the context.



getInitParameter
public String getInitParameter(String name)(Code)



getInitParameterNames
public Enumeration getInitParameterNames()(Code)



getInitParams
public Map getInitParams()(Code)
Returns the initParams.



getLocaleEncoding
public String getLocaleEncoding(Locale locale)(Code)
Get the character encoding for a locale. The full locale name is first looked up in the map of encodings. If no encoding is found, then the locale language is looked up.
Parameters:
  locale - a Locale value a String representing the character encoding forthe locale or null if none found.



getMaxFormContentSize
public int getMaxFormContentSize()(Code)



getMimeTypes
public MimeTypes getMimeTypes()(Code)
Returns the mimeTypes.



getResource
public Resource getResource(String path) throws MalformedURLException(Code)



getResourceBase
public String getResourceBase()(Code)
Returns the base resource as a string.



getResourcePaths
public Set getResourcePaths(String path)(Code)



getServletContext
public SContext getServletContext()(Code)



getVirtualHosts
public String[] getVirtualHosts()(Code)
Get the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a matching virtual host name. Array of virtual hosts that this context responds to. Anull host name or empty array means any hostname is acceptable.Host names may be String representation of IP addresses.



getWelcomeFiles
public String[] getWelcomeFiles()(Code)
The names of the files which the server should consider to be welcome files in this context.
See Also:    The Servlet Specification
See Also:   ContextHandler.setWelcomeFiles



handle
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException(Code)



isProtectedTarget
protected boolean isProtectedTarget(String target)(Code)
Check the target. Called by ContextHandler.handle(String,HttpServletRequest,HttpServletResponse,int) when a target within a context is determined. If the target is protected, 404 is returned. The default implementation always returns false.
See Also:   org.mortbay.jetty.webapp.WebAppContext.isProtectedTarget(String)



isShutdown
public boolean isShutdown()(Code)
true if this context is accepting new requests



loadClass
public synchronized Class loadClass(String className) throws ClassNotFoundException(Code)



removeAttribute
public void removeAttribute(String name)(Code)



setAttribute
public void setAttribute(String name, Object value)(Code)



setAttributes
public void setAttributes(Attributes attributes)(Code)

Parameters:
  attributes - The attributes to set.



setBaseResource
public void setBaseResource(Resource base)(Code)

Parameters:
  base - The resourceBase to set.



setClassLoader
public void setClassLoader(ClassLoader classLoader)(Code)

Parameters:
  classLoader - The classLoader to set.



setConnectorNames
public void setConnectorNames(String[] connectors)(Code)
Set the names of accepted connectors. Names are either "host:port" or a specific configured name for a connector.
Parameters:
  connectors - If non null, an array of connector names that this contextwill accept a request from.



setContextPath
public void setContextPath(String contextPath)(Code)

Parameters:
  contextPath - The _contextPath to set.



setDisplayName
public void setDisplayName(String servletContextName)(Code)

Parameters:
  servletContextName - The servletContextName to set.



setErrorHandler
public void setErrorHandler(ErrorHandler errorHandler)(Code)

Parameters:
  errorHandler - The errorHandler to set.



setEventListeners
public void setEventListeners(EventListener[] eventListeners)(Code)



setHosts
public void setHosts(String[] hosts)(Code)
ContextHandler.setConnectorNames(String[])



setInitParams
public void setInitParams(Map initParams)(Code)

Parameters:
  initParams - The initParams to set.



setMaxFormContentSize
public void setMaxFormContentSize(int maxSize)(Code)



setMimeTypes
public void setMimeTypes(MimeTypes mimeTypes)(Code)

Parameters:
  mimeTypes - The mimeTypes to set.



setResourceBase
public void setResourceBase(String resourceBase)(Code)

Parameters:
  resourceBase - The base resource as a string.



setServer
public void setServer(Server server)(Code)



setShutdown
public void setShutdown(boolean shutdown)(Code)
Set shutdown status. This field allows for graceful shutdown of a context. A started context may be put into non accepting state so that existing requests can complete, but no new requests are accepted.
Parameters:
  accepting - true if this context is accepting new requests



setVirtualHosts
public void setVirtualHosts(String[] vhosts)(Code)
Set the virtual hosts for the context. Only requests that have a matching host header or fully qualified URL will be passed to that context with a virtual host name. A context with no virtual host names or a null virtual host name is available to all requests that are not served by a context with a matching virtual host name.
Parameters:
  vhosts - Array of virtual hosts that this context responds to. Anull host name or null/empty array means any hostname is acceptable.Host names may String representation of IP addresses.



setWelcomeFiles
public void setWelcomeFiles(String[] files)(Code)



startContext
protected void startContext() throws Exception(Code)



toString
public String toString()(Code)



Methods inherited from org.mortbay.jetty.handler.HandlerWrapper
public void addHandler(Handler handler)(Code)(Java Doc)
protected void doStart() throws Exception(Code)(Java Doc)
protected void doStop() throws Exception(Code)(Java Doc)
protected Object expandChildren(Object list, Class byClass)(Code)(Java Doc)
public Handler getHandler()(Code)(Java Doc)
public void handle(String target, HttpServletRequest request, HttpServletResponse response, int dispatch) throws IOException, ServletException(Code)(Java Doc)
public void setHandler(Handler handler)(Code)(Java Doc)
public void setServer(Server server)(Code)(Java Doc)

Methods inherited from org.mortbay.jetty.handler.AbstractHandlerContainer
protected Object expandChildren(Object list, Class byClass)(Code)(Java Doc)
protected Object expandHandler(Handler handler, Object list, Class byClass)(Code)(Java Doc)
public Handler getChildHandlerByClass(Class byclass)(Code)(Java Doc)
public Handler[] getChildHandlers()(Code)(Java Doc)
public Handler[] getChildHandlersByClass(Class byclass)(Code)(Java Doc)

Fields inherited from org.mortbay.jetty.handler.AbstractHandler
protected String _string(Code)(Java Doc)

Methods inherited from org.mortbay.jetty.handler.AbstractHandler
public void destroy()(Code)(Java Doc)
protected void doStart() throws Exception(Code)(Java Doc)
protected void doStop() throws Exception(Code)(Java Doc)
public Server getServer()(Code)(Java Doc)
public void setServer(Server server)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.