public abstract class RegistrationBean extends Object implements ServletContextInitializer, org.springframework.core.Ordered
ServletRegistrationBean
,
FilterRegistrationBean
,
DelegatingFilterProxyRegistrationBean
,
ServletListenerRegistrationBean
Constructor and Description |
---|
RegistrationBean() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
getDescription()
Return a description of the registration.
|
int |
getOrder()
Get the order of the registration bean.
|
boolean |
isEnabled()
Return if the registration is enabled.
|
void |
onStartup(ServletContext servletContext)
Configure the given
ServletContext with any servlets, filters, listeners
context-params and attributes necessary for initialization. |
protected abstract void |
register(String description,
ServletContext servletContext)
Register this bean with the servlet context.
|
void |
setEnabled(boolean enabled)
Flag to indicate that the registration is enabled.
|
void |
setOrder(int order)
Set the order of the registration bean.
|
public final void onStartup(ServletContext servletContext) throws ServletException
ServletContextInitializer
ServletContext
with any servlets, filters, listeners
context-params and attributes necessary for initialization.onStartup
in interface ServletContextInitializer
servletContext
- the ServletContext
to initializeServletException
- if any call against the given ServletContext
throws a ServletException
protected abstract String getDescription()
protected abstract void register(String description, ServletContext servletContext)
description
- a description of the item being registeredservletContext
- the servlet contextpublic void setEnabled(boolean enabled)
enabled
- the enabled to setpublic boolean isEnabled()
true
)public void setOrder(int order)
order
- the orderpublic int getOrder()
getOrder
in interface org.springframework.core.Ordered
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.