Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jetty.servlet
Class ServletHolder.Registration

    java.lang.Object
      org.eclipse.jetty.servlet.Holder.HolderRegistration
          org.eclipse.jetty.servlet.ServletHolder.Registration

All Implemented Interfaces:
  Registration, Registration.Dynamic, ServletRegistration, ServletRegistration.Dynamic

Enclosing class:
  ServletHolder

    public class ServletHolder.Registration

extends Holder.HolderRegistration
implements ServletRegistration.Dynamic

Nested Class Summary

Nested classes/interfaces inherited from interface javax.servlet.ServletRegistration
`ServletRegistration.Dynamic`

Field Summary
`protected MultipartConfigElement` | `_multipartConfig`

Constructor Summary
`ServletHolder.Registration()`

Method Summary
`java.util.Set<java.lang.String>` | `addMapping(java.lang.String... urlPatterns)` Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.
`int` | `getInitOrder()`
`java.util.Collection<java.lang.String>` | `getMappings()` Gets the currently available mappings of the Servlet represented by this `ServletRegistration`.
`MultipartConfigElement` | `getMultipartConfig()`
`java.lang.String` | `getRunAsRole()` Gets the name of the runAs role of the Servlet represented by this `ServletRegistration`.
`void` | `setLoadOnStartup(int loadOnStartup)` Sets the `loadOnStartup` priority on the Servlet represented by this dynamic ServletRegistration.
`void` | `setMultipartConfig(MultipartConfigElement element)` Sets the `MultipartConfigElement` to be applied to the mappings defined for this `ServletRegistration`.
`void` | `setRunAsRole(java.lang.String role)` Sets the name of the `runAs` role for this `ServletRegistration`.
`java.util.Set<java.lang.String>` | `setServletSecurity(ServletSecurityElement securityElement)` Sets the `ServletSecurityElement` to be applied to the mappings defined for this `ServletRegistration`.

Methods inherited from class org.eclipse.jetty.servlet.Holder.HolderRegistration
`getClassName, getInitParameter, getInitParameters, getName, setAsyncSupported, setDescription, setInitParameter, setInitParameters`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.servlet.Registration.Dynamic
`setAsyncSupported`

Methods inherited from interface javax.servlet.Registration
`getClassName, getInitParameter, getInitParameters, getName, setInitParameter, setInitParameters`

Field Detail

### _multipartConfig

    protected MultipartConfigElement _multipartConfig

Constructor Detail

### ServletHolder.Registration

    public ServletHolder.Registration()

Method Detail

### addMapping

    public java.util.Set<java.lang.String> addMapping(java.lang.String... urlPatterns)

  Description copied from interface: `ServletRegistration`
  Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.

  If any of the specified URL patterns are already mapped to a different Servlet, no updates will be performed.

  If this method is called multiple times, each successive call adds to the effects of the former.

  Specified by:
    `addMapping` in interface `ServletRegistration`
  Parameters:
    `urlPatterns` - the URL patterns of the servlet mapping
  Returns:
    the (possibly empty) Set of URL patterns that are already mapped to a different Servlet

### getMappings

    public java.util.Collection<java.lang.String> getMappings()

  Description copied from interface: `ServletRegistration`
  Gets the currently available mappings of the Servlet represented by this `ServletRegistration`.

  Any changes to the returned `Collection` must not affect this `ServletRegistration`.

  Specified by:
    `getMappings` in interface `ServletRegistration`
  Returns:
    a (possibly empty) `Collection` of the currently available mappings of the Servlet represented by this `ServletRegistration`

### getRunAsRole

    public java.lang.String getRunAsRole()

  Description copied from interface: `ServletRegistration`
  Gets the name of the runAs role of the Servlet represented by this `ServletRegistration`.

  Specified by:
    `getRunAsRole` in interface `ServletRegistration`
  Returns:
    the name of the runAs role, or null if the Servlet is configured to run as its caller

### setLoadOnStartup

    public void setLoadOnStartup(int loadOnStartup)

  Description copied from interface: `ServletRegistration.Dynamic`
  Sets the `loadOnStartup` priority on the Servlet represented by this dynamic ServletRegistration.

  A `loadOnStartup` value of greater than or equal to zero indicates to the container the initialization priority of the Servlet. In this case, the container must instantiate and initialize the Servlet during the initialization phase of the ServletContext, that is, after it has invoked all of the ServletContextListener objects configured for the ServletContext at their `ServletContextListener.contextInitialized(javax.servlet.ServletContextEvent)` method.

  If `loadOnStartup` is a negative integer, the container is free to instantiate and initialize the Servlet lazily.

  The default value for `loadOnStartup` is `-1`.

  A call to this method overrides any previous setting.

  Specified by:
    `setLoadOnStartup` in interface `ServletRegistration.Dynamic`
  Parameters:
    `loadOnStartup` - the initialization priority of the Servlet

### getInitOrder

    public int getInitOrder()

### setMultipartConfig

    public void setMultipartConfig(MultipartConfigElement element)

  Description copied from interface: `ServletRegistration.Dynamic`
  Sets the `MultipartConfigElement` to be applied to the mappings defined for this `ServletRegistration`. If this method is called multiple times, each successive call overrides the effects of the former.

  Specified by:
    `setMultipartConfig` in interface `ServletRegistration.Dynamic`
  Parameters:
    `element` - the `MultipartConfigElement` to be applied to the patterns mapped to the registration

### getMultipartConfig

    public MultipartConfigElement getMultipartConfig()

### setRunAsRole

    public void setRunAsRole(java.lang.String role)

  Description copied from interface: `ServletRegistration.Dynamic`
  Sets the name of the `runAs` role for this `ServletRegistration`.

  Specified by:
    `setRunAsRole` in interface `ServletRegistration.Dynamic`
  Parameters:
    `role` - the name of the `runAs` role

### setServletSecurity

    public java.util.Set<java.lang.String> setServletSecurity(ServletSecurityElement securityElement)

  Description copied from interface: `ServletRegistration.Dynamic`
  Sets the `ServletSecurityElement` to be applied to the mappings defined for this `ServletRegistration`.

  This method applies to all mappings added to this `ServletRegistration` up until the point that the `ServletContext` from which it was obtained has been initialized.

  If a URL pattern of this ServletRegistration is an exact target of a `security-constraint` that was established via the portable deployment descriptor, then this method does not change the `security-constraint` for that pattern, and the pattern will be included in the return value.

  If a URL pattern of this ServletRegistration is an exact target of a security constraint that was established via the `ServletSecurity` annotation or a previous call to this method, then this method replaces the security constraint for that pattern.

  If a URL pattern of this ServletRegistration is neither the exact target of a security constraint that was established via the `ServletSecurity` annotation or a previous call to this method, nor the exact target of a `security-constraint` in the portable deployment descriptor, then this method establishes the security constraint for that pattern from the argument `ServletSecurityElement`.

  Specified by:
    `setServletSecurity` in interface `ServletRegistration.Dynamic`
  Parameters:
    `securityElement` - the `ServletSecurityElement` to be applied to the patterns mapped to this ServletRegistration
  Returns:
    the (possibly empty) Set of URL patterns that were already the exact target of a `security-constraint` that was established via the portable deployment descriptor. This method has no effect on the patterns included in the returned set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.