Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- AbstractFileResolvingResource - Class in spark.resource
-
Abstract base class for resources which resolve URLs into File references, such as UrlResource or
ClassPathResource
. - AbstractFileResolvingResource() - Constructor for class spark.resource.AbstractFileResolvingResource
- AbstractResource - Class in spark.resource
-
Convenience base class for
Resource
implementations, pre-implementing typical behavior. - AbstractResource() - Constructor for class spark.resource.AbstractResource
- AbstractResourceHandler - Class in spark.resource
-
Abstract class providing functionality for finding resources based on an Http Servlet request.
- AbstractResourceHandler() - Constructor for class spark.resource.AbstractResourceHandler
- ACCEPT_ENCODING - Static variable in class spark.utils.GzipUtils
- ACCEPT_TYPE_REQUEST_MIME_HEADER - Static variable in class spark.http.matching.MatcherFilter
- acceptedType - Variable in class spark.route.RouteEntry
- acceptType - Variable in class spark.FilterImpl
- acceptType - Variable in class spark.http.matching.RouteContext
- acceptType - Variable in class spark.RouteImpl
- acceptType - Variable in class spark.routematch.RouteMatch
- acceptType() - Method in class spark.http.matching.RouteContext
- Access - Class in spark
-
Provides access to package protected methods.
- Access() - Constructor for class spark.Access
- activeThreadCount() - Method in interface spark.embeddedserver.EmbeddedServer
- activeThreadCount() - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
- activeThreadCount() - Method in class spark.Service
- activeThreadCount() - Static method in class spark.Spark
- add(int, String) - Static method in class spark.CustomErrorPages
-
Add a custom error page as a String
- add(int, Route) - Static method in class spark.CustomErrorPages
-
Add a custom error page as a Route handler
- add(Object, EmbeddedServerFactory) - Static method in class spark.embeddedserver.EmbeddedServers
-
Adds an Embedded server factory for the provided identifier.
- add(String, String, Object) - Method in class spark.route.Routes
-
Deprecated.
- add(HttpMethod, String, String, Object) - Method in class spark.route.Routes
- add(HttpMethod, FilterImpl) - Method in class spark.route.Routes
-
Add a filter
- add(HttpMethod, RouteImpl) - Method in class spark.route.Routes
-
Add a route
- addContentEncodingHeaderIfMissing(HttpServletResponse, boolean) - Static method in class spark.utils.GzipUtils
- addFilter(String, FilterImpl) - Method in class spark.Routable
-
Deprecated.
- addFilter(String, FilterImpl) - Method in class spark.Service
-
Deprecated.
- addFilter(HttpMethod, FilterImpl) - Method in class spark.Routable
-
Adds a filter
- addFilter(HttpMethod, FilterImpl) - Method in class spark.Service
- addPaths(String, String) - Static method in class spark.resource.AbstractResourceHandler
-
Add two URI path segments.
- addRoute(String, RouteImpl) - Method in class spark.Routable
-
Deprecated.
- addRoute(String, RouteImpl) - Method in class spark.Service
-
Deprecated.
- addRoute(HttpMethod, RouteImpl) - Method in class spark.Routable
-
Adds a route
- addRoute(HttpMethod, RouteImpl) - Method in class spark.Service
- addRoutes() - Method in interface spark.RouteGroup
- addWebSocketHandler(String, WebSocketHandlerWrapper) - Method in class spark.Service
- after - Enum constant in enum class spark.route.HttpMethod
- after(String, String, Filter) - Method in class spark.Routable
-
Maps a filter to be executed after any matching routes
- after(String, String, Filter...) - Static method in class spark.Spark
-
Maps one or many filters to be executed after any matching routes
- after(String, Filter) - Method in class spark.Routable
-
Maps a filter to be executed after any matching routes
- after(String, Filter) - Static method in class spark.Spark
-
Maps a filter to be executed after any matching routes
- after(String, Filter...) - Static method in class spark.Spark
-
Maps an array of filters to be executed after any matching routes
- after(Filter) - Method in class spark.Routable
-
Maps a filter to be executed after any matching routes
- after(Filter...) - Static method in class spark.Spark
-
Maps one or many filters to be executed after any matching routes
- afterafter - Enum constant in enum class spark.route.HttpMethod
- afterAfter(String, Filter) - Method in class spark.Routable
-
Maps a filter to be executed after any matching routes even if the route throws any exception
- afterAfter(String, Filter) - Static method in class spark.Spark
-
Execute after route even if the route throws exception
- afterAfter(Filter) - Method in class spark.Routable
-
Maps a filter to be executed after any matching routes even if the route throws any exception
- afterAfter(Filter) - Static method in class spark.Spark
-
Execute after any matching route even if the route throws exception
- AfterAfterFilters - Class in spark.http.matching
-
Executes the done filters matching an HTTP request.
- AfterAfterFilters() - Constructor for class spark.http.matching.AfterAfterFilters
- AfterFilters - Class in spark.http.matching
-
Executes the after filters matching an HTTP request.
- AfterFilters() - Constructor for class spark.http.matching.AfterFilters
- ALL_PATHS - Static variable in class spark.utils.SparkUtils
- any(String, String) - Method in class spark.Redirect
-
Redirects any HTTP request of type GET, POST, PUT, DELETE on 'fromPath' to 'toPath'
- any(String, String, Redirect.Status) - Method in class spark.Redirect
-
Redirects any HTTP request of type GET, POST, PUT, DELETE on 'fromPath' to 'toPath' with the provided redirect 'status' code.
- append(byte) - Method in class spark.utils.urldecoding.Utf8Appendable
- append(char) - Method in class spark.utils.urldecoding.Utf8Appendable
- append(String, int, int) - Method in class spark.utils.urldecoding.Utf8Appendable
- appendByte(byte) - Method in class spark.utils.urldecoding.Utf8Appendable
- APPLICATION_CLASS_PARAM - Static variable in class spark.servlet.SparkFilter
- applications - Variable in class spark.servlet.SparkFilter
-
It contains all the Spark application instances that was declared in the filter configuration.
- applyRelativePath(String, String) - Static method in class spark.utils.StringUtils
-
Apply the given relative path to the given path, assuming standard Java folder separation (i.e.
- ARRAY_SUFFIX - Static variable in class spark.utils.ClassUtils
-
Suffix for array class names: "[]"
- Assert - Class in spark.utils
-
Assertion utility class that assists in validating arguments.
- Assert() - Constructor for class spark.utils.Assert
- attribute(String) - Method in class spark.http.matching.RequestWrapper
- attribute(String) - Method in class spark.Request
-
Gets the value of the provided attribute
- attribute(String) - Method in class spark.Session
-
Returns the object bound with the specified name in this session, or null if no object is bound under the name.
- attribute(String, Object) - Method in class spark.http.matching.RequestWrapper
- attribute(String, Object) - Method in class spark.Request
-
Sets an attribute on the request (can be fetched in filters/routes later in the chain)
- attribute(String, Object) - Method in class spark.Session
-
Binds an object to this session, using the name specified.
- attributes() - Method in class spark.http.matching.RequestWrapper
- attributes() - Method in class spark.Request
- attributes() - Method in class spark.Session
- available() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- awaitInitialization() - Method in class spark.Service
-
Waits for the spark server to be initialized.
- awaitInitialization() - Static method in class spark.Spark
-
Waits for the spark server to be initialized.
- awaitStop() - Method in class spark.Service
-
Waits for the Spark server to stop.
- awaitStop() - Static method in class spark.Spark
-
Waits for the Spark server to be stopped.
B
- Base64 - Class in spark
- Base64() - Constructor for class spark.Base64
- baseResource - Variable in class spark.resource.ClassPathResourceHandler
- baseResource - Variable in class spark.resource.ExternalResourceHandler
- before - Enum constant in enum class spark.route.HttpMethod
- before(String, String, Filter) - Method in class spark.Routable
-
Maps a filter to be executed before any matching routes
- before(String, String, Filter...) - Static method in class spark.Spark
-
Maps one or many filters to be executed before any matching routes
- before(String, Filter) - Method in class spark.Routable
-
Maps a filter to be executed before any matching routes
- before(String, Filter) - Static method in class spark.Spark
-
Maps a filter to be executed before any matching routes
- before(String, Filter...) - Static method in class spark.Spark
-
Maps an array of filters to be executed before any matching routes
- before(Filter) - Method in class spark.Routable
-
Maps a filter to be executed before any matching routes
- before(Filter...) - Static method in class spark.Spark
-
Maps one or many filters to be executed before any matching routes
- BeforeFilters - Class in spark.http.matching
-
Executes the Before filters matching an HTTP request.
- BeforeFilters() - Constructor for class spark.http.matching.BeforeFilters
- bestMatch(Collection<String>, String) - Static method in class spark.utils.MimeParse
-
Finds best match
- body - Variable in exception class spark.HaltException
- body - Variable in class spark.http.matching.RouteContext
- body - Variable in class spark.Request
- body - Variable in class spark.Response
- body() - Method in exception class spark.HaltException
- body() - Method in class spark.http.matching.RequestWrapper
- body() - Method in class spark.http.matching.ResponseWrapper
- body() - Method in class spark.http.matching.RouteContext
- body() - Method in class spark.Request
- body() - Method in class spark.Response
-
returns the body
- body(String) - Method in class spark.http.matching.ResponseWrapper
- body(String) - Method in class spark.Response
-
Sets the body
- Body - Class in spark.http.matching
-
Represents the 'body'
- Body() - Constructor for class spark.http.matching.Body
- bodyAsBytes - Variable in class spark.Request
- bodyAsBytes() - Method in class spark.http.matching.RequestWrapper
- bodyAsBytes() - Method in class spark.Request
- booleanValue() - Method in class spark.QueryParamsMap
- BYTE_TABLE - Static variable in class spark.utils.urldecoding.Utf8Appendable
- byteArrayInputStream - Variable in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- BytesSerializer - Class in spark.serialization
-
Bytes serializer.
- BytesSerializer() - Constructor for class spark.serialization.BytesSerializer
C
- cachedBytes - Variable in class spark.embeddedserver.jetty.HttpRequestWrapper
- CachedServletInputStream() - Constructor for class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- cacheInputStream() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper
- canonical(String) - Static method in class spark.resource.UriPath
-
Convert a path to a cananonical form.
- canProcess(Object) - Method in class spark.serialization.BytesSerializer
- canProcess(Object) - Method in class spark.serialization.DefaultSerializer
- canProcess(Object) - Method in class spark.serialization.InputStreamSerializer
- canProcess(Object) - Method in class spark.serialization.Serializer
-
Checks if the serializer implementation can process the element type.
- certAlias - Variable in class spark.ssl.SslStores
- certAlias() - Method in class spark.ssl.SslStores
- changeMatch(Request, RouteMatch) - Static method in class spark.Access
- changeMatch(RouteMatch) - Method in class spark.http.matching.RequestWrapper
- changeMatch(RouteMatch) - Method in class spark.Request
- checkAndWrap(HttpServletRequest, HttpServletResponse, boolean) - Static method in class spark.utils.GzipUtils
-
Checks if the HTTP request/response accepts and wants GZIP and i that case wraps the response output stream in a
GZIPOutputStream
. - checkCharAppend() - Method in class spark.utils.urldecoding.Utf8Appendable
- checkState() - Method in class spark.utils.urldecoding.Utf8Appendable
- class2Name - Static variable in class spark.utils.urldecoding.TypeUtil
- class2Value - Static variable in class spark.utils.urldecoding.TypeUtil
- classLoader - Variable in class spark.resource.ClassPathResource
- classPackageAsResourcePath(Class<?>) - Static method in class spark.utils.ClassUtils
-
Given an input class object, return a string which consists of the class's package name as a pathname, i.e., all dots ('.') are replaced by slashes ('/').
- CLASSPATH_URL_PREFIX - Static variable in class spark.utils.ResourceUtils
-
Pseudo URL prefix for loading from the class path: "classpath:"
- ClassPathResource - Class in spark.resource
-
Resource
implementation for class path resources. - ClassPathResource(String) - Constructor for class spark.resource.ClassPathResource
-
Create a new ClassPathResource for ClassLoader usage.
- ClassPathResource(String, ClassLoader) - Constructor for class spark.resource.ClassPathResource
-
Create a new ClassPathResource for ClassLoader usage.
- ClassPathResource(String, ClassLoader, Class<?>) - Constructor for class spark.resource.ClassPathResource
-
Create a new ClassPathResource with optional ClassLoader and Class.
- ClassPathResourceHandler - Class in spark.resource
-
Locates resources in classpath Code snippets copied from Eclipse Jetty source.
- ClassPathResourceHandler(String) - Constructor for class spark.resource.ClassPathResourceHandler
-
Constructor
- ClassPathResourceHandler(String, String) - Constructor for class spark.resource.ClassPathResourceHandler
-
Constructor
- ClassUtils - Class in spark.utils
-
Miscellaneous class utility methods.
- ClassUtils() - Constructor for class spark.utils.ClassUtils
- clazz - Variable in class spark.resource.ClassPathResource
- cleanKey(String) - Static method in class spark.QueryParamsMap
- cleanPath(String) - Static method in class spark.utils.StringUtils
-
Normalize the path by suppressing sequences like "path/.." and inner simple dots.
- clear() - Method in class spark.ExceptionMapper
-
Clear the exception mappings.
- clear() - Method in class spark.route.Routes
-
¨Clear all routes
- clear() - Method in class spark.staticfiles.StaticFilesConfiguration
-
Clears all static file configuration
- clearRoutes() - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- collectionToDelimitedString(Collection<?>, String) - Static method in class spark.utils.StringUtils
-
Convenience method to return a Collection as a delimited (e.g.
- collectionToDelimitedString(Collection<?>, String, String, String) - Static method in class spark.utils.StringUtils
-
Convenience method to return a Collection as a delimited (e.g.
- CollectionUtils - Class in spark.utils
-
Miscellaneous collection utility methods.
- CollectionUtils() - Constructor for class spark.utils.CollectionUtils
- commonClassCache - Static variable in class spark.utils.ClassUtils
-
Map with common "java.lang" class name as key and corresponding Class as value.
- compareTo(MimeParse.FitnessAndQuality) - Method in class spark.utils.MimeParse.FitnessAndQuality
- configure(String) - Method in class spark.staticfiles.StaticFilesConfiguration
-
Configures location for static resources
- configureExternal(String) - Method in class spark.staticfiles.StaticFilesConfiguration
-
Configures location for static resources
- configureWebSockets(Map<String, WebSocketHandlerWrapper>, Optional<Integer>) - Method in interface spark.embeddedserver.EmbeddedServer
-
Configures the web sockets for the embedded server.
- configureWebSockets(Map<String, WebSocketHandlerWrapper>, Optional<Integer>) - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
- connect - Enum constant in enum class spark.route.HttpMethod
- connect(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- connect(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- connect(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- connect(String, Route) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- connect(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- connect(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP CONNECT requests
- connect(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP CONNECT requests
- consume(HttpServletRequest, HttpServletResponse) - Method in class spark.staticfiles.StaticFilesConfiguration
-
Attempt consuming using either static resource handlers or jar resource handlers
- consumeWithFileResourceHandlers(HttpServletRequest, HttpServletResponse) - Method in class spark.staticfiles.StaticFilesConfiguration
- content - Variable in class spark.http.matching.Body
- CONTENT_ENCODING - Static variable in class spark.utils.GzipUtils
- CONTENT_TYPE - Static variable in class spark.staticfiles.MimeType
- contentLength() - Method in class spark.http.matching.RequestWrapper
- contentLength() - Method in class spark.Request
- contentLength() - Method in class spark.resource.AbstractFileResolvingResource
- contentLength() - Method in class spark.resource.AbstractResource
-
This implementation reads the entire InputStream to calculate the content length.
- contentLength() - Method in interface spark.resource.Resource
- contentType() - Method in class spark.http.matching.RequestWrapper
- contentType() - Method in class spark.Request
- contextPath() - Method in class spark.http.matching.RequestWrapper
- contextPath() - Method in class spark.Request
- convertHexDigit(char) - Static method in class spark.utils.urldecoding.TypeUtil
- convertHexDigit(int) - Static method in class spark.utils.urldecoding.TypeUtil
- convertRouteToList(String) - Static method in class spark.utils.SparkUtils
- cookie(String) - Method in class spark.http.matching.RequestWrapper
- cookie(String) - Method in class spark.Request
-
Gets cookie by name.
- cookie(String, String) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String) - Method in class spark.Response
-
Adds not persistent cookie to the response.
- cookie(String, String, int) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String, int) - Method in class spark.Response
-
Adds cookie to the response.
- cookie(String, String, int, boolean) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String, int, boolean) - Method in class spark.Response
-
Adds cookie to the response.
- cookie(String, String, int, boolean, boolean) - Method in class spark.Response
-
Adds cookie to the response.
- cookie(String, String, String, int, boolean) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String, String, int, boolean) - Method in class spark.Response
-
Adds cookie to the response.
- cookie(String, String, String, int, boolean, boolean) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String, String, int, boolean, boolean) - Method in class spark.Response
-
Adds cookie to the response.
- cookie(String, String, String, String, int, boolean, boolean) - Method in class spark.http.matching.ResponseWrapper
- cookie(String, String, String, String, int, boolean, boolean) - Method in class spark.Response
-
Adds cookie to the response.
- cookies() - Method in class spark.http.matching.RequestWrapper
- cookies() - Method in class spark.Request
- copy(InputStream, OutputStream) - Static method in class spark.utils.IOUtils
-
Copies bytes from an
InputStream
to anOutputStream
. - copy(InputStream, Writer) - Static method in class spark.utils.IOUtils
-
Copy bytes from an
InputStream
to chars on aWriter
using the default character encoding of the platform. - copy(Reader, Writer) - Static method in class spark.utils.IOUtils
-
Copy chars from a
Reader
to aWriter
. - copyLarge(InputStream, OutputStream) - Static method in class spark.utils.IOUtils
-
Copies bytes from a large (over 2GB)
InputStream
to anOutputStream
. - copyLarge(Reader, Writer) - Static method in class spark.utils.IOUtils
-
Copy chars from a large (over 2GB)
Reader
to aWriter
. - create() - Static method in class spark.http.matching.Body
- create() - Static method in class spark.http.matching.RequestWrapper
- create() - Static method in class spark.http.matching.ResponseWrapper
- create() - Static method in class spark.http.matching.RouteContext
-
Creates a RouteContext
- create() - Static method in class spark.route.Routes
- create() - Static method in class spark.staticfiles.StaticFilesConfiguration
- create(int, int, int) - Method in class spark.embeddedserver.jetty.JettyServer
-
Creates a Jetty server.
- create(int, int, int) - Method in interface spark.embeddedserver.jetty.JettyServerFactory
-
Creates a Jetty server.
- create(Object, Routes, ExceptionMapper, StaticFilesConfiguration, boolean) - Static method in class spark.embeddedserver.EmbeddedServers
-
Creates an embedded server of type corresponding to the provided identifier.
- create(Object, Routes, StaticFilesConfiguration, boolean) - Static method in class spark.embeddedserver.EmbeddedServers
-
Deprecated.
- create(String, String, String, String) - Static method in class spark.ssl.SslStores
-
Creates a Stores instance.
- create(String, String, String, String, boolean) - Static method in class spark.ssl.SslStores
- create(String, String, String, String, String) - Static method in class spark.ssl.SslStores
- create(String, String, String, String, String, boolean) - Static method in class spark.ssl.SslStores
- create(String, String, Filter) - Static method in class spark.FilterImpl
-
Wraps the filter in FilterImpl
- create(String, String, Route) - Static method in class spark.RouteImpl
-
Wraps the route in RouteImpl
- create(String, String, Route, ResponseTransformer) - Static method in class spark.ResponseTransformerRouteImpl
- create(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.TemplateViewRouteImpl
-
factory method
- create(String, Filter) - Static method in class spark.FilterImpl
-
Wraps the filter in FilterImpl
- create(String, Route) - Static method in class spark.RouteImpl
-
Wraps the route in RouteImpl
- create(String, Route, ResponseTransformer) - Static method in class spark.ResponseTransformerRouteImpl
- create(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.TemplateViewRouteImpl
-
factory method
- create(Map<String, WebSocketHandlerWrapper>, Optional<Integer>) - Static method in class spark.embeddedserver.jetty.websocket.WebSocketServletContextHandlerFactory
-
Creates a new websocket servlet context handler.
- create(HttpServletRequest) - Static method in class spark.RequestResponseFactory
-
Used to create a request and no RouteMatch is available.
- create(HttpServletResponse) - Static method in class spark.RequestResponseFactory
- create(ThreadPool) - Method in class spark.embeddedserver.jetty.JettyServer
-
Creates a Jetty server with supplied thread pool
- create(ThreadPool) - Method in interface spark.embeddedserver.jetty.JettyServerFactory
- create(WebSocketHandlerWrapper) - Static method in class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory
-
Creates a
WebSocketCreator
that uses the given handler class/instance for the WebSocket connections. - create(Routable) - Static method in class spark.Redirect
-
Creates a `Redirect` instance
- create(Routes, StaticFilesConfiguration, boolean) - Method in interface spark.embeddedserver.EmbeddedServerFactory
-
Deprecated.
- create(Routes, StaticFilesConfiguration, ExceptionMapper, boolean) - Method in interface spark.embeddedserver.EmbeddedServerFactory
-
Creates an embedded server instance.
- create(Routes, StaticFilesConfiguration, ExceptionMapper, boolean) - Method in class spark.embeddedserver.jetty.EmbeddedJettyFactory
- create(RouteMatch, HttpServletRequest) - Static method in class spark.RequestResponseFactory
- createHttpConnectionFactory() - Static method in class spark.embeddedserver.jetty.SocketConnectorFactory
- createRelative(String) - Method in class spark.resource.AbstractResource
-
This implementation throws a FileNotFoundException, assuming that relative resources cannot be created for this resource.
- createRelative(String) - Method in class spark.resource.ClassPathResource
-
This implementation creates a ClassPathResource, applying the given path relative to the path of the underlying resource of this descriptor.
- createRelative(String) - Method in interface spark.resource.Resource
- createRouteImpl(String, String, Route) - Method in class spark.Routable
-
Create route implementation or use default response transformer
- createRouteImpl(String, Route) - Method in class spark.Routable
-
Create route implementation or use default response transformer
- createSecureSocketConnector(Server, String, int, SslStores) - Static method in class spark.embeddedserver.jetty.SocketConnectorFactory
-
Creates a ssl jetty socket jetty.
- createSocketConnector(Server, String, int) - Static method in class spark.embeddedserver.jetty.SocketConnectorFactory
-
Creates an ordinary, non-secured Jetty server jetty.
- createWebSocket(ServletUpgradeRequest, ServletUpgradeResponse) - Method in class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory.SparkWebSocketCreator
- creationTime() - Method in class spark.Session
- CURRENT_PATH - Static variable in class spark.utils.StringUtils
- CustomErrorPages - Class in spark
-
Holds the custom error pages.
- CustomErrorPages() - Constructor for class spark.CustomErrorPages
- CustomErrorPages.SingletonHolder - Class in spark
- customHeaders - Variable in class spark.staticfiles.StaticFilesConfiguration
- customizeConnection(HttpURLConnection) - Method in class spark.resource.AbstractFileResolvingResource
-
Customize the given
HttpURLConnection
, obtained in the course of anAbstractFileResolvingResource.exists()
,AbstractFileResolvingResource.contentLength()
orAbstractFileResolvingResource.lastModified()
call. - customizeConnection(URLConnection) - Method in class spark.resource.AbstractFileResolvingResource
-
Customize the given
URLConnection
, obtained in the course of anAbstractFileResolvingResource.exists()
,AbstractFileResolvingResource.contentLength()
orAbstractFileResolvingResource.lastModified()
call. - customPages - Variable in class spark.CustomErrorPages
D
- decode(String) - Static method in class spark.Base64
- decodeISO88591Path(String, int, int) - Static method in class spark.utils.urldecoding.UrlDecode
- decoder - Static variable in class spark.Base64
- DEFAULT_ACCEPT_TYPE - Static variable in class spark.FilterImpl
- DEFAULT_ACCEPT_TYPE - Static variable in class spark.RouteImpl
- DEFAULT_ACCEPT_TYPE - Static variable in class spark.Service
- DEFAULT_BUFFER_SIZE - Static variable in class spark.utils.IOUtils
-
The default buffer size to use.
- defaultIdentifier() - Static method in class spark.embeddedserver.EmbeddedServers
- defaultPages - Variable in class spark.CustomErrorPages
- defaultResponseTransformer - Variable in class spark.Routable
- defaultResponseTransformer(ResponseTransformer) - Method in class spark.Routable
-
Sets default response transformer
- defaultResponseTransformer(ResponseTransformer) - Static method in class spark.Spark
-
Set the default response transformer.
- DefaultSerializer - Class in spark.serialization
-
Serializer that writes the result of toString to output in UTF-8 encoding
- DefaultSerializer() - Constructor for class spark.serialization.DefaultSerializer
- delegate - Variable in class spark.FilterImpl
- delegate - Variable in class spark.http.matching.RequestWrapper
- delegate - Variable in class spark.http.matching.ResponseWrapper
- delegate - Variable in class spark.RouteImpl
- delegate() - Method in class spark.FilterImpl
- delegate() - Method in class spark.RouteImpl
- delegate() - Method in interface spark.utils.Wrapper
- delete - Enum constant in enum class spark.route.HttpMethod
- delete(String, String) - Method in class spark.Redirect
-
Redirects any HTTP request of type DELETE on 'fromPath' to 'toPath'
- delete(String, String, Redirect.Status) - Method in class spark.Redirect
-
Redirects any HTTP request of type DELETE on 'fromPath' to 'toPath' with the provided redirect 'status' code.
- delete(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- delete(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- delete(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- delete(String, Route) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- delete(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- delete(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP DELETE requests
- delete(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP DELETE requests
- deleteAny(String, String) - Static method in class spark.utils.StringUtils
-
Delete any character in a given String.
- delimitedListToStringArray(String, String) - Static method in class spark.utils.StringUtils
-
Take a String which is a delimited list and convert it to a String array.
- delimitedListToStringArray(String, String, String) - Static method in class spark.utils.StringUtils
-
Take a String which is a delimited list and convert it to a String array.
- destroy() - Method in class spark.http.matching.MatcherFilter
- destroy() - Method in interface spark.servlet.SparkApplication
-
Invoked from the SparkFilter.
- destroy() - Method in class spark.servlet.SparkFilter
- DirectoryTraversal - Class in spark.staticfiles
-
Protecting against Directory traversal
- DirectoryTraversal() - Constructor for class spark.staticfiles.DirectoryTraversal
- DirectoryTraversal.DirectoryTraversalDetection - Exception Class in spark.staticfiles
- DirectoryTraversalDetection(String) - Constructor for exception class spark.staticfiles.DirectoryTraversal.DirectoryTraversalDetection
- disableGuessing() - Static method in class spark.staticfiles.MimeType
- disableMimeTypeGuessing() - Method in class spark.Service.StaticFiles
-
Disables the automatic setting of Content-Type header made from a guess based on extension.
- doFilter(ServletRequest, ServletResponse, FilterChain) - Method in class spark.http.matching.MatcherFilter
- doFilter(ServletRequest, ServletResponse, FilterChain) - Method in class spark.servlet.SparkFilter
- doHandle(String, Request, HttpServletRequest, HttpServletResponse) - Method in class spark.embeddedserver.jetty.JettyHandler
- doubleValue() - Method in class spark.QueryParamsMap
E
- EmbeddedJettyFactory - Class in spark.embeddedserver.jetty
-
Creates instances of embedded jetty containers.
- EmbeddedJettyFactory() - Constructor for class spark.embeddedserver.jetty.EmbeddedJettyFactory
- EmbeddedJettyFactory(JettyServerFactory) - Constructor for class spark.embeddedserver.jetty.EmbeddedJettyFactory
- EmbeddedJettyServer - Class in spark.embeddedserver.jetty
-
Spark server implementation
- EmbeddedJettyServer(JettyServerFactory, Handler) - Constructor for class spark.embeddedserver.jetty.EmbeddedJettyServer
- EmbeddedServer - Interface in spark.embeddedserver
-
Represents an embedded server that can be used in Spark.
- EmbeddedServerFactory - Interface in spark.embeddedserver
- embeddedServerIdentifier - Variable in class spark.Service
- embeddedServerIdentifier() - Method in class spark.Service
-
Get the identifier used to select the EmbeddedServer; null for the default.
- embeddedServerIdentifier(Object) - Method in class spark.Service
-
Set the identifier used to select the EmbeddedServer; null for the default.
- EmbeddedServers - Class in spark.embeddedserver
-
Holds and uses the factories for creating different Embedded servers.
- EmbeddedServers() - Constructor for class spark.embeddedserver.EmbeddedServers
- EmbeddedServers.Identifiers - Enum Class in spark.embeddedserver
- encode(String) - Static method in class spark.Base64
- equals(Object) - Method in class spark.http.matching.RequestWrapper
- equals(Object) - Method in class spark.http.matching.ResponseWrapper
- equals(Object) - Method in class spark.resource.AbstractResource
-
This implementation compares description strings.
- equals(Object) - Method in class spark.resource.ClassPathResource
-
This implementation compares the underlying class path locations.
- exception(Class<T>, ExceptionHandler<? super T>) - Method in class spark.Service
-
Maps an exception handler to be executed when an exception occurs during routing
- exception(Class<T>, ExceptionHandler<? super T>) - Static method in class spark.Spark
-
Maps an exception handler to be executed when an exception occurs during routing
- exceptionClass - Variable in class spark.ExceptionHandlerImpl
-
Holds the type of exception that this filter will handle
- exceptionClass() - Method in class spark.ExceptionHandlerImpl
-
Returns type of exception that this filter will handle
- exceptionClass(Class<? extends T>) - Method in class spark.ExceptionHandlerImpl
-
Sets the type of exception that this filter will handle
- ExceptionHandler<T> - Interface in spark
-
Created by Per Wendel on 2014-05-10.
- ExceptionHandlerImpl<T> - Class in spark
- ExceptionHandlerImpl(Class<T>) - Constructor for class spark.ExceptionHandlerImpl
-
Initializes the filter with the provided exception type
- exceptionMap - Variable in class spark.ExceptionMapper
-
Holds a map of Exception classes and associated handlers
- exceptionMapper - Variable in class spark.http.matching.MatcherFilter
- exceptionMapper - Variable in class spark.Service
- ExceptionMapper - Class in spark
- ExceptionMapper() - Constructor for class spark.ExceptionMapper
-
Class constructor
- execute(RouteContext) - Static method in class spark.http.matching.AfterAfterFilters
- execute(RouteContext) - Static method in class spark.http.matching.AfterFilters
- execute(RouteContext) - Static method in class spark.http.matching.BeforeFilters
- execute(RouteContext) - Static method in class spark.http.matching.Routes
- exists() - Method in class spark.resource.AbstractFileResolvingResource
- exists() - Method in class spark.resource.AbstractResource
-
This implementation checks whether a File can be opened, falling back to whether an InputStream can be opened.
- exists() - Method in class spark.resource.ClassPathResource
-
This implementation checks for the resolution of a resource URL.
- exists() - Method in class spark.resource.ExternalResource
- exists() - Method in interface spark.resource.Resource
-
Return whether this resource actually exists in physical form.
- existsFor(int) - Static method in class spark.CustomErrorPages
-
Verifies that a custom error page exists for the given status code
- Experimental - Annotation Interface in spark
-
Types and methods annotated with this annotation are experimental and may be changed or removed from the API at any time.
- expireTime(long) - Method in class spark.Service.StaticFiles
-
Sets the expire-time for static resources
- external - Static variable in class spark.staticfiles.StaticFilesFolder
- external() - Static method in class spark.staticfiles.StaticFilesFolder
-
Deprecated.
- externalConfiguredTo(String) - Static method in class spark.staticfiles.StaticFilesFolder
-
Deprecated.
- externalContainer - Variable in class spark.http.matching.MatcherFilter
- externalLocation(String) - Method in class spark.Service.StaticFiles
-
Sets the external folder serving static files.
- ExternalResource - Class in spark.resource
-
Created by Per Wendel on 2014-05-18.
- ExternalResource(String) - Constructor for class spark.resource.ExternalResource
-
Constructor
- ExternalResourceHandler - Class in spark.resource
-
Locates resources from external folder Code snippets copied from Eclipse Jetty source.
- ExternalResourceHandler(String) - Constructor for class spark.resource.ExternalResourceHandler
-
Constructor
- ExternalResourceHandler(String, String) - Constructor for class spark.resource.ExternalResourceHandler
-
Constructor
- externalStaticFileLocation(String) - Method in class spark.Service
-
Sets the external folder serving static files.
- externalStaticFileLocation(String) - Static method in class spark.Spark
-
Sets the external folder serving static files.
- externalStaticResourcesSet - Variable in class spark.staticfiles.StaticFilesConfiguration
- extinguish() - Method in interface spark.embeddedserver.EmbeddedServer
-
Extinguish the embedded server.
- extinguish() - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
-
Extinguish the embedded server.
- extractJarFileURL(URL) - Static method in class spark.utils.ResourceUtils
-
Extract the URL for the actual jar file from the given URL (which may point to a resource in a jar file or to a jar file itself).
F
- factories - Static variable in class spark.embeddedserver.EmbeddedServers
- file - Variable in class spark.resource.ExternalResource
- FILE_URL_PREFIX - Static variable in class spark.utils.ResourceUtils
-
URL prefix for loading from the file system: "file:"
- filter - Variable in class spark.embeddedserver.jetty.JettyHandler
- Filter - Interface in spark
-
Created by Per Wendel on 2014-05-10.
- FILTER_MAPPING_PARAM - Static variable in class spark.servlet.FilterTools
- FilterImpl - Class in spark
-
FilterImpl is created from a path, acceptType and Filter.
- FilterImpl(String, String) - Constructor for class spark.FilterImpl
- FilterImpl(String, String, Filter) - Constructor for class spark.FilterImpl
- filterPath - Variable in class spark.servlet.SparkFilter
- FilterTools - Class in spark.servlet
- FilterTools() - Constructor for class spark.servlet.FilterTools
- find(HttpMethod, String, String) - Method in class spark.route.Routes
-
finds target for a requested route
- findAll() - Method in class spark.route.Routes
- findMultiple(HttpMethod, String, String) - Method in class spark.route.Routes
-
Finds multiple targets for a requested route.
- findTargetForRequestedRoute(HttpMethod, String, String) - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- findTargetsForRequestedRoute(HttpMethod, String) - Method in class spark.route.Routes
- findTargetsForRequestedRoute(HttpMethod, String, String) - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- findTargetWithGivenAcceptType(List<RouteEntry>, String) - Method in class spark.route.Routes
- fitness - Variable in class spark.utils.MimeParse.FitnessAndQuality
- FitnessAndQuality(int, float) - Constructor for class spark.utils.MimeParse.FitnessAndQuality
- fitnessAndQualityParsed(String, Collection<MimeParse.ParseResults>) - Static method in class spark.utils.MimeParse
-
Find the best match for a given mimeType against a list of media_ranges that have already been parsed by MimeParse.parseMediaRange().
- floatValue() - Method in class spark.QueryParamsMap
- FOLDER_SEPARATOR - Static variable in class spark.utils.StringUtils
- forName(String, ClassLoader) - Static method in class spark.utils.ClassUtils
-
Replacement for
Class.forName()
that also returns Class instances for primitives (e.g."int") and array class names (e.g. - FOUND - Enum constant in enum class spark.Redirect.Status
- fromPathInfo(String) - Static method in class spark.staticfiles.MimeType
- fromResource(AbstractFileResolvingResource) - Static method in class spark.staticfiles.MimeType
G
- GeneralError - Class in spark.http.matching
-
Modifies the HTTP response and body based on the provided exception and request/response wrappers.
- GeneralError() - Constructor for class spark.http.matching.GeneralError
- get - Enum constant in enum class spark.route.HttpMethod
- get() - Method in class spark.http.matching.Body
- get() - Static method in class spark.route.ServletRoutes
- get(String) - Static method in enum class spark.route.HttpMethod
-
Gets the HttpMethod corresponding to the provided string.
- get(String...) - Method in class spark.QueryParamsMap
-
Returns an element from the specified key.
- get(String, String) - Method in class spark.Redirect
-
Redirects any HTTP request of type GET on 'fromPath' to 'toPath'
- get(String, String, Redirect.Status) - Method in class spark.Redirect
-
Redirects any HTTP request of type GET on 'fromPath' to 'toPath' with the provided redirect 'status' code.
- get(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- get(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- get(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- get(String, Route) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- get(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- get(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP GET requests
- get(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP GET requests
- getAcceptedMimeTypes(List<RouteEntry>) - Method in class spark.route.Routes
- getAcceptType() - Method in class spark.FilterImpl
- getAcceptType() - Method in class spark.RouteImpl
- getAcceptType() - Method in class spark.routematch.RouteMatch
- getApplication(String) - Method in class spark.servlet.SparkFilter
-
Returns an instance of
SparkApplication
which on whichinit()
will be called. - getApplication(FilterConfig) - Method in class spark.servlet.SparkFilter
-
Deprecated.
- getApplications(FilterConfig) - Method in class spark.servlet.SparkFilter
-
Returns the instances of
SparkApplication
which on whichinit()
will be called. - getBody() - Method in exception class spark.HaltException
-
Deprecated.replaced by
HaltException.body()
- getDefaultClassLoader() - Static method in class spark.utils.ClassUtils
-
Return the default ClassLoader to use: typically the thread context ClassLoader, if available; the ClassLoader that loaded the ClassUtils class will be used as fallback.
- getDefaultFor(int) - Method in class spark.CustomErrorPages
-
Returns the default error page for a given status code.
- getDelegate() - Method in class spark.http.matching.RequestWrapper
- getDelegate() - Method in class spark.http.matching.ResponseWrapper
- getDescription() - Method in class spark.resource.ClassPathResource
-
This implementation returns a description that includes the class path location.
- getDescription() - Method in class spark.resource.ExternalResource
- getDescription() - Method in interface spark.resource.Resource
- getFile() - Method in class spark.resource.AbstractFileResolvingResource
-
This implementation returns a File reference for the underlying class path resource, provided that it refers to a file in the file system.
- getFile() - Method in class spark.resource.AbstractResource
-
This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to an absolute file path.
- getFile() - Method in interface spark.resource.Resource
- getFile(String) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource location to a
java.io.File
, i.e. - getFile(URI) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource URI to a
java.io.File
, i.e. - getFile(URI, String) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource URI to a
java.io.File
, i.e. - getFile(URL) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource URL to a
java.io.File
, i.e. - getFile(URL, String) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource URL to a
java.io.File
, i.e. - getFileForLastModifiedCheck() - Method in class spark.resource.AbstractFileResolvingResource
-
This implementation determines the underlying File (or jar file, in case of a resource in a jar/zip).
- getFileForLastModifiedCheck() - Method in class spark.resource.AbstractResource
-
Determine the File to use for timestamp checking.
- getFilename() - Method in class spark.resource.AbstractResource
-
This implementation always returns
null
, assuming that this resource type does not have a filename. - getFilename() - Method in class spark.resource.ClassPathResource
-
This implementation returns the name of the file that this class path resource refers to.
- getFilename() - Method in class spark.resource.ExternalResource
-
This implementation returns the name of the file that this external resource refers to.
- getFilename() - Method in interface spark.resource.Resource
-
Determine a filename for this resource, i.e.
- getFilename(String) - Static method in class spark.utils.StringUtils
-
Extract the filename from the given path.
- getFilterPath(FilterConfig) - Static method in class spark.servlet.FilterTools
- getFor(int, Request, Response) - Static method in class spark.CustomErrorPages
-
Gets the custom error page for a given status code.
- getHandler() - Method in class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory.SparkWebSocketCreator
- getHandler() - Method in class spark.embeddedserver.jetty.websocket.WebSocketHandlerClassWrapper
- getHandler() - Method in class spark.embeddedserver.jetty.websocket.WebSocketHandlerInstanceWrapper
- getHandler() - Method in interface spark.embeddedserver.jetty.websocket.WebSocketHandlerWrapper
-
Gets the actual handler - if necessary, instantiating an object.
- getHandler(Class<? extends Exception>) - Method in class spark.ExceptionMapper
-
Returns the handler associated with the provided exception class
- getHandler(Exception) - Method in class spark.ExceptionMapper
-
Returns the handler associated with the provided exception class
- getHttpMethod() - Method in class spark.routematch.RouteMatch
- getHttpMethodFrom(HttpServletRequest) - Method in class spark.http.matching.MatcherFilter
- getInputStream() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper
- getInputStream() - Method in class spark.resource.ClassPathResource
-
This implementation opens an InputStream for the given class path resource.
- getInputStream() - Method in class spark.resource.ExternalResource
- getInputStream() - Method in interface spark.resource.InputStreamResource
-
Return an
InputStream
. - getInstance() - Static method in class spark.CustomErrorPages
- getInstance() - Static method in class spark.ExceptionMapper
-
Deprecated.
- getInstance() - Static method in class spark.Spark
- getMatchUri() - Method in class spark.routematch.RouteMatch
- getMimeType(String) - Static method in class spark.staticfiles.MimeType
- getModel() - Method in class spark.ModelAndView
- getParams(List<String>, List<String>) - Static method in class spark.Request
- getPath() - Method in class spark.FilterImpl
-
Returns this route's path
- getPath() - Method in class spark.resource.ClassPathResource
-
Return the path for this resource (as resource path within the class path).
- getPath() - Method in class spark.resource.ExternalResource
-
Gets the path
- getPath() - Method in class spark.RouteImpl
- getPaths() - Method in class spark.Service
- getQueryMap() - Method in class spark.QueryParamsMap
- getRelativePath(HttpServletRequest, String) - Static method in class spark.servlet.FilterTools
- getRequestURI() - Method in class spark.routematch.RouteMatch
- getResource(String) - Method in class spark.resource.AbstractResourceHandler
-
Gets resource from path
- getResource(String) - Method in class spark.resource.ClassPathResourceHandler
- getResource(String) - Method in class spark.resource.ExternalResourceHandler
- getResource(HttpServletRequest) - Method in class spark.resource.AbstractResourceHandler
-
Gets a resource from a servlet request
- getServletInstance() - Static method in class spark.ExceptionMapper
-
Returns exception mapper instance used in servlet mode
- getSplat(List<String>, List<String>) - Static method in class spark.Request
- getStatusCode() - Method in exception class spark.HaltException
-
Deprecated.replaced by
HaltException.statusCode()
- getTarget() - Method in class spark.routematch.RouteMatch
- getURI() - Method in class spark.resource.AbstractResource
-
This implementation builds a URI based on the URL returned by
AbstractResource.getURL()
. - getURI() - Method in interface spark.resource.Resource
- getURL() - Method in class spark.resource.AbstractResource
-
This implementation throws a FileNotFoundException, assuming that the resource cannot be resolved to a URL.
- getURL() - Method in class spark.resource.ClassPathResource
-
This implementation returns a URL for the underlying class path resource.
- getURL() - Method in class spark.resource.ExternalResource
-
This implementation returns a URL for the underlying class path resource.
- getURL() - Method in interface spark.resource.Resource
- getURL(String) - Static method in class spark.utils.ResourceUtils
-
Resolve the given resource location to a
java.net.URL
. - getValues() - Method in class spark.QueryParamsMap
- getViewName() - Method in class spark.ModelAndView
- guessingOn - Static variable in class spark.staticfiles.MimeType
- GZIP - Static variable in class spark.utils.GzipUtils
- GzipUtils - Class in spark.utils
-
GZIP utility class.
- GzipUtils() - Constructor for class spark.utils.GzipUtils
- GzipUtils.StringMatch - Class in spark.utils
-
Used instead of lambdas due to risk for java.lang.IncompatibleClassChangeError.
H
- halt() - Method in class spark.Service
-
Immediately stops a request within a filter or route NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt() - Static method in class spark.Spark
-
Immediately stops a request within a filter or route NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(int) - Method in class spark.Service
-
Immediately stops a request within a filter or route with specified status code NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(int) - Static method in class spark.Spark
-
Immediately stops a request within a filter or route with specified status code NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(int, String) - Method in class spark.Service
-
Immediately stops a request within a filter or route with specified status code and body content NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(int, String) - Static method in class spark.Spark
-
Immediately stops a request within a filter or route with specified status code and body content NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(String) - Method in class spark.Service
-
Immediately stops a request within a filter or route with specified body content NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- halt(String) - Static method in class spark.Spark
-
Immediately stops a request within a filter or route with specified body content NOTE: When using this don't catch exceptions of type HaltException, or if catched, re-throw otherwise halt will not work
- Halt - Class in spark.http.matching
-
Modifies the HTTP response and body based on the provided HaltException.
- Halt() - Constructor for class spark.http.matching.Halt
- HaltException - Exception Class in spark
-
Exception used for stopping the execution
- HaltException() - Constructor for exception class spark.HaltException
- HaltException(int) - Constructor for exception class spark.HaltException
- HaltException(int, String) - Constructor for exception class spark.HaltException
- HaltException(String) - Constructor for exception class spark.HaltException
- handle(Request, Response) - Method in interface spark.Filter
-
Invoked when a request is made on this filter's corresponding path e.g.
- handle(Request, Response) - Method in class spark.FilterImpl
-
Invoked when a request is made on this filter's corresponding path e.g.
- handle(Request, Response) - Method in interface spark.Route
-
Invoked when a request is made on this route's corresponding path e.g.
- handle(Request, Response) - Method in class spark.RouteImpl
-
Invoked when a request is made on this route's corresponding path e.g.
- handle(Request, Response) - Method in interface spark.TemplateViewRoute
-
Invoked when a request is made on this route's corresponding path e.g.
- handle(T, Request, Response) - Method in interface spark.ExceptionHandler
-
Invoked when an exception that is mapped to this handler occurs during routing
- handle(T, Request, Response) - Method in class spark.ExceptionHandlerImpl
-
Invoked when an exception that is mapped to this handler occurs during routing
- handler - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- handler - Variable in class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory.SparkWebSocketCreator
- handler - Variable in class spark.embeddedserver.jetty.websocket.WebSocketHandlerInstanceWrapper
- handlerClass - Variable in class spark.embeddedserver.jetty.websocket.WebSocketHandlerClassWrapper
- hashCode() - Method in class spark.http.matching.RequestWrapper
- hashCode() - Method in class spark.http.matching.ResponseWrapper
- hashCode() - Method in class spark.resource.AbstractResource
-
This implementation returns the description's hash code.
- hashCode() - Method in class spark.resource.ClassPathResource
-
This implementation returns the hash code of the underlying class path location.
- hasKey(String) - Method in class spark.QueryParamsMap
- hasKeys() - Method in class spark.QueryParamsMap
- hasLength(CharSequence) - Static method in class spark.utils.StringUtils
-
Check that the given CharSequence is neither
null
nor of length 0. - hasLength(String) - Static method in class spark.utils.StringUtils
-
Check that the given String is neither
null
nor of length 0. - hasLength(String, String) - Static method in class spark.utils.Assert
-
Assert that the given String is not empty; that is, it must not be
null
and not the empty String. - hasMultipleHandlers() - Method in class spark.Service
- hasOtherHandlers - Variable in class spark.http.matching.MatcherFilter
- hasValue() - Method in class spark.QueryParamsMap
- head - Enum constant in enum class spark.route.HttpMethod
- head(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- head(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- head(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- head(String, Route) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- head(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- head(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP HEAD requests
- head(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP HEAD requests
- header(String, int) - Method in class spark.Response
-
Adds/Sets a response header
- header(String, String) - Method in class spark.http.matching.ResponseWrapper
- header(String, String) - Method in class spark.Response
-
Adds/Sets a response header
- header(String, String) - Method in class spark.Service.StaticFiles
-
Puts custom header for static resources.
- header(String, Date) - Method in class spark.Response
-
Adds/Sets a response header
- header(String, Instant) - Method in class spark.Response
-
Adds/Sets a response header
- header(String, Date) - Method in class spark.Response
-
Adds/Sets a response header
- headers - Variable in class spark.Request
- headers() - Method in class spark.http.matching.RequestWrapper
- headers() - Method in class spark.Request
- headers(String) - Method in class spark.http.matching.RequestWrapper
- headers(String) - Method in class spark.Request
-
Gets the value for the provided header
- headers(Map<String, String>) - Method in class spark.Service.StaticFiles
-
Puts custom headers for static resources.
- host() - Method in class spark.http.matching.RequestWrapper
- host() - Method in class spark.Request
- http - Variable in class spark.Redirect
- HTTP_METHOD_OVERRIDE_HEADER - Static variable in class spark.http.matching.MatcherFilter
- httpMethod - Variable in class spark.http.matching.RouteContext
- httpMethod - Variable in class spark.route.RouteEntry
- httpMethod - Variable in class spark.routematch.RouteMatch
- httpMethod() - Method in class spark.http.matching.RouteContext
- HttpMethod - Enum Class in spark.route
- HttpMethod() - Constructor for enum class spark.route.HttpMethod
- httpOnly - Variable in class spark.embeddedserver.jetty.EmbeddedJettyFactory
- httpRequest - Variable in class spark.http.matching.RouteContext
- httpRequest() - Method in class spark.http.matching.RouteContext
- HttpRequestWrapper - Class in spark.embeddedserver.jetty
-
Http request wrapper.
- HttpRequestWrapper(HttpServletRequest) - Constructor for class spark.embeddedserver.jetty.HttpRequestWrapper
- HttpRequestWrapper.CachedServletInputStream - Class in spark.embeddedserver.jetty
I
- id() - Method in class spark.Session
- Identifiers() - Constructor for enum class spark.embeddedserver.EmbeddedServers.Identifiers
- ignite() - Static method in class spark.Service
-
Creates a new Service (a Spark instance).
- ignite(String, int, SslStores, int, int, int) - Method in interface spark.embeddedserver.EmbeddedServer
-
Ignites the embedded server, listening on the specified port, running SSL secured with the specified keystore and truststore.
- ignite(String, int, SslStores, int, int, int) - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
-
Ignites the embedded server, listening on the specified port, running SSL secured with the specified keystore and truststore.
- init() - Method in class spark.Service
- init() - Method in interface spark.servlet.SparkApplication
-
Invoked from the SparkFilter.
- init() - Static method in class spark.Spark
-
Initializes the Spark server.
- init(FilterConfig) - Method in class spark.http.matching.MatcherFilter
- init(FilterConfig) - Method in class spark.servlet.SparkFilter
- initExceptionHandler - Variable in class spark.Service
- initExceptionHandler(Consumer<Exception>) - Method in class spark.Service
-
Overrides default exception handler during initialization phase
- initExceptionHandler(Consumer<Exception>) - Static method in class spark.Spark
-
Overrides default exception handler during initialization phase
- initialize() - Static method in class spark.embeddedserver.EmbeddedServers
- initializeConnector(ServerConnector, String, int) - Static method in class spark.embeddedserver.jetty.SocketConnectorFactory
- initialized - Variable in class spark.Service
- initializeRouteMatcher() - Method in class spark.Service
- initiateStop() - Method in class spark.Service
- initLatch - Variable in class spark.Service
- initQueryMap() - Method in class spark.Request
- InputStreamResource - Interface in spark.resource
-
Simple interface for objects that are sources for an
InputStream
. - InputStreamSerializer - Class in spark.serialization
-
Input stream serializer.
- InputStreamSerializer() - Constructor for class spark.serialization.InputStreamSerializer
- INSTANCE - Static variable in class spark.CustomErrorPages.SingletonHolder
- INSTANCE - Static variable in class spark.Spark.SingletonHolder
- integerValue() - Method in class spark.QueryParamsMap
- INTERNAL_ARRAY_PREFIX - Static variable in class spark.utils.ClassUtils
-
Prefix for internal array class names: "["
- INTERNAL_ERROR - Static variable in class spark.CustomErrorPages
- internalServerError(String) - Method in class spark.Service
-
Maps 500 internal server errors to the provided custom page
- internalServerError(String) - Static method in class spark.Spark
-
Maps 500 internal server errors to the provided custom page
- internalServerError(Route) - Method in class spark.Service
-
Maps 500 internal server errors to the provided route.
- internalServerError(Route) - Static method in class spark.Spark
-
Maps 500 internal server errors to the provided route.
- intValue - Variable in enum class spark.Redirect.Status
- intValue() - Method in enum class spark.Redirect.Status
- invalidate() - Method in class spark.Session
-
Invalidates this session then unbinds any objects bound to it.
- IOUtils - Class in spark.utils
-
General IO stream manipulation utilities.
- IOUtils() - Constructor for class spark.utils.IOUtils
- ip() - Method in class spark.http.matching.RequestWrapper
- ip() - Method in class spark.Request
- ipAddress - Variable in class spark.Service
- ipAddress(String) - Method in class spark.Service
-
Set the IP address that Spark should listen on.
- ipAddress(String) - Static method in class spark.Spark
-
Set the IP address that Spark should listen on.
- isBlank(CharSequence) - Static method in class spark.utils.StringUtils
- isBlank(String) - Static method in class spark.utils.MimeParse
- isDirectory() - Method in class spark.resource.ExternalResource
-
Tests whether the file denoted by this abstract pathname is a directory.
- isEmpty(Object) - Static method in class spark.utils.StringUtils
-
Check whether the given String is empty.
- isEmpty(Object[]) - Static method in class spark.utils.ObjectUtils
-
Determine whether the given array is empty: i.e.
- isEmpty(Collection<?>) - Static method in class spark.utils.CollectionUtils
-
Return
true
if the supplied Collection isnull
or empty. - isExternalStaticResourcesSet() - Method in class spark.staticfiles.StaticFilesConfiguration
- isFileURL(URL) - Static method in class spark.utils.ResourceUtils
-
Determine whether the given URL points to a resource in the file system, that is, has protocol "file" or "vfs".
- isFinished() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- isInvalidPath(String) - Static method in class spark.resource.ClassPathResource
- isJarURL(URL) - Static method in class spark.utils.ResourceUtils
-
Determine whether the given URL points to a resource in a jar file, that is, has protocol "jar", "zip", "wsjar" or "code-source".
- isNew() - Method in class spark.Session
- isNotBlank(CharSequence) - Static method in class spark.utils.StringUtils
- isNotEmpty(String) - Static method in class spark.utils.StringUtils
-
Checks if the given String is not empty
- isNotEmpty(Collection<?>) - Static method in class spark.utils.CollectionUtils
-
Return
true
if the supplied Collection is notnull
and not empty. - isOpen() - Method in class spark.resource.AbstractResource
-
This implementation always returns
false
. - isOpen() - Method in interface spark.resource.Resource
-
Return whether this resource represents a handle with an open stream.
- isParam(String) - Static method in class spark.utils.SparkUtils
- isPathWithinFolder(String, String) - Static method in class spark.staticfiles.DirectoryTraversal
- isReadable() - Method in class spark.resource.AbstractFileResolvingResource
- isReadable() - Method in class spark.resource.AbstractResource
-
This implementation always returns
true
. - isReadable() - Method in interface spark.resource.Resource
-
Return whether the contents of this resource can be read, e.g.
- isReady() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- isRedirected() - Method in class spark.http.matching.ResponseWrapper
- isRunningFromServlet - Static variable in class spark.globalstate.ServletFlag
- isRunningFromServlet() - Static method in class spark.globalstate.ServletFlag
- isSet() - Method in class spark.http.matching.Body
- isSplat(String) - Static method in class spark.utils.SparkUtils
- isStaticResourcesSet() - Method in class spark.staticfiles.StaticFilesConfiguration
- isTrue(boolean, String) - Static method in class spark.utils.Assert
-
Assert a boolean expression, throwing
IllegalArgumentException
if the test result isfalse
. - isUrl(String) - Static method in class spark.utils.ResourceUtils
-
Return whether the given resource location is a URL: either a special "classpath" pseudo URL or a standard URL.
- isUtf8SequenceComplete() - Method in class spark.utils.urldecoding.Utf8Appendable
- isValid(String) - Static method in class spark.resource.ClassPathResource
J
- JAR_URL_SEPARATOR - Static variable in class spark.utils.ResourceUtils
-
Separator between JAR URL and file path within the JAR
- JETTY - Enum constant in enum class spark.embeddedserver.EmbeddedServers.Identifiers
- JettyHandler - Class in spark.embeddedserver.jetty
-
Simple Jetty Handler
- JettyHandler(Filter) - Constructor for class spark.embeddedserver.jetty.JettyHandler
- JettyServer - Class in spark.embeddedserver.jetty
-
Creates Jetty Server instances.
- JettyServer() - Constructor for class spark.embeddedserver.jetty.JettyServer
- JettyServerFactory - Interface in spark.embeddedserver.jetty
-
This interface can be implemented to provide custom Jetty server instances with specific settings or features.
- join() - Method in interface spark.embeddedserver.EmbeddedServer
-
Joins the embedded server thread(s).
- join() - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
-
Joins the embedded server thread(s).
K
- KEY_PATTERN - Static variable in class spark.QueryParamsMap
-
Pattern for parsing the key of querystring
- keystoreFile - Variable in class spark.ssl.SslStores
- keystoreFile() - Method in class spark.ssl.SslStores
- keystorePassword - Variable in class spark.ssl.SslStores
- keystorePassword() - Method in class spark.ssl.SslStores
L
- lastAccessedTime() - Method in class spark.Session
- lastModified() - Method in class spark.resource.AbstractFileResolvingResource
- lastModified() - Method in class spark.resource.AbstractResource
-
This implementation checks the timestamp of the underlying File, if available.
- lastModified() - Method in interface spark.resource.Resource
- length() - Method in class spark.utils.urldecoding.Utf8Appendable
- length() - Method in class spark.utils.urldecoding.Utf8StringBuilder
- LINE_SEPARATOR - Static variable in class spark.utils.IOUtils
-
The system line separator string.
- loadKeys(String, String[]) - Method in class spark.QueryParamsMap
-
loads keys
- loadQueryString(Map<String, String[]>) - Method in class spark.QueryParamsMap
-
loads query string
- local - Static variable in class spark.staticfiles.StaticFilesFolder
- local() - Static method in class spark.staticfiles.StaticFilesFolder
-
Deprecated.
- localConfiguredTo(String) - Static method in class spark.staticfiles.StaticFilesFolder
-
Deprecated.
- location(String) - Method in class spark.Service.StaticFiles
-
Sets the folder in classpath serving static files.
- LOG - Static variable in class spark.CustomErrorPages
- LOG - Static variable in class spark.http.matching.GeneralError
- LOG - Static variable in class spark.http.matching.MatcherFilter
- LOG - Static variable in class spark.Request
- LOG - Static variable in class spark.resource.ClassPathResourceHandler
- LOG - Static variable in class spark.resource.ExternalResourceHandler
- LOG - Static variable in class spark.Response
-
The logger.
- LOG - Static variable in class spark.route.Routes
- LOG - Static variable in class spark.Service
- LOG - Static variable in class spark.servlet.SparkFilter
- LOG - Variable in class spark.staticfiles.StaticFilesConfiguration
- LOG - Static variable in class spark.staticfiles.StaticFilesFolder
- logger - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- logger - Static variable in class spark.embeddedserver.jetty.websocket.WebSocketServletContextHandlerFactory
- longValue() - Method in class spark.QueryParamsMap
M
- map(Class<? extends Exception>, ExceptionHandlerImpl) - Method in class spark.ExceptionMapper
-
Maps the given handler to the provided exception type.
- mappings - Static variable in class spark.staticfiles.MimeType
- matchedPath - Variable in class spark.Request
- matchedPath() - Method in class spark.http.matching.RequestWrapper
- matchedPath() - Method in class spark.Request
- matcherFilter - Variable in class spark.servlet.SparkFilter
- MatcherFilter - Class in spark.http.matching
-
Matches Spark routes and filters.
- MatcherFilter(Routes, StaticFilesConfiguration, ExceptionMapper, boolean, boolean) - Constructor for class spark.http.matching.MatcherFilter
-
Constructor
- matches(HttpMethod, String) - Method in class spark.route.RouteEntry
- matchPath(String) - Method in class spark.route.RouteEntry
- matchUri - Variable in class spark.routematch.RouteMatch
- maxInactiveInterval() - Method in class spark.Session
- maxInactiveInterval(int) - Method in class spark.Session
-
Specifies the time, in seconds, between client requests the web container will invalidate this session.
- maxThreads - Variable in class spark.Service
- methods - Static variable in enum class spark.route.HttpMethod
- MimeParse - Class in spark.utils
-
MIME-Type Parser
- MimeParse() - Constructor for class spark.utils.MimeParse
- MimeParse.FitnessAndQuality - Class in spark.utils
-
Structure for holding a fitness/quality combo
- MimeParse.ParseResults - Class in spark.utils
-
Parse results container
- mimeType - Variable in class spark.utils.MimeParse.FitnessAndQuality
- MimeType - Class in spark.staticfiles
-
Configures and holds mappings from file extensions to MIME types.
- MimeType() - Constructor for class spark.staticfiles.MimeType
- minThreads - Variable in class spark.Service
- model - Variable in class spark.ModelAndView
-
Model object.
- modelAndView(Object, String) - Static method in class spark.Spark
-
Constructs a ModelAndView with the provided model and view name
- modelAndView(Object, String) - Method in class spark.TemplateEngine
-
Creates a new ModelAndView object with given arguments.
- modelAndView(Object, String) - Method in class spark.TemplateViewRouteImpl
-
Creates a new ModelAndView object with given arguments.
- ModelAndView - Class in spark
-
Model And View class is used to set the name of the view and the model object to be rendered.
- ModelAndView(Object, String) - Constructor for class spark.ModelAndView
-
Constructs an instance with the provided model and view name
- modify(HttpServletRequest, HttpServletResponse, Body, RequestWrapper, ResponseWrapper, ExceptionMapper, Exception) - Static method in class spark.http.matching.GeneralError
-
Modifies the HTTP response and body based on the provided exception.
- modify(HttpServletResponse, Body, HaltException) - Static method in class spark.http.matching.Halt
-
Modifies the HTTP response and body based on the provided HaltException.
- MOVED_PERMANENTLY - Enum constant in enum class spark.Redirect.Status
- MULTIPLE_CHOICES - Enum constant in enum class spark.Redirect.Status
N
- NAME - Static variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- name2Class - Static variable in class spark.utils.urldecoding.TypeUtil
- needsClientCert - Variable in class spark.ssl.SslStores
- needsClientCert() - Method in class spark.ssl.SslStores
- next - Variable in class spark.serialization.Serializer
- NO_MIME_TYPE - Static variable in class spark.utils.MimeParse
-
Constant for no mime type
- NON_PRIMITIVE_ARRAY_PREFIX - Static variable in class spark.utils.ClassUtils
-
Prefix for internal non-primitive array class names: "[L"
- NOT_FOUND - Static variable in class spark.CustomErrorPages
- NOT_MODIFIED - Enum constant in enum class spark.Redirect.Status
- notConsumed - Variable in class spark.embeddedserver.jetty.HttpRequestWrapper
- notConsumed() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper
- notConsumed(boolean) - Method in class spark.embeddedserver.jetty.HttpRequestWrapper
- notEmpty(Object[], String) - Static method in class spark.utils.Assert
-
Assert that an array has elements; that is, it must not be
null
and must have at least one element. - notFound(String) - Method in class spark.Service
-
Maps 404 errors to the provided custom page
- notFound(String) - Static method in class spark.Spark
-
Maps 404 Not Found errors to the provided custom page
- notFound(Route) - Method in class spark.Service
-
Maps 404 errors to the provided route.
- notFound(Route) - Static method in class spark.Spark
-
Maps 404 Not Found errors to the provided route.
- notNull(Object) - Static method in class spark.utils.Assert
-
Assert that an object is not
null
. - notNull(Object, String) - Static method in class spark.utils.Assert
-
Assert that an object is not
null
. - notSet() - Method in class spark.http.matching.Body
- NotSupportedException - Exception Class in spark.embeddedserver
-
Used to indicate that a feature is not supported for the specific embedded server.
- NotSupportedException(String, String) - Constructor for exception class spark.embeddedserver.NotSupportedException
- NotUtf8Exception(String) - Constructor for exception class spark.utils.urldecoding.Utf8Appendable.NotUtf8Exception
- NULL - Static variable in class spark.QueryParamsMap
- NullQueryParamsMap() - Constructor for class spark.QueryParamsMap.NullQueryParamsMap
O
- ObjectUtils - Class in spark.utils
-
Miscellaneous object utility methods.
- ObjectUtils() - Constructor for class spark.utils.ObjectUtils
- options - Enum constant in enum class spark.route.HttpMethod
- options(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
- options(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
- options(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
- options(String, Route) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
- options(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
- options(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP OPTIONS requests
- options(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP OPTIONS requests
P
- params - Variable in class spark.Request
- params - Variable in class spark.utils.MimeParse.ParseResults
- params() - Method in class spark.http.matching.RequestWrapper
- params() - Method in class spark.Request
-
Returns the map containing all route params
- params(String) - Method in class spark.http.matching.RequestWrapper
- params(String) - Method in class spark.Request
-
Returns the value of the provided route pattern parameter.
- parseInt(String, int, int, int) - Static method in class spark.utils.urldecoding.TypeUtil
-
Parse an int from a substring.
- parseKey(String) - Method in class spark.QueryParamsMap
- parseMediaRange(String) - Static method in class spark.utils.MimeParse
-
Carves up a media range and returns a ParseResults.
- parseMimeType(String) - Static method in class spark.utils.MimeParse
-
Carves up a mime-type and returns a ParseResults object For example, the media range 'application/xhtml;q=0.5' would get parsed into: ('application', 'xhtml', {'q', '0.5'})
- ParseResults() - Constructor for class spark.utils.MimeParse.ParseResults
- parseValidateAddRoute(String, String, Object) - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- patch - Enum constant in enum class spark.route.HttpMethod
- patch(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- patch(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- patch(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- patch(String, Route) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- patch(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- patch(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP PATCH requests
- patch(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP PATCH requests
- path - Variable in class spark.FilterImpl
- path - Variable in class spark.resource.ClassPathResource
- path - Variable in class spark.route.RouteEntry
- path - Variable in class spark.RouteImpl
- path(String) - Static method in class spark.utils.urldecoding.UrlDecode
- path(String, int, int) - Static method in class spark.utils.urldecoding.UrlDecode
- path(String, RouteGroup) - Method in class spark.Service
-
Add a path-prefix to the routes declared in the routeGroup The path() method adds a path-fragment to a path-stack, adds routes from the routeGroup, then pops the path-fragment again.
- path(String, RouteGroup) - Static method in class spark.Spark
-
Add a path-prefix to the routes declared in the routeGroup The path() method adds a path-fragment to a path-stack, adds routes from the routeGroup, then pops the path-fragment again.
- pathDeque - Variable in class spark.Service
- pathInfo() - Method in class spark.http.matching.RequestWrapper
- pathInfo() - Method in class spark.Request
- PERMANENT_REDIRECT - Enum constant in enum class spark.Redirect.Status
- port - Variable in class spark.Service
- port() - Method in class spark.http.matching.RequestWrapper
- port() - Method in class spark.Request
- port() - Method in class spark.Service
-
Retrieves the port that Spark is listening on.
- port() - Static method in class spark.Spark
-
Retrieves the port that Spark is listening on.
- port(int) - Method in class spark.Service
-
Set the port that Spark should listen on.
- port(int) - Static method in class spark.Spark
-
Set the port that Spark should listen on.
- post - Enum constant in enum class spark.route.HttpMethod
- post(String, String) - Method in class spark.Redirect
-
Redirects any HTTP request of type POST on 'fromPath' to 'toPath'
- post(String, String, Redirect.Status) - Method in class spark.Redirect
-
Redirects any HTTP request of type POST on 'fromPath' to 'toPath' with the provided redirect 'status' code.
- post(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- post(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- post(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- post(String, Route) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- post(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- post(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP POST requests
- post(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP POST requests
- primitiveTypeNameMap - Static variable in class spark.utils.ClassUtils
-
Map with primitive type name as key and corresponding primitive type as value, for example: "int" -> "int.class".
- primitiveTypeToWrapperMap - Static variable in class spark.utils.ClassUtils
-
Map with primitive type as key and corresponding wrapper type as value, for example: int.class -> Integer.class.
- primitiveWrapperTypeMap - Static variable in class spark.utils.ClassUtils
-
Map with primitive wrapper type as key and corresponding primitive type as value, for example: Integer.class -> int.class.
- process(OutputStream, Object) - Method in class spark.serialization.BytesSerializer
- process(OutputStream, Object) - Method in class spark.serialization.DefaultSerializer
- process(OutputStream, Object) - Method in class spark.serialization.InputStreamSerializer
- process(OutputStream, Object) - Method in class spark.serialization.Serializer
-
Processes the provided element and serializes to output stream.
- process(OutputStream, Object) - Method in class spark.serialization.SerializerChain
-
Process the output.
- processElement(OutputStream, Object) - Method in class spark.serialization.Serializer
-
Wraps
Serializer.process(java.io.OutputStream, Object)
and calls next serializer in chain. - protectAgainstForExternal(String, String) - Static method in class spark.staticfiles.DirectoryTraversal
- protectAgainstInClassPath(String, String) - Static method in class spark.staticfiles.DirectoryTraversal
- protocol() - Method in class spark.http.matching.RequestWrapper
- protocol() - Method in class spark.Request
- put - Enum constant in enum class spark.route.HttpMethod
- put(String, String) - Method in class spark.Redirect
-
Redirects any HTTP request of type PUT on 'fromPath' to 'toPath'
- put(String, String, Redirect.Status) - Method in class spark.Redirect
-
Redirects any HTTP request of type PUT on 'fromPath' to 'toPath' with the provided redirect 'status' code.
- put(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- put(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- put(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- put(String, Route) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- put(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- put(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP PUT requests
- put(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP PUT requests
- putCustomHeader(String, String) - Method in class spark.staticfiles.StaticFilesConfiguration
- putCustomHeaders(Map<String, String>) - Method in class spark.staticfiles.StaticFilesConfiguration
Q
- quality - Variable in class spark.utils.MimeParse.FitnessAndQuality
- queryMap - Variable in class spark.QueryParamsMap
-
Holds the nested keys
- queryMap - Variable in class spark.Request
- queryMap() - Method in class spark.http.matching.RequestWrapper
- queryMap() - Method in class spark.Request
- queryMap(String) - Method in class spark.http.matching.RequestWrapper
- queryMap(String) - Method in class spark.Request
- queryParamOrDefault(String, String) - Method in class spark.Request
-
Gets the query param, or returns default value
- queryParams() - Method in class spark.http.matching.RequestWrapper
- queryParams() - Method in class spark.Request
- queryParams(String) - Method in class spark.http.matching.RequestWrapper
- queryParams(String) - Method in class spark.Request
-
Gets the query param
- QueryParamsMap - Class in spark
-
These objects represent the parameters sent on a Http Request.
- QueryParamsMap() - Constructor for class spark.QueryParamsMap
- QueryParamsMap(String, String...) - Constructor for class spark.QueryParamsMap
-
Parses the key and creates the child QueryParamMaps user[info][name] creates 3 nested QueryParamMaps.
- QueryParamsMap(Map<String, String[]>) - Constructor for class spark.QueryParamsMap
-
Constructor
- QueryParamsMap(HttpServletRequest) - Constructor for class spark.QueryParamsMap
-
Creates a new QueryParamsMap from an HttpServletRequest.
- QueryParamsMap.NullQueryParamsMap - Class in spark
- queryParamsSafe(String) - Method in class spark.http.matching.RequestWrapper
- queryParamsSafe(String) - Method in class spark.Request
-
Gets the query param and encode it
- queryParamsValues(String) - Method in class spark.http.matching.RequestWrapper
- queryParamsValues(String) - Method in class spark.Request
-
Gets all the values of the query param Example: query parameter 'id' from the following request URI: /hello?id=foo&id=bar
- queryString() - Method in class spark.http.matching.RequestWrapper
- queryString() - Method in class spark.Request
R
- raise(String, String) - Static method in exception class spark.embeddedserver.NotSupportedException
-
Raises a NotSupportedException for the provided class name and feature name.
- raw() - Method in class spark.http.matching.RequestWrapper
- raw() - Method in class spark.http.matching.ResponseWrapper
- raw() - Method in class spark.Request
- raw() - Method in class spark.Response
- raw() - Method in class spark.Session
- read() - Method in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- readBodyAsBytes() - Method in class spark.Request
- redirect - Variable in class spark.Service
- redirect - Static variable in class spark.Spark
-
Statically import this for redirect utility functionality, see
Redirect
- redirect(String) - Method in class spark.http.matching.ResponseWrapper
- redirect(String) - Method in class spark.Response
-
Trigger a browser redirect
- redirect(String, int) - Method in class spark.http.matching.ResponseWrapper
- redirect(String, int) - Method in class spark.Response
-
Trigger a browser redirect with specific http 3XX status code.
- Redirect - Class in spark
-
Provides redirect utility methods.
- Redirect(Routable) - Constructor for class spark.Redirect
- Redirect.Status - Enum Class in spark
-
The available redirect status codes.
- redirected - Variable in class spark.http.matching.ResponseWrapper
- redirectRoute(String, Redirect.Status) - Static method in class spark.Redirect
- register(String, String) - Static method in class spark.staticfiles.MimeType
- registerCommonClasses(Class<?>...) - Static method in class spark.utils.ClassUtils
-
Register the given common classes with the ClassUtils cache.
- registerMimeType(String, String) - Method in class spark.Service.StaticFiles
-
Maps an extension to a mime-type.
- remove(String) - Method in class spark.route.Routes
-
Removes a particular route from the collection of those that have been previously routed.
- remove(String, String) - Method in class spark.route.Routes
-
Removes a particular route from the collection of those that have been previously routed.
- removeAttribute(String) - Method in class spark.Session
-
Removes the object bound with the specified name from this session.
- removeCookie(String) - Method in class spark.http.matching.ResponseWrapper
- removeCookie(String) - Method in class spark.Response
-
Removes the cookie.
- removeCookie(String, String) - Method in class spark.http.matching.ResponseWrapper
- removeCookie(String, String) - Method in class spark.Response
-
Removes the cookie with given path and name.
- removeLeadingAndTrailingSlashesFrom(String) - Static method in class spark.utils.StringUtils
- removeRoute(String) - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- removeRoute(String, String) - Method in class spark.route.SimpleRouteMatcher
-
Deprecated.
- removeRoute(HttpMethod, String) - Method in class spark.route.Routes
- render(Object) - Method in interface spark.ResponseTransformer
-
Method called for rendering the output.
- render(Object) - Method in class spark.ResponseTransformerRouteImpl
-
Method called for rendering the output.
- render(Object) - Method in class spark.RouteImpl
-
This method should render the given element into something that can be send through Response element.
- render(Object) - Method in class spark.TemplateEngine
-
Renders the object
- render(Object) - Method in class spark.TemplateViewRouteImpl
- render(ModelAndView) - Method in class spark.TemplateEngine
-
Method called to render the output that is sent to client.
- render(ModelAndView) - Method in class spark.TemplateViewRouteImpl
-
Method called to render the output that is sent to client.
- replace(String, String, String) - Static method in class spark.utils.StringUtils
-
Replace all occurrences of a substring within a string with another string.
- REPLACEMENT - Static variable in class spark.utils.urldecoding.Utf8Appendable
- request - Variable in class spark.Session
- Request - Class in spark
-
Provides information about the HTTP request
- Request() - Constructor for class spark.Request
- Request(HttpServletRequest) - Constructor for class spark.Request
-
Constructor - Used to create a request and no RouteMatch is available.
- Request(RouteMatch, HttpServletRequest) - Constructor for class spark.Request
-
Constructor
- requestMethod() - Method in class spark.http.matching.RequestWrapper
- requestMethod() - Method in class spark.Request
- RequestResponseFactory - Class in spark
- RequestResponseFactory() - Constructor for class spark.RequestResponseFactory
- requestURI - Variable in class spark.routematch.RouteMatch
- requestWrapper - Variable in class spark.http.matching.RouteContext
- requestWrapper() - Method in class spark.http.matching.RouteContext
- RequestWrapper - Class in spark.http.matching
- RequestWrapper() - Constructor for class spark.http.matching.RequestWrapper
- reset() - Method in class spark.utils.urldecoding.Utf8Appendable
- reset() - Method in class spark.utils.urldecoding.Utf8StringBuilder
- resolvePrimitiveClassName(String) - Static method in class spark.utils.ClassUtils
-
Resolve the given class name as primitive class, if appropriate, according to the JVM's naming rules for primitive classes.
- Resource - Interface in spark.resource
-
Interface for a resource descriptor that abstracts from the actual type of underlying resource, such as a file or class path resource.
- ResourceUtils - Class in spark.utils
-
Utility methods for resolving resource locations to files in the file system.
- ResourceUtils() - Constructor for class spark.utils.ResourceUtils
- response - Variable in class spark.http.matching.RouteContext
- response - Variable in class spark.Response
- response() - Method in class spark.http.matching.RouteContext
- Response - Class in spark
-
Provides functionality for modifying the response
- Response() - Constructor for class spark.Response
- Response(HttpServletResponse) - Constructor for class spark.Response
- ResponseTransformer - Interface in spark
-
A ResponseTransformer holds the implementation of the 'render' method.
- ResponseTransformerRouteImpl - Class in spark
-
A ResponseTransformerRouteImpl is built up by a path (for url-matching) and the implementation of the 'render' method.
- ResponseTransformerRouteImpl(String, String, Route) - Constructor for class spark.ResponseTransformerRouteImpl
- responseWrapper - Variable in class spark.http.matching.RouteContext
- responseWrapper() - Method in class spark.http.matching.RouteContext
- ResponseWrapper - Class in spark.http.matching
- ResponseWrapper() - Constructor for class spark.http.matching.ResponseWrapper
- root - Variable in class spark.serialization.SerializerChain
- Routable - Class in spark
-
Routable abstract class.
- Routable() - Constructor for class spark.Routable
- Route - Interface in spark
-
Created by Per Wendel on 2014-05-10.
- RouteContext - Class in spark.http.matching
-
Holds the parameters needed in the Before filters, Routes and After filters execution.
- RouteContext() - Constructor for class spark.http.matching.RouteContext
- RouteEntry - Class in spark.route
-
Class that holds information about routes
- RouteEntry() - Constructor for class spark.route.RouteEntry
- RouteEntry(RouteEntry) - Constructor for class spark.route.RouteEntry
- RouteGroup - Interface in spark
- RouteImpl - Class in spark
-
RouteImpl is created from a path, acceptType and Route.
- RouteImpl(String) - Constructor for class spark.RouteImpl
-
Constructor
- RouteImpl(String, String) - Constructor for class spark.RouteImpl
-
Constructor
- RouteImpl(String, String, Object) - Constructor for class spark.RouteImpl
-
Constructor
- RouteMatch - Class in spark.routematch
- RouteMatch(Object, String, String, String) - Constructor for class spark.routematch.RouteMatch
- RouteMatch(Object, String, String, String, HttpMethod) - Constructor for class spark.routematch.RouteMatch
- routeMatcher - Variable in class spark.http.matching.MatcherFilter
- routeMatcher - Variable in class spark.http.matching.RouteContext
- routeMatcher() - Method in class spark.http.matching.RouteContext
- routes - Variable in class spark.route.Routes
- routes - Static variable in class spark.route.ServletRoutes
- routes - Variable in class spark.Service
- routes() - Method in class spark.Service
- routes() - Static method in class spark.Spark
- Routes - Class in spark.http.matching
-
Created by Per Wendel on 2016-01-28.
- Routes - Class in spark.route
-
Holds the routes and performs matching from HTTP requests to routes.
- Routes() - Constructor for class spark.http.matching.Routes
- Routes() - Constructor for class spark.route.Routes
-
Constructor
- routeWithGivenAcceptType(String) - Method in class spark.route.Routes
- runFromServlet() - Static method in class spark.globalstate.ServletFlag
-
Tells the system that Spark was run from an "external" web application server.
S
- scheme() - Method in class spark.http.matching.RequestWrapper
- scheme() - Method in class spark.Request
- secure(String, String, String, String) - Method in class spark.Service
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String) - Static method in class spark.Spark
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, boolean) - Method in class spark.Service
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, boolean) - Static method in class spark.Spark
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, String) - Method in class spark.Service
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, String) - Static method in class spark.Spark
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, String, boolean) - Method in class spark.Service
-
Set the connection to be secure, using the specified keystore and truststore.
- secure(String, String, String, String, String, boolean) - Static method in class spark.Spark
-
Set the connection to be secure, using the specified keystore and truststore.
- SEE_OTHER - Enum constant in enum class spark.Redirect.Status
- Serializer - Class in spark.serialization
-
Class that serializers and writes the result to given output stream.
- Serializer() - Constructor for class spark.serialization.Serializer
- serializerChain - Variable in class spark.http.matching.MatcherFilter
- SerializerChain - Class in spark.serialization
-
Chain of serializers for the output.
- SerializerChain() - Constructor for class spark.serialization.SerializerChain
-
Constructs a serializer chain.
- serializeTo(HttpServletResponse, SerializerChain, HttpServletRequest) - Method in class spark.http.matching.Body
- serialVersionUID - Static variable in exception class spark.embeddedserver.NotSupportedException
- serialVersionUID - Static variable in exception class spark.HaltException
- serialVersionUID - Static variable in exception class spark.staticfiles.DirectoryTraversal.DirectoryTraversalDetection
- server - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- server - Variable in class spark.Service
- serverFactory - Variable in class spark.embeddedserver.jetty.EmbeddedJettyFactory
- serverFactory - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- Service - Class in spark
-
Represents a Spark server "session".
- Service() - Constructor for class spark.Service
- Service.StaticFiles - Class in spark
-
Provides static files utility methods.
- ServletFlag - Class in spark.globalstate
-
Holds the global information if Spark was run from an "external" web application server.
- ServletFlag() - Constructor for class spark.globalstate.ServletFlag
- servletInstance - Static variable in class spark.ExceptionMapper
-
Holds an exception mapper instance for use in servlet mode
- servletInstance - Static variable in class spark.staticfiles.StaticFilesConfiguration
- servletPath() - Method in class spark.http.matching.RequestWrapper
- servletPath() - Method in class spark.Request
- servletRequest - Variable in class spark.Request
- ServletRoutes - Class in spark.route
-
Holds the servlet routes.
- ServletRoutes() - Constructor for class spark.route.ServletRoutes
- session - Variable in class spark.Request
- session - Variable in class spark.Session
- session() - Method in class spark.http.matching.RequestWrapper
- session() - Method in class spark.Request
-
Returns the current session associated with this request, or if the request does not have a session, creates one.
- session(boolean) - Method in class spark.http.matching.RequestWrapper
- session(boolean) - Method in class spark.Request
-
Returns the current session associated with this request, or if there is no current session and
create
is true, returns a new session. - Session - Class in spark
-
Provides session information.
- Session(HttpSession, Request) - Constructor for class spark.Session
-
Creates a session with the
HttpSession
. - set(Object) - Method in class spark.http.matching.Body
- setDelegate(Request) - Method in class spark.http.matching.RequestWrapper
- setDelegate(Response) - Method in class spark.http.matching.ResponseWrapper
- setExpireTimeSeconds(long) - Method in class spark.staticfiles.StaticFilesConfiguration
- setIpAddress(String) - Static method in class spark.Spark
-
Deprecated.replaced by
Spark.ipAddress(String)
- setNext(Serializer) - Method in class spark.serialization.Serializer
-
Sets the next serializer in the chain.
- setPort(int) - Static method in class spark.Spark
-
Deprecated.replaced by
Spark.port(int)
- setReadListener(ReadListener) - Method in class spark.embeddedserver.jetty.HttpRequestWrapper.CachedServletInputStream
- setSecure(String, String, String, String) - Static method in class spark.Spark
-
Deprecated.replaced by
Spark.secure(String, String, String, String)
- shouldGuess() - Static method in class spark.staticfiles.MimeType
- SimpleRouteMatcher - Class in spark.route
-
Deprecated.see
Routes
- SimpleRouteMatcher() - Constructor for class spark.route.SimpleRouteMatcher
-
Deprecated.
- SINGLE_QUOTE - Static variable in class spark.route.Routes
- SingletonHolder() - Constructor for class spark.CustomErrorPages.SingletonHolder
- SingletonHolder() - Constructor for class spark.Spark.SingletonHolder
- SLASH - Static variable in class spark.resource.AbstractResourceHandler
- SLASH - Static variable in class spark.servlet.FilterTools
- SLASH_WILDCARD - Static variable in class spark.servlet.FilterTools
- SocketConnectorFactory - Class in spark.embeddedserver.jetty
-
Creates socket connectors.
- SocketConnectorFactory() - Constructor for class spark.embeddedserver.jetty.SocketConnectorFactory
- spark - package spark
- Spark - Class in spark
-
The main building block of a Spark application is a set of routes.
- Spark() - Constructor for class spark.Spark
- SPARK_DEFAULT_PORT - Static variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- SPARK_DEFAULT_PORT - Static variable in class spark.Service
- spark.embeddedserver - package spark.embeddedserver
- spark.embeddedserver.jetty - package spark.embeddedserver.jetty
- spark.embeddedserver.jetty.websocket - package spark.embeddedserver.jetty.websocket
- spark.globalstate - package spark.globalstate
- spark.http.matching - package spark.http.matching
- spark.resource - package spark.resource
- spark.route - package spark.route
- spark.routematch - package spark.routematch
- spark.serialization - package spark.serialization
- spark.servlet - package spark.servlet
- Spark.SingletonHolder - Class in spark
-
Initializes singleton.
- spark.ssl - package spark.ssl
- spark.staticfiles - package spark.staticfiles
- spark.utils - package spark.utils
- spark.utils.urldecoding - package spark.utils.urldecoding
- SparkApplication - Interface in spark.servlet
-
The application entry point when Spark is run in a servlet context.
- SparkFilter - Class in spark.servlet
-
Filter that can be configured to be used in a web.xml file.
- SparkFilter() - Constructor for class spark.servlet.SparkFilter
- SparkUtils - Class in spark.utils
-
Some utility methods
- SparkUtils() - Constructor for class spark.utils.SparkUtils
- SparkWebSocketCreator(Object) - Constructor for class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory.SparkWebSocketCreator
- splat - Variable in class spark.Request
- splat() - Method in class spark.http.matching.RequestWrapper
- splat() - Method in class spark.Request
- sslStores - Variable in class spark.Service
- SslStores - Class in spark.ssl
-
SSL Stores
- SslStores(String, String, String, String, String, boolean) - Constructor for class spark.ssl.SslStores
- state(boolean, String) - Static method in class spark.utils.Assert
-
Assert a boolean expression, throwing
IllegalStateException
if the test result isfalse
. - staticFileLocation(String) - Method in class spark.Service
-
Sets the folder in classpath serving static files.
- staticFileLocation(String) - Static method in class spark.Spark
-
Sets the folder in classpath serving static files.
- staticFiles - Variable in class spark.http.matching.MatcherFilter
- staticFiles - Variable in class spark.Service
- staticFiles - Static variable in class spark.Spark
-
Statically import this for static files utility functionality, see
Service.StaticFiles
- StaticFiles() - Constructor for class spark.Service.StaticFiles
- staticFilesConfiguration - Variable in class spark.Service
- StaticFilesConfiguration - Class in spark.staticfiles
-
Holds the static file configuration.
- StaticFilesConfiguration() - Constructor for class spark.staticfiles.StaticFilesConfiguration
- StaticFilesFolder - Class in spark.staticfiles
-
Created by Per Wendel on 2016-11-05.
- StaticFilesFolder() - Constructor for class spark.staticfiles.StaticFilesFolder
- staticResourceHandlers - Variable in class spark.staticfiles.StaticFilesConfiguration
- staticResourcesSet - Variable in class spark.staticfiles.StaticFilesConfiguration
- status() - Method in class spark.http.matching.ResponseWrapper
- status() - Method in class spark.Response
-
Returns the status code
- status(int) - Method in class spark.http.matching.ResponseWrapper
- status(int) - Method in class spark.Response
-
Sets the status code for the
- Status(int) - Constructor for enum class spark.Redirect.Status
- statusCode - Variable in exception class spark.HaltException
- statusCode() - Method in exception class spark.HaltException
- stop() - Method in class spark.Service
-
Stops the Spark server and clears all routes.
- stop() - Static method in class spark.Spark
-
Stops the Spark server and clears all routes
- stopLatch - Variable in class spark.Service
- STRING_MATCH - Static variable in class spark.utils.GzipUtils
- StringMatch() - Constructor for class spark.utils.GzipUtils.StringMatch
- StringUtils - Class in spark.utils
-
Miscellaneous
String
utility methods. - StringUtils() - Constructor for class spark.utils.StringUtils
- subType - Variable in class spark.utils.MimeParse.ParseResults
- SWITCH_PROXY - Enum constant in enum class spark.Redirect.Status
T
- target - Variable in class spark.route.RouteEntry
- target - Variable in class spark.routematch.RouteMatch
- TemplateEngine - Class in spark
-
A Template holds the implementation of the 'render' method.
- TemplateEngine() - Constructor for class spark.TemplateEngine
- TemplateViewRoute - Interface in spark
-
A TemplateViewRoute is built up by a path.
- TemplateViewRouteImpl - Class in spark
-
A TemplateViewRoute is built up by a path (for url-matching) and the implementation of the 'render' method.
- TemplateViewRouteImpl(String, String, TemplateViewRoute) - Constructor for class spark.TemplateViewRouteImpl
-
Constructor
- TEMPORARY_REDIRECT - Enum constant in enum class spark.Redirect.Status
- test(String) - Method in class spark.utils.GzipUtils.StringMatch
- threadIdleTimeoutMillis - Variable in class spark.Service
- threadPool - Variable in class spark.embeddedserver.jetty.EmbeddedJettyFactory
- threadPool - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- threadPool(int) - Method in class spark.Service
-
Configures the embedded web server's thread pool.
- threadPool(int) - Static method in class spark.Spark
-
Configures the embedded web server's thread pool.
- threadPool(int, int, int) - Method in class spark.Service
-
Configures the embedded web server's thread pool.
- threadPool(int, int, int) - Static method in class spark.Spark
-
Configures the embedded web server's thread pool.
- throwBeforeRouteMappingException() - Method in class spark.Service
- toByteArray(InputStream) - Static method in class spark.utils.IOUtils
-
Get the contents of an
InputStream
as a ByteArray - toFloat(String, float) - Static method in class spark.utils.MimeParse
- toHexString(byte) - Static method in class spark.utils.urldecoding.TypeUtil
- toHexString(byte[], int, int) - Static method in class spark.utils.urldecoding.TypeUtil
- toMap() - Method in class spark.QueryParamsMap
- TOP_PATH - Static variable in class spark.utils.StringUtils
- toString() - Method in class spark.http.matching.RequestWrapper
- toString() - Method in class spark.http.matching.ResponseWrapper
- toString() - Method in class spark.resource.AbstractResource
-
This implementation returns the description of this resource.
- toString() - Method in class spark.route.RouteEntry
- toString() - Method in class spark.utils.MimeParse.ParseResults
- toString() - Method in class spark.utils.urldecoding.Utf8StringBuilder
- toString(byte[], int) - Static method in class spark.utils.urldecoding.TypeUtil
- toString(byte[], String) - Static method in class spark.utils.StringUtils
- toString(InputStream) - Static method in class spark.utils.IOUtils
-
Get the contents of an
InputStream
as a String using the default character encoding of the platform. - toStringArray(Collection<String>) - Static method in class spark.utils.StringUtils
-
Copy the given Collection into a String array.
- toURI(String) - Static method in class spark.utils.ResourceUtils
-
Create a URI instance for the given location String, replacing spaces with "%20" URI encoding first.
- toURI(URL) - Static method in class spark.utils.ResourceUtils
-
Create a URI instance for the given URL, replacing spaces with "%20" URI encoding first.
- trace - Enum constant in enum class spark.route.HttpMethod
- trace(String, String, Route) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, String, Route) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- trace(String, String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- trace(String, String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- trace(String, Route) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, Route) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- trace(String, Route, ResponseTransformer) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, Route, ResponseTransformer) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- trace(String, TemplateViewRoute, TemplateEngine) - Method in class spark.Routable
-
Map the route for HTTP TRACE requests
- trace(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
-
Map the route for HTTP TRACE requests
- TRANS_TABLE - Static variable in class spark.utils.urldecoding.Utf8Appendable
- truststoreFile - Variable in class spark.ssl.SslStores
- trustStoreFile() - Method in class spark.ssl.SslStores
- truststorePassword - Variable in class spark.ssl.SslStores
- trustStorePassword() - Method in class spark.ssl.SslStores
- type - Variable in class spark.utils.MimeParse.ParseResults
- type() - Method in class spark.http.matching.ResponseWrapper
- type() - Method in class spark.Response
-
Returns the content type
- type(String) - Method in class spark.http.matching.ResponseWrapper
- type(String) - Method in class spark.Response
-
Sets the content type for the response
- TypeUtil - Class in spark.utils.urldecoding
-
TYPE Utilities.
- TypeUtil() - Constructor for class spark.utils.urldecoding.TypeUtil
U
- unixifyPath(String) - Static method in class spark.staticfiles.DirectoryTraversal
- unmap(String) - Method in class spark.Service
-
Unmaps a particular route from the collection of those that have been previously routed.
- unmap(String) - Static method in class spark.Spark
-
Unmaps a particular route from the collection of those that have been previously routed.
- unmap(String, String) - Method in class spark.Service
-
Unmaps a particular route from the collection of those that have been previously routed.
- unmap(String, String) - Static method in class spark.Spark
-
Unmaps a particular route from the collection of those that have been previously routed.
- unsupported - Enum constant in enum class spark.route.HttpMethod
- uri - Variable in class spark.http.matching.RouteContext
- uri() - Method in class spark.http.matching.RequestWrapper
- uri() - Method in class spark.http.matching.RouteContext
- uri() - Method in class spark.Request
- UriPath - Class in spark.resource
-
Used for converting URL paths.
- UriPath() - Constructor for class spark.resource.UriPath
- url() - Method in class spark.http.matching.RequestWrapper
- url() - Method in class spark.Request
- URL_PROTOCOL_FILE - Static variable in class spark.utils.ResourceUtils
-
URL protocol for a file in the file system: "file"
- URL_PROTOCOL_JAR - Static variable in class spark.utils.ResourceUtils
-
URL protocol for an entry from a jar file: "jar"
- URL_PROTOCOL_VFSZIP - Static variable in class spark.utils.ResourceUtils
-
URL protocol for an entry from a JBoss jar file: "vfszip"
- URL_PROTOCOL_WSJAR - Static variable in class spark.utils.ResourceUtils
-
URL protocol for an entry from a WebSphere jar file: "wsjar"
- URL_PROTOCOL_ZIP - Static variable in class spark.utils.ResourceUtils
-
URL protocol for an entry from a zip file: "zip"
- UrlDecode - Class in spark.utils.urldecoding
- UrlDecode() - Constructor for class spark.utils.urldecoding.UrlDecode
- urlEncoder - Static variable in class spark.Base64
- USE_PROXY - Enum constant in enum class spark.Redirect.Status
- useCachesIfNecessary(URLConnection) - Static method in class spark.utils.ResourceUtils
-
Set the
"useCaches"
flag on the given connection, preferringfalse
but leaving the flag attrue
for JNLP based resources. - USER_AGENT - Static variable in class spark.Request
- userAgent() - Method in class spark.http.matching.RequestWrapper
- userAgent() - Method in class spark.Request
- UTF8_ACCEPT - Static variable in class spark.utils.urldecoding.Utf8Appendable
- UTF8_REJECT - Static variable in class spark.utils.urldecoding.Utf8Appendable
- Utf8Appendable - Class in spark.utils.urldecoding
-
Utf8 Appendable abstract base class This abstract class wraps a standard
Appendable
and provides methods to append UTF-8 encoded bytes, that are converted into characters. - Utf8Appendable(Appendable) - Constructor for class spark.utils.urldecoding.Utf8Appendable
- Utf8Appendable.NotUtf8Exception - Exception Class in spark.utils.urldecoding
- Utf8StringBuilder - Class in spark.utils.urldecoding
-
UTF-8 StringBuilder.
- Utf8StringBuilder(int) - Constructor for class spark.utils.urldecoding.Utf8StringBuilder
V
- validateHandlerClass(Class<?>) - Static method in interface spark.embeddedserver.jetty.websocket.WebSocketHandlerWrapper
- validSession - Variable in class spark.Request
- validSession(boolean) - Method in class spark.Request
-
Set the session validity
- value() - Element in annotation interface spark.Experimental
- value() - Method in class spark.QueryParamsMap
-
Returns the value for this key.
- value(String...) - Method in class spark.QueryParamsMap
-
Returns the value for that key.
- valueOf(String) - Static method in enum class spark.embeddedserver.EmbeddedServers.Identifiers
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class spark.Redirect.Status
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class spark.route.HttpMethod
-
Returns the enum constant of this class with the specified name.
- values - Variable in class spark.QueryParamsMap
-
Value(s) for this key
- values() - Static method in enum class spark.embeddedserver.EmbeddedServers.Identifiers
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Method in class spark.QueryParamsMap
- values() - Static method in enum class spark.Redirect.Status
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class spark.route.HttpMethod
-
Returns an array containing the constants of this enum class, in the order they are declared.
- viewName - Variable in class spark.ModelAndView
-
View name used to render output.
W
- webSocket(String, Class<?>) - Method in class spark.Service
-
Maps the given path to the given WebSocket handler class.
- webSocket(String, Class<?>) - Static method in class spark.Spark
-
Maps the given path to the given WebSocket handler.
- webSocket(String, Object) - Method in class spark.Service
-
Maps the given path to the given WebSocket handler instance.
- webSocket(String, Object) - Static method in class spark.Spark
- WebSocketCreatorFactory - Class in spark.embeddedserver.jetty.websocket
-
Factory class to create
WebSocketCreator
implementations that delegate to the given handler class. - WebSocketCreatorFactory() - Constructor for class spark.embeddedserver.jetty.websocket.WebSocketCreatorFactory
- WebSocketCreatorFactory.SparkWebSocketCreator - Class in spark.embeddedserver.jetty.websocket
- WebSocketHandlerClassWrapper - Class in spark.embeddedserver.jetty.websocket
- WebSocketHandlerClassWrapper(Class<?>) - Constructor for class spark.embeddedserver.jetty.websocket.WebSocketHandlerClassWrapper
- WebSocketHandlerInstanceWrapper - Class in spark.embeddedserver.jetty.websocket
- WebSocketHandlerInstanceWrapper(Object) - Constructor for class spark.embeddedserver.jetty.websocket.WebSocketHandlerInstanceWrapper
- webSocketHandlers - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- webSocketHandlers - Variable in class spark.Service
- WebSocketHandlerWrapper - Interface in spark.embeddedserver.jetty.websocket
-
A wrapper for web socket handler classes/instances.
- webSocketIdleTimeoutMillis - Variable in class spark.embeddedserver.jetty.EmbeddedJettyServer
- webSocketIdleTimeoutMillis - Variable in class spark.Service
- webSocketIdleTimeoutMillis(int) - Method in class spark.Service
-
Sets the max idle timeout in milliseconds for WebSocket connections.
- webSocketIdleTimeoutMillis(int) - Static method in class spark.Spark
-
Sets the max idle timeout in milliseconds for WebSocket connections.
- WebSocketServletContextHandlerFactory - Class in spark.embeddedserver.jetty.websocket
-
Creates websocket servlet context handlers.
- WebSocketServletContextHandlerFactory() - Constructor for class spark.embeddedserver.jetty.websocket.WebSocketServletContextHandlerFactory
- welcomeFile - Variable in class spark.resource.ClassPathResourceHandler
- welcomeFile - Variable in class spark.resource.ExternalResourceHandler
- WINDOWS_FOLDER_SEPARATOR - Static variable in class spark.utils.StringUtils
- withAcceptType(String) - Method in class spark.http.matching.RouteContext
- withBody(Body) - Method in class spark.http.matching.RouteContext
- withHttpMethod(HttpMethod) - Method in class spark.http.matching.RouteContext
- withHttpOnly(boolean) - Method in class spark.embeddedserver.jetty.EmbeddedJettyFactory
- withHttpRequest(HttpServletRequest) - Method in class spark.http.matching.RouteContext
- withMatcher(Routes) - Method in class spark.http.matching.RouteContext
- withPrefix(String) - Method in class spark.FilterImpl
-
Prefix the path (used for
Service.path(java.lang.String, spark.RouteGroup)
) - withPrefix(String) - Method in class spark.RouteImpl
-
Prefix the path (used for
Service.path(java.lang.String, spark.RouteGroup)
) - withRequestWrapper(RequestWrapper) - Method in class spark.http.matching.RouteContext
- withResponse(Response) - Method in class spark.http.matching.RouteContext
- withResponseWrapper(ResponseWrapper) - Method in class spark.http.matching.RouteContext
- withThreadPool(ThreadPool) - Method in class spark.embeddedserver.jetty.EmbeddedJettyFactory
-
Sets optional thread pool for jetty server.
- withThreadPool(ThreadPool) - Method in class spark.embeddedserver.jetty.EmbeddedJettyServer
-
Sets optional thread pool for jetty server.
- withUri(String) - Method in class spark.http.matching.RouteContext
- Wrapper - Interface in spark.utils
-
Created by Per Wendel on 2016-04-25.
_
- _appendable - Variable in class spark.utils.urldecoding.Utf8Appendable
- _buffer - Variable in class spark.utils.urldecoding.Utf8StringBuilder
- _codep - Variable in class spark.utils.urldecoding.Utf8Appendable
- _state - Variable in class spark.utils.urldecoding.Utf8Appendable
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
SparkFilter.getApplications(FilterConfig)
instead.