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

A

AbstractRoute - Class in spark
Functionality used in both Route and Filter
AbstractRoute() - Constructor for class spark.AbstractRoute
 
Access - Class in spark
 
after(Filter) - Static method in class spark.Spark
Maps a filter to be executed after any matching routes
ALL_PATHS - Static variable in class spark.utils.SparkUtils
 
APPLICATION_CLASS_PARAM - Static variable in class spark.servlet.SparkFilter
 
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
Returns all attributes
attributes() - Method in class spark.Session
Returns an Enumeration of String objects containing the names of all the objects bound to this session.

B

before(Filter) - Static method in class spark.Spark
Maps a filter to be executed before any matching routes
bestMatch(Collection<String>, String) - Static method in class spark.utils.MimeParse
Takes a list of supported mime-types and finds the best match for all the media-ranges listed in header.
body() - Method in class spark.Request
Returns the request body sent by the client
body(String) - Method in class spark.Response
Sets the body
body() - Method in class spark.Response
 
booleanValue() - Method in class spark.QueryParamsMap
 

C

cleanKey(String) - Static method in class spark.QueryParamsMap
 
clearRoutes() - Method in interface spark.route.RouteMatcher
Clear all routes
clearRoutes() - Method in class spark.route.SimpleRouteMatcher
 
compareTo(MimeParse.FitnessAndQuality) - Method in class spark.utils.MimeParse.FitnessAndQuality
 
connect(Route) - Static method in class spark.Spark
Map the route for HTTP CONNECT requests
contentLength() - Method in class spark.Request
Returns the length of request.body
contentType() - Method in class spark.Request
Returns the content type of the body
contextPath() - Method in class spark.Request
Returns the context path
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, String, int, boolean) - Method in class spark.Response
Adds cookie to the response.
cookies() - Method in class spark.Request
 
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(Reader, Writer) - Static method in class spark.utils.IOUtils
Copy chars from a large (over 2GB) Reader to a Writer.
create(RouteMatch, HttpServletRequest) - Static method in class spark.RequestResponseFactory
 
create(HttpServletResponse) - Static method in class spark.RequestResponseFactory
 
create(boolean) - Static method in class spark.webserver.SparkServerFactory
 
creationTime() - Method in class spark.Session
Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.

D

debug(String, Throwable) - Method in class spark.JettyLogger
 
debug(Throwable) - Method in class spark.JettyLogger
 
debug(String, Object...) - Method in class spark.JettyLogger
 
delete(Route) - Static method in class spark.Spark
Map the route for HTTP DELETE requests
destroy() - Method in class spark.servlet.SparkFilter
 
destroy() - Method in class spark.webserver.MatcherFilter
 
DIR_SEPARATOR - Static variable in class spark.utils.IOUtils
The system directory separator character.
DIR_SEPARATOR_UNIX - Static variable in class spark.utils.IOUtils
The Unix directory separator character.
DIR_SEPARATOR_WINDOWS - Static variable in class spark.utils.IOUtils
The Windows directory separator character.
doFilter(ServletRequest, ServletResponse, FilterChain) - Method in class spark.servlet.SparkFilter
 
doFilter(ServletRequest, ServletResponse, FilterChain) - Method in class spark.webserver.MatcherFilter
 
doubleValue() - Method in class spark.QueryParamsMap
 

E

externalStaticFileLocation(String) - Static method in class spark.Spark
Sets the external folder serving static files.

F

Filter - Class in spark
A Filter is built up by a path (for url-matching) and the implementation of the 'handle' method.
Filter() - Constructor for class spark.Filter
Constructs a filter that matches on everything
Filter(String) - Constructor for class spark.Filter
Constructor
Filter(String, String) - Constructor for class spark.Filter
 
findTargetForRequestedRoute(HttpMethod, String, String) - Method in interface spark.route.RouteMatcher
Finds the a target route for the requested route path and accept type
findTargetForRequestedRoute(HttpMethod, String, String) - Method in class spark.route.SimpleRouteMatcher
 
