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(javax.servlet.ServletContext servletContext)
Configure the given
ServletContext with any servlets, filters, listeners
context-params and attributes necessary for initialization. |
protected abstract void |
register(String description,
javax.servlet.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(javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException
ServletContextInitializer
ServletContext
with any servlets, filters, listeners
context-params and attributes necessary for initialization.onStartup
in interface ServletContextInitializer
servletContext
- the ServletContext
to initializejavax.servlet.ServletException
- if any call against the given ServletContext
throws a ServletException
protected abstract String getDescription()
protected abstract void register(String description, javax.servlet.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.