public class ServletDefinition extends Object implements ProviderWithExtensionVisitor<ServletDefinition>
Constructor and Description |
---|
ServletDefinition(String pattern,
Key<? extends javax.servlet.http.HttpServlet> servletKey,
UriPatternMatcher patternMatcher,
Map<String,String> initParams,
javax.servlet.http.HttpServlet servletInstance) |
Modifier and Type | Method and Description |
---|---|
<B,V> V |
acceptExtensionVisitor(BindingTargetVisitor<B,V> visitor,
ProviderInstanceBinding<? extends B> binding)
Instructs the extension determine if the visitor is an instance of a custom
extension visitor, and if so, visit it using that method.
|
void |
destroy(Set<javax.servlet.http.HttpServlet> destroyedSoFar) |
ServletDefinition |
get()
Provides an instance of
T . |
void |
init(javax.servlet.ServletContext servletContext,
Injector injector,
Set<javax.servlet.http.HttpServlet> initializedSoFar) |
boolean |
service(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse)
Wrapper around the service chain to ensure a servlet is servicing what it must and provides it
with a wrapped request.
|
String |
toPaddedString(int padding) |
public ServletDefinition get()
Provider
T
. Must never return null
.get
in interface javax.inject.Provider<ServletDefinition>
public <B,V> V acceptExtensionVisitor(BindingTargetVisitor<B,V> visitor, ProviderInstanceBinding<? extends B> binding)
ProviderWithExtensionVisitor
Due to issues with generics, the type parameters of this method do not relate to the type of the provider. In practice, the 'B' type will always be a supertype of 'T'.
acceptExtensionVisitor
in interface ProviderWithExtensionVisitor<ServletDefinition>
public void init(javax.servlet.ServletContext servletContext, Injector injector, Set<javax.servlet.http.HttpServlet> initializedSoFar) throws javax.servlet.ServletException
javax.servlet.ServletException
public void destroy(Set<javax.servlet.http.HttpServlet> destroyedSoFar)
public boolean service(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse) throws IOException, javax.servlet.ServletException
IOException
- If thrown by underlying servletjavax.servlet.ServletException
- If thrown by underlying servletpublic String toPaddedString(int padding)
Copyright © 2006–2014 Google, Inc.. All rights reserved.