findTargetsForRequestedRoute(HttpMethod, String, String) - Method in interface spark.route.RouteMatcher
 
findTargetsForRequestedRoute(HttpMethod, String, String) - Method in class spark.route.SimpleRouteMatcher
 
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
 

G

get(String...) - Method in class spark.QueryParamsMap
Retruns and element fro the specified key.
get() - Static method in class spark.route.RouteMatcherFactory
 
get(Route) - Static method in class spark.Spark
Map the route for HTTP GET requests
getAcceptType() - Method in class spark.Filter
 
getAcceptType() - Method in class spark.Route
 
getAcceptType() - Method in class spark.route.RouteMatch
 
getApplication(FilterConfig) - Method in class spark.servlet.SparkFilter
Returns an instance of SparkApplication which on which init() will be called.
getBody(Response) - Static method in class spark.Access
 
getBody() - Method in exception spark.HaltException
 
getHttpMethod() - Method in class spark.route.RouteMatch
 
getLogger(String) - Method in class spark.JettyLogger
 
getMatchUri() - Method in class spark.route.RouteMatch
 
getModel() - Method in class spark.ModelAndView
 
getName() - Method in class spark.JettyLogger
 
getRequestURI() - Method in class spark.route.RouteMatch
 
getStatusCode() - Method in exception spark.HaltException
 
getTarget() - Method in class spark.route.RouteMatch
 
getViewName() - Method in class spark.ModelAndView
 

H

halt() - Static method in class spark.AbstractRoute
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.AbstractRoute
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.AbstractRoute
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.AbstractRoute
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(Request, Response) - Method in class spark.Filter
Invoked when a request is made on this filter's corresponding path e.g.
handle(Request, Response) - Method in class spark.Route
Invoked when a request is made on this route's corresponding path e.g.
hasKeys() - Method in class spark.QueryParamsMap
 
hasValue() - Method in class spark.QueryParamsMap
 
head(Route) - 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
headers(String) - Method in class spark.Request
Returns the value of the provided header
headers() - Method in class spark.Request
Returns all headers
host() - Method in class spark.Request
Returns the host
HttpMethod - Enum in spark.route
 

I

id() - Method in class spark.Session
Returns a string containing the unique identifier assigned to this session.
ignite(String, int, String, String, String, String, String, String) - Method in interface spark.webserver.SparkServer
Ignites the spark server, listening on the specified port, running SSL secured with the specified keystore and truststore.
ignore(Throwable) - Method in class spark.JettyLogger
 
info(Throwable) - Method in class spark.JettyLogger
 
info(String, Object...) - Method in class spark.JettyLogger
 
info(String, Throwable) - Method in class spark.JettyLogger
 
init() - Method in interface spark.servlet.SparkApplication
Invoked from the SparkFilter.
init(FilterConfig) - Method in class spark.servlet.SparkFilter
 
init(FilterConfig) - Method in class spark.webserver.MatcherFilter
 
integerValue() - Method in class spark.QueryParamsMap
 
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
Returns the client's IP address
isDebugEnabled() - Method in class spark.JettyLogger
 
isNew() - Method in class spark.Session
Returns true if the client does not yet know about the session or if the client chooses not to join the session.
isParam(String) - Static method in class spark.utils.SparkUtils
 
isSplat(String) - Static method in class spark.utils.SparkUtils
 

J

JettyLogger - Class in spark
Jetty Logger
JettyLogger() - Constructor for class spark.JettyLogger
 

L

lastAccessedTime() - Method in class spark.Session
Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT, and marked by the time the container received the request.
LINE_SEPARATOR - Static variable in class spark.utils.IOUtils
The system line separator string.
LINE_SEPARATOR_UNIX - Static variable in class spark.utils.IOUtils
The Unix line separator string.
LINE_SEPARATOR_WINDOWS - Static variable in class spark.utils.IOUtils
The Windows line separator string.
loadKeys(String, String[]) - Method in class spark.QueryParamsMap
 
