org.springframework.boot.context.embedded
Class RegistrationBean

java.lang.Object
  extended by org.springframework.boot.context.embedded.RegistrationBean
All Implemented Interfaces:
ServletContextInitializer
Direct Known Subclasses:
FilterRegistrationBean, ServletListenerRegistrationBean, ServletRegistrationBean

public abstract class RegistrationBean
extends Object
implements ServletContextInitializer

Base class for Servlet 3.0+ based registration beans.

Author:
Phillip Webb
See Also:
ServletRegistrationBean, FilterRegistrationBean, ServletListenerRegistrationBean

Constructor Summary
RegistrationBean()
           
 
Method Summary
 void addInitParameter(String name, String value)
          Add a single init-parameter, replacing any existing parameter with the same name.
protected  void configure(javax.servlet.Registration.Dynamic registration)
          Configure registration base settings.
 Map<String,String> getInitParameters()
          Returns a mutable Map of the registration init-parameters.
protected  String getOrDeduceName(Object value)
          Deduces the name for this registration.
 boolean isAsyncSupported()
          Returns if asynchronous operations are support for this registration.
 void setAsyncSupported(boolean asyncSupported)
          Sets if asynchronous operations are support for this registration.
 void setInitParameters(Map<String,String> initParameters)
          Set init-parameters for this registration.
 void setName(String name)
          Set the name of this registration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.boot.context.embedded.ServletContextInitializer
onStartup
 

Constructor Detail

RegistrationBean

public RegistrationBean()
Method Detail

setName

public void setName(String name)
Set the name of this registration. If not specified the bean name will be used.


setAsyncSupported

public void setAsyncSupported(boolean asyncSupported)
Sets if asynchronous operations are support for this registration. If not specified defaults to true.


isAsyncSupported

public boolean isAsyncSupported()
Returns if asynchronous operations are support for this registration.


setInitParameters

public void setInitParameters(Map<String,String> initParameters)
Set init-parameters for this registration. Calling this method will replace any existing init-parameters.

See Also:
getInitParameters(), addInitParameter(java.lang.String, java.lang.String)

getInitParameters

public Map<String,String> getInitParameters()
Returns a mutable Map of the registration init-parameters.


addInitParameter

public void addInitParameter(String name,
                             String value)
Add a single init-parameter, replacing any existing parameter with the same name.

Parameters:
name - the init-parameter name
value - the init-parameter value

getOrDeduceName

protected final String getOrDeduceName(Object value)
Deduces the name for this registration. Will return user specified name or fallback to convention based naming.

Parameters:
value - the object used for convention based names

configure

protected void configure(javax.servlet.Registration.Dynamic registration)
Configure registration base settings.



Copyright © 2013. All Rights Reserved.