Skip navigation links
A B C D E F G H I J K L M N O P Q R S T U V W 

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
 
Access - Class in spark
Provides access to package protected methods.
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
Parse and validates a route and adds it
addFilter(String, 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.Service
 
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...) - Static method in class spark.Spark
Maps one or many filters 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
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.
APPLICATION_CLASS_PARAM - Static variable in class spark.servlet.SparkFilter
 
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, Object) - Method in class spark.Request
Sets an attribute on the request (can be fetched in filters/routes later in the chain)
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.Session
Binds an object to this session, using the name specified.
attributes() - Method in class spark.Request
 
attributes() - Method in class spark.Session
 
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.

B

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...) - Static method in class spark.Spark
Maps one or many filters 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
bestMatch(Collection<String>, String) - Static method in class spark.utils.MimeParse
Finds best match
body() - Method in exception spark.HaltException
 
body() - Method in class spark.Request
 
body(String) - Method in class spark.Response
Sets the body
body() - Method in class spark.Response
returns the body
bodyAsBytes() - Method in class spark.Request
 
booleanValue() - Method in class spark.QueryParamsMap
 

C

canonical(String) - Static method in class spark.resource.UriPath
Convert a path to a cananonical form.
canProcess(Object) - Method in class spark.serialization.Serializer
Checks if the serializer implementation can process the element type.
changeMatch(Request, RouteMatch) - Static method in class spark.Access
 
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.
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
 
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.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, String, String) - Static method in class spark.utils.StringUtils
Convenience method to return a Collection as a delimited (e.g.
collectionToDelimitedString(Collection<?>, 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
 
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(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
consume(HttpServletRequest, HttpServletResponse) - Method in class spark.staticfiles.StaticFilesConfiguration
Attempt consuming using either static resource handlers or jar resource handlers
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.Request
 
contextPath() - Method in class spark.Request
 
convertRouteToList(String) - Static method in class spark.utils.SparkUtils
 
cookie(String) - Method in class spark.Request
Gets cookie by name.
cookie(String, String) - Method in class spark.Response
Adds not persistent cookie to the response.
cookie(String, String, int) - Method in class spark.Response
Adds cookie to the response.
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.Response
Adds cookie to the response.
cookie(String, String, String, int, boolean, boolean) - Method in class spark.Response
Adds cookie to the response.
cookies() - Method in class spark.Request
 
copy(InputStream, OutputStream) - Static method in class spark.utils.IOUtils
Copies bytes from an InputStream to an OutputStream.
copy(InputStream, Writer) - Static method in class spark.utils.IOUtils
Copy bytes from an InputStream to chars on a Writer using the default character encoding of the platform.
copy(Reader, Writer) - Static method in class spark.utils.IOUtils
Copy chars from a Reader to a Writer.
copyLarge(InputStream, OutputStream) - Static method in class spark.utils.IOUtils
Copies bytes from a large (over 2GB) InputStream to an OutputStream.
copyLarge(Reader, Writer) - Static method in class spark.utils.IOUtils
Copy chars from a large (over 2GB) Reader to a Writer.
create(Routes, StaticFilesConfiguration, boolean) - Method in interface spark.embeddedserver.EmbeddedServerFactory
Creates an embedded server instance.
create(Object, Routes, StaticFilesConfiguration, boolean) - Static method in class spark.embeddedserver.EmbeddedServers
Creates an embedded server of type corresponding to the provided identifier.
create(Routes, StaticFilesConfiguration, boolean) - Method in class spark.embeddedserver.jetty.EmbeddedJettyFactory
 
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(Map<String, WebSocketHandlerWrapper>, Optional<Integer>) - Static method in class spark.embeddedserver.jetty.websocket.WebSocketServletContextHandlerFactory
Creates a new websocket servlet context handler.
create(RouteMatch, HttpServletRequest) - Static method in class spark.RequestResponseFactory
 
create(HttpServletResponse) - Static method in class spark.RequestResponseFactory
 
create(String, Route, ResponseTransformer) - Static method in class spark.ResponseTransformerRouteImpl
 
create(String, String, Route, ResponseTransformer) - Static method in class spark.ResponseTransformerRouteImpl
 
create() - Static method in class spark.route.Routes
 
create(String, String, String, String) - Static method in class spark.ssl.SslStores
Creates a Stores instance.
create() - Static method in class spark.staticfiles.StaticFilesConfiguration
 
create(String, TemplateViewRoute, TemplateEngine) - Static method in class spark.TemplateViewRouteImpl
factory method
create(String, String, TemplateViewRoute, TemplateEngine) - Static method in class spark.TemplateViewRouteImpl
factory method
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
 
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.
creationTime() - Method in class spark.Session
 
customizeConnection(URLConnection) - Method in class spark.resource.AbstractFileResolvingResource
customizeConnection(HttpURLConnection) - Method in class spark.resource.AbstractFileResolvingResource

D

DEFAULT_ACCEPT_TYPE - Static variable in class spark.Service
 
defaultIdentifier() - Static method in class spark.embeddedserver.EmbeddedServers
 
delegate() - Method in class spark.FilterImpl
 
delegate() - Method in class spark.RouteImpl
 
delegate() - Method in interface spark.utils.Wrapper
 
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, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
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 in spark.staticfiles
 
DirectoryTraversalDetection(String) - Constructor for exception 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
 
EmbeddedJettyServer - Class in spark.embeddedserver.jetty
Spark server implementation
EmbeddedJettyServer(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
 
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 in spark.embeddedserver
 
enableRouteOverview() - Static method in class spark.route.RouteOverview
Enables a route overview (showing all the mapped routes) The overview is made available at "/debug/routeoverview/" Calling this method before any other route mapping bas been performed will initialize the Spark server
enableRouteOverview(String) - Static method in class spark.route.RouteOverview
Enables a route overview (showing all the mapped routes) The overview is made available at the provided path
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<? extends Exception>, ExceptionHandler) - Method in class spark.Service
Maps an exception handler to be executed when an exception occurs during routing
exception(Class<? extends Exception>, ExceptionHandler) - 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 Exception>) - Method in class spark.ExceptionHandlerImpl
Sets the type of exception that this filter will handle
ExceptionHandler - Interface in spark
Created by Per Wendel on 2014-05-10.
ExceptionHandlerImpl - Class in spark
 
ExceptionHandlerImpl(Class<? extends Exception>) - Constructor for class spark.ExceptionHandlerImpl
Initializes the filter with the provided exception type
ExceptionMapper - Class in spark
 
ExceptionMapper() - Constructor for class spark.ExceptionMapper
Class constructor
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.
Experimental - Annotation Type 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 method in class spark.staticfiles.StaticFilesFolder
 
externalConfiguredTo(String) - Static method in class spark.staticfiles.StaticFilesFolder
 
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
externalStaticFileFolder - Variable in class spark.Service
 
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.
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

FILE_URL_PREFIX - Static variable in class spark.utils.ResourceUtils
URL prefix for loading from the file system: "file:"
Filter - Interface in spark
Created by Per Wendel on 2014-05-10.
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
 
find(HttpMethod, String, String) - Method in class spark.route.Routes
finds target for a requested route
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, String) - Method in class spark.route.SimpleRouteMatcher
Deprecated. 
floatValue() - Method in class spark.QueryParamsMap
 
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.
fromPathInfo(String) - Static method in class spark.staticfiles.MimeType
 
fromResource(AbstractFileResolvingResource) - Static method in class spark.staticfiles.MimeType
 

G

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) - Static method in enum spark.route.HttpMethod
Gets the HttpMethod corresponding to the provided string.
get() - Static method in class spark.route.ServletRoutes
 
