Interface InitContext
- All Known Implementing Classes:
ServletInitContext
public interface InitContext
Context for the initialisation of SPI implementations.
Provides:
- Access to the web application context.
- A method to retrieve a configuration or another file in the web application package.
- Access to the Infinispan cache manager.
-
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.manager.EmbeddedCacheManager
Returns the Infinispan cache manager.@Nullable InputStream
getResourceAsStream
(String path) Returns the resource located at the named path as an input stream.jakarta.servlet.ServletContext
Returns the servlet context.
-
Method Details
-
getServletContext
jakarta.servlet.ServletContext getServletContext()Returns the servlet context.- Returns:
- The servlet context.
-
getResourceAsStream
Returns the resource located at the named path as an input stream. Has the same behaviour asServletContext.getResourceAsStream(java.lang.String)
.- Parameters:
path
- The path to the resource, must begin with a '/' and is interpreted as relative to the web application root. Must not benull
.- Returns:
- The resource as an input stream, or
null
if no resource exists at the specified path.
-
getInfinispanCacheManager
org.infinispan.manager.EmbeddedCacheManager getInfinispanCacheManager()Returns the Infinispan cache manager.- Returns:
- The Infinispan cache manager.
-