loadQueryString(Map<String, String[]>) - Method in class spark.QueryParamsMap
 
longValue() - Method in class spark.QueryParamsMap
 

M

MatcherFilter - Class in spark.webserver
Filter for matching of filters and routes.
MatcherFilter(RouteMatcher, boolean, boolean) - Constructor for class spark.webserver.MatcherFilter
Constructor
maxInactiveInterval() - Method in class spark.Session
Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.
maxInactiveInterval(int) - Method in class spark.Session
Specifies the time, in seconds, between client requests the web container will invalidate this session.
MimeParse - Class in spark.utils
MIME-Type Parser This class provides basic functions for handling mime-types.
MimeParse.FitnessAndQuality - Class in spark.utils
Structure for holding a fitness/quality combo
MimeParse.FitnessAndQuality(int, float) - Constructor for class spark.utils.MimeParse.FitnessAndQuality
 
MimeParse.ParseResults - Class in spark.utils
Parse results container
MimeParse.ParseResults() - Constructor for class spark.utils.MimeParse.ParseResults
 
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) - Method in class spark.TemplateViewRoute
Creates a new ModelAndView object with given arguments.

N

NO_MIME_TYPE - Static variable in class spark.utils.MimeParse
 
NotConsumedException - Exception in spark.webserver
Exception used for stopping the execution
NotConsumedException() - Constructor for exception spark.webserver.NotConsumedException
 

O

options(Route) - Static method in class spark.Spark
Map the route for HTTP OPTIONS requests

P

params(String) - Method in class spark.Request
Returns the value of the provided route pattern parameter.
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'})
parseValidateAddRoute(String, String, Object) - Method in interface spark.route.RouteMatcher
Parses, validates and adds a route
parseValidateAddRoute(String, String, Object) - Method in class spark.route.SimpleRouteMatcher
 
patch(Route) - Static method in class spark.Spark
Map the route for HTTP PATCH requests
pathInfo() - Method in class spark.Request
Returns the path info Example return: "/example/foo"
port() - Method in class spark.Request
Returns the server port
post(Route) - Static method in class spark.Spark
Map the route for HTTP POST requests
put(Route) - Static method in class spark.Spark
Map the route for HTTP PUT requests

Q

quality(String, String) - Static method in class spark.utils.MimeParse
Returns the quality 'q' of a mime-type when compared against the mediaRanges in ranges.
qualityParsed(String, Collection<MimeParse.ParseResults>) - Static method in class spark.utils.MimeParse
Find the best match for a given mime-type against a list of ranges that have already been parsed by parseMediaRange().
queryMap() - Method in class spark.Request
 
queryMap(String) - Method in class spark.Request
 
queryParams(String) - Method in class spark.Request
Returns the value of the provided queryParam Example: query parameter 'id' from the following request URI: /hello?id=foo
queryParams() - Method in class spark.Request
Returns all query parameters
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
 
queryString() - Method in class spark.Request
Returns the query string

R

raw() - Method in class spark.Request
Gets the raw HttpServletRequest object handed in by Jetty
raw() - Method in class spark.Response
Gets the raw response object handed in by Jetty
raw() - Method in class spark.Session
Returns the raw HttpSession object handed in by the servlet container.
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.
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.
render(Object) - Method in class spark.ResponseTransformerRoute
Method called for rendering the output.
render(Object) - Method in class spark.Route
This method should render the given element into something that can be send through Response element.
render(Object) - Method in class spark.TemplateViewRoute
 
render(ModelAndView) - Method in class spark.TemplateViewRoute
Method called to render the output that is sent to client.
Request - Class in spark
Provides information about the HTTP request
Request() - Constructor for class spark.Request
 