get(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
getAcceptType() - Method in class spark.FilterImpl
 
getAcceptType() - Method in class spark.RouteImpl
 
getAcceptType() - Method in class spark.routematch.RouteMatch
 
getApplication(FilterConfig) - Method in class spark.servlet.SparkFilter
Deprecated.
getApplication(String) - Method in class spark.servlet.SparkFilter
Returns an instance of SparkApplication which on which init() will be called.
getApplications(FilterConfig) - Method in class spark.servlet.SparkFilter
Returns the instances of SparkApplication which on which init() will be called.
getBody() - Method in exception spark.HaltException
Deprecated.
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.
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(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.
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.
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.
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
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.ExceptionMapper
Returns the default instance for the exception mapper
getMatchUri() - Method in class spark.routematch.RouteMatch
 
getMimeType(String) - Static method in class spark.staticfiles.MimeType
 
getModel() - Method in class spark.ModelAndView
 
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
getRequestURI() - Method in class spark.routematch.RouteMatch
 
getResource(HttpServletRequest) - Method in class spark.resource.AbstractResourceHandler
Gets a resource from a servlet request
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.JarResourceHandler
 
getStatusCode() - Method in exception spark.HaltException
Deprecated.
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.
getViewName() - Method in class spark.ModelAndView
 
GzipUtils - Class in spark.utils
GZIP utility class.

H

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
 
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(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(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(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() - 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) - 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(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(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
HaltException - Exception in spark
Exception used for stopping the execution
handle(Exception, Request, Response) - Method in interface spark.ExceptionHandler
Invoked when an exception that is mapped to this handler occurs during routing
handle(Exception, Request, Response) - Method in class spark.ExceptionHandlerImpl
Invoked when an exception that is mapped to this handler occurs during routing
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.
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(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.
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.
hasValue() - Method in class spark.QueryParamsMap
 
head(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
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.
headers(String) - Method in class spark.Request
Gets the value for the provided header
headers() - Method in class spark.Request
 
headers(Map<String, String>) - Method in class spark.Service.StaticFiles
Puts custom headers for static resources.
host() - Method in class spark.Request
 
HttpMethod - Enum in spark.route
 
HttpRequestWrapper - Class in spark.embeddedserver.jetty
Http request wrapper.
HttpRequestWrapper(HttpServletRequest) - Constructor for class spark.embeddedserver.jetty.HttpRequestWrapper
 

I

id() - Method in class spark.Session
 
ignite(String, int, SslStores, CountDownLatch, 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, CountDownLatch, 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.
ignite() - Static method in class spark.Service
Creates a new Service (a Spark instance).
init(FilterConfig) - Method in class spark.http.matching.MatcherFilter
 
init() - Method in class spark.Service
 
init() - Method in interface spark.servlet.SparkApplication
Invoked from the SparkFilter.
init(FilterConfig) - Method in class spark.servlet.SparkFilter
 
init() - Static method in class spark.Spark
Initializes the Spark server.
initialize() - Static method in class spark.embeddedserver.EmbeddedServers
 
initialized - Variable in class spark.Service
 
InputStreamResource - Interface in spark.resource
Simple interface for objects that are sources for an InputStream.
integerValue() - Method in class spark.QueryParamsMap
 
intValue() - Method in enum 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.
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
 
isDirectory() - Method in class spark.resource.ExternalResource
Tests whether the file denoted by this abstract pathname is a directory.
isEmpty(Collection<?>) - Static method in class spark.utils.CollectionUtils
Return true if the supplied Collection is null or empty.
isEmpty(Object[]) - Static method in class spark.utils.ObjectUtils
Determine whether the given array is empty: i.e.
isEmpty(Object) - Static method in class spark.utils.StringUtils
Check whether the given String is empty.
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".
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
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
 
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.
isRunningFromServlet() - Static method in class spark.globalstate.ServletFlag
 
isSplat(String) - Static method in class spark.utils.SparkUtils
 
isTrue(boolean, String) - Static method in class spark.utils.Assert
Assert a boolean expression, throwing IllegalArgumentException if the test result is false.
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.

J

JAR_URL_SEPARATOR - Static variable in class spark.utils.ResourceUtils
Separator between JAR URL and file path within the JAR
JarResourceHandler - Class in spark.resource
Locates resources in jar file
JarResourceHandler(String, String) - Constructor for class spark.resource.JarResourceHandler
Constructor
JettyHandler - Class in spark.embeddedserver.jetty
Simple Jetty Handler
JettyHandler(Filter) - Constructor for class spark.embeddedserver.jetty.JettyHandler
 

K

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
 
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 method in class spark.staticfiles.StaticFilesFolder
 
localConfiguredTo(String) - Static method in class spark.staticfiles.StaticFilesFolder
 
location(String) - Method in class spark.Service.StaticFiles
Sets the folder in classpath serving static files.
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.
MatcherFilter - Class in spark.http.matching
Matches Spark routes and filters.
MatcherFilter(Routes, StaticFilesConfiguration, boolean, boolean) - Constructor for class spark.http.matching.MatcherFilter
Constructor
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
 
MimeParse - Class in spark.utils
MIME-Type Parser
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
 
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
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.
modify(HttpServletResponse, Body, HaltException) - Static method in class spark.http.matching.Halt
Modifies the HTTP response and body based on the provided HaltException.

N

NO_MIME_TYPE - Static variable in class spark.utils.MimeParse
Constant for no mime type
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.
notNull(Object, String) - Static method in class spark.utils.Assert
Assert that an object is not null .
notNull(Object) - Static method in class spark.utils.Assert
Assert that an object is not null .
NotSupportedException - Exception in spark.embeddedserver
Used to indicate that a feature is not supported for the specific embedded server.

O

ObjectUtils - Class in spark.utils
Miscellaneous object utility methods.
ObjectUtils() - Constructor for class spark.utils.ObjectUtils
 
options(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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

P

params() - Method in class spark.Request
Returns the map containing all route params
params(String) - Method in class spark.Request
Returns the value of the provided route pattern parameter.
parseKey(String) - Method in class spark.QueryParamsMap
 
parseValidateAddRoute(String, String, Object) - Method in class spark.route.SimpleRouteMatcher
Deprecated. 
patch(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
pathInfo() - Method in class spark.Request
 
port() - Method in class spark.Request
 
port - Variable in class spark.Service
 
port(int) - Method in class spark.Service
Set the port that Spark should listen on.
port() - Method in class spark.Service
Retrieves the port that Spark is listening on.
port(int) - Static method in class spark.Spark
Set the port that Spark should listen on.
port() - Static method in class spark.Spark
Retrieves the port that Spark is listening on.
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, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
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) - Static method in class spark.staticfiles.DirectoryTraversal
 
protectAgainstInClassPath(String) - Static method in class spark.staticfiles.DirectoryTraversal
 
protocol() - Method in class spark.Request
 
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, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
putCustomHeader(String, String) - Method in class spark.staticfiles.StaticFilesConfiguration
 
putCustomHeaders(Map<String, String>) - Method in class spark.staticfiles.StaticFilesConfiguration
 

Q

queryMap() - Method in class spark.Request
 
queryMap(String) - Method in class spark.Request
 
queryParams(String) - Method in class spark.Request
Gets the query param
queryParams() - Method in class spark.Request
 
QueryParamsMap - Class in spark
This objects represent the parameters sent on a Http Request.
QueryParamsMap(HttpServletRequest) - Constructor for class spark.QueryParamsMap
Creates a new QueryParamsMap from and HttpServletRequest.
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
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.Request
 

R

raise(String, String) - Static method in exception spark.embeddedserver.NotSupportedException
Raises a NotSupportedException for the provided class name and feature name.
raw() - Method in class spark.Request
 
raw() - Method in class spark.Response
 
raw() - Method in class spark.Session
 
Redirect - Class in spark
Provides redirect utility methods.
redirect(String) - Method in class spark.Response
Trigger a browser redirect
redirect(String, int) - Method in class spark.Response
Trigger a browser redirect with specific http 3XX status code.
redirect - Variable in class spark.Service
 
redirect - Static variable in class spark.Spark
Statically import this for redirect utility functionality, see Redirect
Redirect.Status - Enum in spark
The available redirect status codes.
register(String, String) - Static method in class spark.staticfiles.MimeType
 
registerMimeType(String, String) - Method in class spark.Service.StaticFiles
Maps an extension to a mime-type.
remove(String, String) - Method in class spark.route.Routes
Removes a particular route from the collection of those that have been previously routed.
remove(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.Response
Removes the cookie.
removeLeadingAndTrailingSlashesFrom(String) - Static method in class spark.utils.StringUtils
 
removeRoute(String, String) - Method in class spark.route.SimpleRouteMatcher
Deprecated. 
removeRoute(String) - Method in class spark.route.SimpleRouteMatcher
Deprecated. 
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(ModelAndView) - Method in class spark.TemplateEngine
Method called to render the output that is sent to client.
render(Object) - Method in class spark.TemplateViewRouteImpl
 
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.
Request - Class in spark
Provides information about the HTTP request
Request() - Constructor for class spark.Request
 
requestMethod() - Method in class spark.Request
 
RequestResponseFactory - Class in spark
 
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 - Class in spark
Provides functionality for modifying the response
Response() - 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
 
Route - Interface in spark
Created by Per Wendel on 2014-05-10.
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
 
RouteOverview - Class in spark.route
 
RouteOverview() - Constructor for class spark.route.RouteOverview
 
Routes - Class in spark.route
Holds the routes and performs matching from HTTP requests to routes.
Routes() - Constructor for class spark.route.Routes
Constructor
routes - Variable in class spark.Service
 
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.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.
Serializer - Class in spark.serialization
Class that serializers and writes the result to given output stream.
Serializer() - Constructor for class spark.serialization.Serializer
 
SerializerChain - Class in spark.serialization
Chain of serializers for the output.
SerializerChain() - Constructor for class spark.serialization.SerializerChain
Constructs a serializer chain.
server - Variable in class spark.Service
 
Service - Class in spark
Represents a Spark server "session".
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.staticfiles.StaticFilesConfiguration
 
servletPath() - Method in class spark.Request
 
ServletRoutes - Class in spark.route
Holds the servlet routes.
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.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.
setExpireTimeSeconds(long) - Method in class spark.staticfiles.StaticFilesConfiguration
 
setIpAddress(String) - Static method in class spark.Spark
Deprecated.
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)
setSecure(String, String, String, String) - Static method in class spark.Spark
shouldGuess() - Static method in class spark.staticfiles.MimeType
 
SimpleRouteMatcher - Class in spark.route
Deprecated.
see Routes
SimpleRouteMatcher() - Constructor for class spark.route.SimpleRouteMatcher
Deprecated.
 
SLASH - Static variable in class spark.resource.AbstractResourceHandler
 
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.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.ssl - package spark.ssl
 
spark.staticfiles - package spark.staticfiles
 
spark.utils - package spark.utils
 
SPARK_DEFAULT_PORT - Static variable in class spark.Service
 
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
splat() - Method in class spark.Request
 
sslStores - Variable in class spark.Service
 
SslStores - Class in spark.ssl
SSL Stores
state(boolean, String) - Static method in class spark.utils.Assert
Assert a boolean expression, throwing IllegalStateException if the test result is false.
staticFileFolder - Variable in class spark.Service
 
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.Service
 
StaticFiles() - Constructor for class spark.Service.StaticFiles
 
staticFiles - Static variable in class spark.Spark
Statically import this for static files utility functionality, see Service.StaticFiles
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
 
status(int) - Method in class spark.Response
Sets the status code for the
status() - Method in class spark.Response
Returns the status code
statusCode() - Method in exception 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
StringUtils - Class in spark.utils
Miscellaneous String utility methods.
StringUtils() - Constructor for class spark.utils.StringUtils
 

T

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
threadIdleTimeoutMillis - Variable in class spark.Service
 
threadPool(int) - Method in class spark.Service
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) - Static method in class spark.Spark
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.
toByteArray(InputStream) - Static method in class spark.utils.IOUtils
Get the contents of an InputStream as a ByteArray
toMap() - Method in class spark.QueryParamsMap
 
toString() - Method in class spark.resource.AbstractResource
This implementation returns the description of this resource.
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.
toString(byte[], String) - Static method in class spark.utils.StringUtils
 
toStringArray(Collection<String>) - Static method in class spark.utils.StringUtils
Copy the given Collection into a String array.
toURI(URL) - Static method in class spark.utils.ResourceUtils
Create a URI instance for the given URL, replacing spaces with "%20" URI encoding first.
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.
trace(String, Route) - Static method in class spark.Spark
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, TemplateViewRoute, TemplateEngine) - Static method in class spark.Spark
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, ResponseTransformer) - Static method in class spark.Spark
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
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(String) - Method in class spark.Response
Sets the content type for the response
type() - Method in class spark.Response
Returns the content type

U

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.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"
useCachesIfNecessary(URLConnection) - Static method in class spark.utils.ResourceUtils
Set the "useCaches" flag on the given connection, preferring false but leaving the flag at true for JNLP based resources.
userAgent() - Method in class spark.Request
 

V

validateHandlerClass(Class<?>) - Static method in interface spark.embeddedserver.jetty.websocket.WebSocketHandlerWrapper
 
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 spark.embeddedserver.EmbeddedServers.Identifiers
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum spark.Redirect.Status
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum spark.route.HttpMethod
Returns the enum constant of this type with the specified name.
values() - Static method in enum spark.embeddedserver.EmbeddedServers.Identifiers
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Method in class spark.QueryParamsMap
 
values() - Static method in enum spark.Redirect.Status
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum spark.route.HttpMethod
Returns an array containing the constants of this enum type, in the order they are declared.

W

webSocket(String, Class<?>) - Method in class spark.Service
Maps the given path to the given WebSocket handler class.
webSocket(String, Object) - Method in class spark.Service
Maps the given path to the given WebSocket handler instance.
webSocket(String, Class<?>) - Static method in class spark.Spark
Maps the given path to the given WebSocket handler.
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
 
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.Service
 
WebSocketHandlerWrapper - Interface in spark.embeddedserver.jetty.websocket
A wrapper for web socket handler classes/instances.
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
 
Wrapper - Interface in spark.utils
Created by Per Wendel on 2016-04-25.
A B C D E F G H I J K L M N O P Q R S T U V W 
Skip navigation links

Copyright © 2016. All rights reserved.