requestMethod() - Method in class spark.Request
Returns request method e.g.
RequestResponseFactory - Class in spark
 
Response - Class in spark
Provides functionality for modifying the response
Response() - Constructor for class spark.Response
 
ResponseTransformerRoute - Class in spark
A ResponseTransformerRoute is built up by a path (for url-matching) and the implementation of the 'render' method.
ResponseTransformerRoute(String) - Constructor for class spark.ResponseTransformerRoute
 
ResponseTransformerRoute(String, String) - Constructor for class spark.ResponseTransformerRoute
 
ROOT - Static variable in interface spark.route.RouteMatcher
 
Route - Class in spark
A Route is built up by a path (for url-matching) and the implementation of the 'handle' method.
Route(String) - Constructor for class spark.Route
Constructor
Route(String, String) - Constructor for class spark.Route
Constructor
RouteMatch - Class in spark.route
 
RouteMatch(HttpMethod, Object, String, String, String) - Constructor for class spark.route.RouteMatch
 
RouteMatcher - Interface in spark.route
Route matcher
RouteMatcherFactory - Class in spark.route
RouteMatcherFactory
runFromServlet() - Static method in class spark.Access
 

S

scheme() - Method in class spark.Request
Returns the scheme
servletPath() - Method in class spark.Request
Returns the servlet path
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.
setDebugEnabled(boolean) - Method in class spark.JettyLogger
 
setIpAddress(String) - Static method in class spark.Spark
Set the IP address that Spark should listen on.
setPort(int) - Static method in class spark.Spark
Set the port that Spark should listen on.
setSecure(String, String, String, String) - Static method in class spark.Spark
Set the connection to be secure, using the specified keystore and truststore.
SimpleRouteMatcher - Class in spark.route
Simple route matcher that is supposed to work exactly as Sinatra's
SimpleRouteMatcher() - Constructor for class spark.route.SimpleRouteMatcher
 
SINGLE_QUOTE - Static variable in interface spark.route.RouteMatcher
 
spark - package spark
 
Spark - Class in spark
The main building block of a Spark application is a set of routes.
spark.route - package spark.route
 
spark.servlet - package spark.servlet
 
spark.utils - package spark.utils
 
spark.webserver - package spark.webserver
 
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
 
SparkServer - Interface in spark.webserver
 
SparkServerFactory - Class in spark.webserver
 
SparkUtils - Class in spark.utils
Some utility methods
splat() - Method in class spark.Request
Returns an arrat containing the splat (wildcard) parameters
staticFileLocation(String) - Static method in class spark.Spark
Sets the folder in classpath serving static files.
status(int) - Method in class spark.Response
Sets the status code for the response
stop() - Method in interface spark.webserver.SparkServer
Stops the spark server

T

TemplateViewRoute - Class in spark
A TemplateViewRoute is built up by a path (for url-matching) and the implementation of the 'render' method.
TemplateViewRoute(String) - Constructor for class spark.TemplateViewRoute
 
TemplateViewRoute(String, String) - Constructor for class spark.TemplateViewRoute
 
toMap() - Method in class spark.QueryParamsMap
 
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() - Method in class spark.utils.MimeParse.ParseResults
 
trace(Route) - Static method in class spark.Spark
Map the route for HTTP TRACE requests
type(String) - Method in class spark.Response
Sets the content type for the response

U

url() - Method in class spark.Request
Returns the URL string
userAgent() - Method in class spark.Request
Returns the user-agent

V

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.route.HttpMethod
Returns the enum constant of this type with the specified name.
values() - Method in class spark.QueryParamsMap
 
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

warn(String, Throwable) - Method in class spark.JettyLogger
 
warn(Throwable) - Method in class spark.JettyLogger
 
warn(String, Object...) - Method in class spark.JettyLogger
 
A B C D E F G H I J L M N O P Q R S T U V W 

Copyright © 2013. All Rights Reserved.