Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addPrefixPath(String) - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Prepends a path to the current path
- appendMiddlewareMetaData(MiddlewareMetaData) - Method in class com.spec.web.expresso.router.PathRouter
-
Appends a already constructed middleware metadata object to the list.
- appendPath(String) - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Sets a path for the current middleware
B
- body() - Method in class com.spec.web.expresso.message.HttpRequest
-
Returns the Http body of the HttpRequest as String.
- body() - Method in interface com.spec.web.expresso.message.Request
-
Returns the body(payload) of the Http request
C
- calcPath() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Sets the path that has been calculated by the string builder
- close() - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Hides the close method.
- com.spec.web.expresso - package com.spec.web.expresso
- com.spec.web.expresso.constants - package com.spec.web.expresso.constants
- com.spec.web.expresso.exceptions - package com.spec.web.expresso.exceptions
- com.spec.web.expresso.message - package com.spec.web.expresso.message
- com.spec.web.expresso.middleware - package com.spec.web.expresso.middleware
- com.spec.web.expresso.middleware.standard - package com.spec.web.expresso.middleware.standard
- com.spec.web.expresso.router - package com.spec.web.expresso.router
- com.spec.web.expresso.servlet - package com.spec.web.expresso.servlet
- com.spec.web.expresso.util - package com.spec.web.expresso.util
- copy() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Creates a copy of the current MiddewareMetaData instance
D
- delete(Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP DELETE methods.
- delete(Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP DELETE methods.
- delete(String, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP DELETE methods.
- delete(String, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP DELETE methods.
- doDelete(HttpServletRequest, HttpServletResponse) - Method in class com.spec.web.expresso.servlet.RequestHandlingServlet
- doGet(HttpServletRequest, HttpServletResponse) - Method in class com.spec.web.expresso.servlet.RequestHandlingServlet
- doPost(HttpServletRequest, HttpServletResponse) - Method in class com.spec.web.expresso.servlet.RequestHandlingServlet
- doPut(HttpServletRequest, HttpServletResponse) - Method in class com.spec.web.expresso.servlet.RequestHandlingServlet
E
- equals(Object) - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
- execute(HttpRequest, HttpResponse, MiddlewareContext) - Method in interface com.spec.web.expresso.middleware.Middleware
-
The following method is implemented by user.
- execute(HttpRequest, HttpResponse, String, String) - Method in class com.spec.web.expresso.middleware.MiddlewareExecutor
-
The following method will execute request and response on the defined middleware list.
- executeNextMiddleware() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Sets the shouldExecuteNextMiddleware flag to true.
- Expresso - Class in com.spec.web.expresso
-
User will instantiate the following class to interact with the framework.
- ExpressoOutputStream - Class in com.spec.web.expresso.util
-
Wraps java output streams hiding close and flush method.
- ExpressoOutputStream(OutputStream) - Constructor for class com.spec.web.expresso.util.ExpressoOutputStream
-
Constructor wraps java OutputStream.
- ExpressoRuntimeException - Exception Class in com.spec.web.expresso.exceptions
-
Custom exception to handle runtime exceptions in Expresso.
- ExpressoRuntimeException(String) - Constructor for exception class com.spec.web.expresso.exceptions.ExpressoRuntimeException
-
Constructs a Exception with the message as String.
- ExpressoRuntimeException(Throwable) - Constructor for exception class com.spec.web.expresso.exceptions.ExpressoRuntimeException
-
Constructs a Exception with the message from a throwable.
F
- flush() - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Hides the flush method.
G
- get(Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on empty path which will only execute for HTTP get methods.
- get(Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on empty path which will only execute for HTTP get methods.
- get(String, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP get methods.
- get(String, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP get methods.
- getCookies() - Method in class com.spec.web.expresso.message.HttpRequest
-
Returns list of cookies sent by the client
- getCookies() - Method in interface com.spec.web.expresso.message.Request
-
Returns list of cookies sent by the client
- getExpressoObj() - Static method in class com.spec.web.expresso.Expresso
-
Returns the instance of Expresso Class.
- getHeader(String) - Method in class com.spec.web.expresso.message.HttpRequest
-
Returns the value of header for the specified header name.
- getHeader(String) - Method in interface com.spec.web.expresso.message.Request
-
Returns the value of header for the specified header name.
- getHttpServletRequest() - Method in class com.spec.web.expresso.message.HttpRequest
-
Return http servlet request which is used internally by Expresso.
- getHttpServletResponse() - Method in class com.spec.web.expresso.message.HttpResponse
-
Returns the httpservletresponse used internally by Expresso.
- getMethod() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Returns the method on which the middleware is registerd on.
- getMiddleware() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Returns the middleware which is registerd on it.
- getMiddleware() - Method in class com.spec.web.expresso.middleware.standard.StaticFileServer
-
Returns the middleware registered on the following StaticFileServer.
- getMiddleware() - Method in class com.spec.web.expresso.middleware.standard.StaticResourceServer
-
Returns the middleware registered on the following StaticResourceServer.
- getMiddlewareMetadataAsList() - Method in interface com.spec.web.expresso.router.IPathRouter
-
Returns the list of all middlewareMetadatas registerd on the current router
- getMiddlewareMetadataAsList() - Method in class com.spec.web.expresso.router.PathRouter
-
Returns the list of all middlewareMetadatas registerd on the current router
- getMimeType(String) - Method in class com.spec.web.expresso.message.HttpRequest
-
Returns the mime type of file name passed to it.
- getMimeType(String) - Method in interface com.spec.web.expresso.message.Request
-
Returns the mime type of file passed to it.
- getOutputStream() - Method in class com.spec.web.expresso.message.HttpResponse
-
Returns the output stream from response servlet.
- getOutputStream() - Method in interface com.spec.web.expresso.message.Response
-
Returns the output stream from response servlet.
- getPath() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Returns the path on which the middleware metadata is registered on.
- getRawHttpServletResponse() - Method in class com.spec.web.expresso.message.HttpResponse
-
resturns the raw http servlet response
- getReader() - Method in class com.spec.web.expresso.message.HttpRequest
-
Returns a reader object to read request body.
- getReader() - Method in interface com.spec.web.expresso.message.Request
-
Returns a reader object to read request body.
- getRequestPath() - Method in class com.spec.web.expresso.message.HttpRequest
-
Retrives the path of the current request url.
- getRequestPath() - Method in interface com.spec.web.expresso.message.Request
-
Retrives the path of the current request url.
- getRouteParameters(String, String) - Static method in class com.spec.web.expresso.util.URLParser
-
Returns path varaiable registerd on a url.
- getRouteParams(String) - Method in class com.spec.web.expresso.message.HttpRequest
-
Get the route parameter value against the given name
- getRouteParams(String) - Method in interface com.spec.web.expresso.message.Request
-
Get the route parameter value against the given name.
- getState(String) - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Fetches the state value for a key.
- getUrlParams(String) - Method in class com.spec.web.expresso.message.HttpRequest
-
Return the query parameter value against the name
- getUrlParams(String) - Method in interface com.spec.web.expresso.message.Request
-
Return the query/search parameter value against the name
H
- hashCode() - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
- HttpRequest - Class in com.spec.web.expresso.message
-
Wrapper class over HttpServletRequest.
- HttpRequest(HttpServletRequest) - Constructor for class com.spec.web.expresso.message.HttpRequest
-
Constructs an instance of HttpRequest wrapping an HttpServletRequest.
- HttpResponse - Class in com.spec.web.expresso.message
-
Wrapper class over HttpServletResponse.
- HttpResponse(HttpServletResponse) - Constructor for class com.spec.web.expresso.message.HttpResponse
-
Constructs an instance of this class
I
- init() - Static method in class com.spec.web.expresso.Expresso
-
Instantiates the expresso framework.
- IPathRouter - Interface in com.spec.web.expresso.router
-
Defines guidelines on what methods are required on a router
- isFlowAllowed() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Checks if next middleware shouold be executed.
L
- listenOnPort(int) - Method in class com.spec.web.expresso.Expresso
-
Starts the server over a network port.
M
- markMiddlewareExecuted() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Marks the middleware executed.
- markMiddlewareNotExecuted() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Marks the middleware not executed.
- METHOD_DELETE - Static variable in class com.spec.web.expresso.constants.Methods
-
Http DELETE
- METHOD_GET - Static variable in class com.spec.web.expresso.constants.Methods
-
Http Get
- METHOD_POST - Static variable in class com.spec.web.expresso.constants.Methods
-
Http Post
- METHOD_PUT - Static variable in class com.spec.web.expresso.constants.Methods
-
Http PUT
- METHOD_USE - Static variable in class com.spec.web.expresso.constants.Methods
-
Custom method : The callback defined on it will be called regardless of what HTTP method is defined on it
- Methods - Class in com.spec.web.expresso.constants
-
Descibes the method a callback will use.
- Middleware - Interface in com.spec.web.expresso.middleware
-
The following functional interface will act as a middleware.
- MiddlewareContext - Class in com.spec.web.expresso.middleware
-
The class instance curretly has the following responsibilites. 1.
- MiddlewareContext() - Constructor for class com.spec.web.expresso.middleware.MiddlewareContext
-
Instanstiate the class.
- MiddlewareExecutor - Class in com.spec.web.expresso.middleware
-
The following class will be used to call the next callback on the callback chain.
- MiddlewareExecutor() - Constructor for class com.spec.web.expresso.middleware.MiddlewareExecutor
-
Constructs a instance of the class
- MiddlewareExecutor(MiddlewareMetaData) - Constructor for class com.spec.web.expresso.middleware.MiddlewareExecutor
-
Creates an instance with a single middleware.
- MiddlewareExecutor(List<MiddlewareMetaData>) - Constructor for class com.spec.web.expresso.middleware.MiddlewareExecutor
-
Creates and instance with a list of middlewares
- MiddlewareMetaData - Class in com.spec.web.expresso.middleware
-
Represents the metadata for a middleware.
- MiddlewareMetaData(Middleware, String) - Constructor for class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Instantaiats the class
- MiddlewareMetaData(Middleware, String, String) - Constructor for class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Instantaiats the class
- middlewares - Variable in class com.spec.web.expresso.router.PathRouter
-
List of middleware metadata registered on this router
P
- PathRouter - Class in com.spec.web.expresso.router
-
Following class exectues middlewares based on http url path and http methods.
- PathRouter() - Constructor for class com.spec.web.expresso.router.PathRouter
-
Constructs the class.
- post(Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on empty path which will only execute for HTTP POST methods.
- post(Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on empty path which will only execute for HTTP POST methods.
- post(String, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP POST methods.
- post(String, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP POST methods.
- put(Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP PUT methods.
- put(Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP PUT methods.
- put(String, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path which will only execute for HTTP PUT methods.
- put(String, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path which will only execute for HTTP PUT methods.
- putState(String, String) - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Sets the state value for a key.
R
- registerRouterOnPath(String) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Creates a clone of current router and registers it on a path.
- registerRouterOnPath(String) - Method in class com.spec.web.expresso.router.PathRouter
-
Creates a clone of current router and registers it on a path.
- Request - Interface in com.spec.web.expresso.message
-
Represent a Http request
- RequestHandlingServlet - Class in com.spec.web.expresso.servlet
-
Servlet to handle HTTP request and route them to appropriate callback function.
- RequestHandlingServlet() - Constructor for class com.spec.web.expresso.servlet.RequestHandlingServlet
-
Default constructor.
- reset() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Sets shouldExecuteNextMiddleware to false.
- resetResponse() - Method in class com.spec.web.expresso.message.HttpResponse
-
Resets the response object
- resetResponse() - Method in interface com.spec.web.expresso.message.Response
-
Resets the response
- resetResponseBody() - Method in class com.spec.web.expresso.message.HttpResponse
-
Resets the body of the response
- resetResponseBody() - Method in interface com.spec.web.expresso.message.Response
-
Resets the body of the response
- Response - Interface in com.spec.web.expresso.message
-
Modifies the response that will be send to the client.
S
- setContentTypeHeader(String) - Method in class com.spec.web.expresso.message.HttpResponse
-
Sets the content type header
- setContentTypeHeader(String) - Method in interface com.spec.web.expresso.message.Response
-
Sets the content type header
- setContextPath(String) - Method in class com.spec.web.expresso.Expresso
-
Set's the context path.
- setCookies(Cookie, Cookie...) - Method in class com.spec.web.expresso.message.HttpResponse
-
Sets a cookie that will be sent to the client.
- setCookies(Cookie, Cookie...) - Method in interface com.spec.web.expresso.message.Response
-
Sets a cookie that will be sent to the client.
- setCurrentUrlPattern(String) - Method in class com.spec.web.expresso.message.HttpRequest
-
Sets the current url pattern
- setHost(String) - Method in class com.spec.web.expresso.Expresso
-
Sets the host ip of the network adapter on which the server should listen on.
- setHtml(String) - Method in class com.spec.web.expresso.message.HttpResponse
-
Sends html Note: Resets any data present in response object
- setHtml(String) - Method in interface com.spec.web.expresso.message.Response
-
Sends html response
- setMethod(String) - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Sets the method on which the middleware should execute
- setPath(String) - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
-
Sets the path
- setPath(String) - Method in class com.spec.web.expresso.middleware.standard.StaticFileServer
-
The middleware needs to know on what path(URL path on web) it is registered.
- setPath(String) - Method in class com.spec.web.expresso.middleware.standard.StaticResourceServer
-
The middleware needs to know on what path(URL path on web) it is registered.
- setResponseHeader(String, String) - Method in class com.spec.web.expresso.message.HttpResponse
-
Sets the Http response headers
- setResponseHeader(String, String) - Method in interface com.spec.web.expresso.message.Response
-
Sets the response headers.
- setStatusCode(Integer) - Method in class com.spec.web.expresso.message.HttpResponse
-
Set the Http status code of the response
- setStatusCode(Integer) - Method in interface com.spec.web.expresso.message.Response
-
Sets the status code of the response.
- startServer() - Method in class com.spec.web.expresso.Expresso
-
Starts the server
- StaticFileServer - Class in com.spec.web.expresso.middleware.standard
-
Hosts static folder that is externl to the packaged JAR.
- StaticFileServer(String) - Constructor for class com.spec.web.expresso.middleware.standard.StaticFileServer
-
Create an instance of class with a staticFolderPath where this the path to folder containing the static files.
- StaticResourceServer - Class in com.spec.web.expresso.middleware.standard
-
Hosts the static files contained in /resrouces folder.
- StaticResourceServer(String) - Constructor for class com.spec.web.expresso.middleware.standard.StaticResourceServer
-
Create an instance of class with a staticResourcePath
- stopServer() - Method in class com.spec.web.expresso.Expresso
-
Stops the server.
T
- toString() - Method in class com.spec.web.expresso.middleware.MiddlewareMetaData
- toString() - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
U
- URLParser - Class in com.spec.web.expresso.util
-
Contnains utility methods related to url parsing.
- use(Middleware) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers a middleware.
- use(Middleware) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers a middleware.
- use(MiddlewareMetaData, MiddlewareMetaData...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Method will register a middlewareMetadata on a specific path.
- use(MiddlewareMetaData, MiddlewareMetaData...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers a middleware metadata while also setting its path on it.
- use(Middleware, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares.
- use(Middleware, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares.
- use(Middleware, IPathRouter, IPathRouter...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers one middleware which will execute before the routers being registerd.
- use(Middleware, IPathRouter, IPathRouter...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers one middleware which will execute before the routers being registerd.
- use(IPathRouter, IPathRouter...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers routers.
- use(IPathRouter, IPathRouter...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers routers.
- use(String, Middleware) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers a middleware on a path.
- use(String, Middleware) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers a middleware on a path.
- use(String, MiddlewareMetaData, MiddlewareMetaData...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Method will register a middlewareMetadata on a specific path.
- use(String, MiddlewareMetaData, MiddlewareMetaData...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers a middleware metadata while also setting its path on it.
- use(String, Middleware, Middleware, Middleware...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers middlewares on a path.
- use(String, Middleware, Middleware, Middleware...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers middlewares on a path.
- use(String, Middleware, IPathRouter, IPathRouter...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers one middleware which will execute before the routers being registerd.
- use(String, Middleware, IPathRouter, IPathRouter...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers one middleware which will execute before the routers being registerd.
- use(String, IPathRouter, IPathRouter...) - Method in interface com.spec.web.expresso.router.IPathRouter
-
Registers routers on a path.
- use(String, IPathRouter, IPathRouter...) - Method in class com.spec.web.expresso.router.PathRouter
-
Registers routers on a path.
W
- wasMiddlewareExecutedOnCurrentPath() - Method in class com.spec.web.expresso.middleware.MiddlewareContext
-
Checks if middleare was executed.
- write(byte[]) - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
- write(byte[], int, int) - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
- write(int) - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Wrapper over output stream works as same as Java output stream.
- writeResponse(String) - Method in class com.spec.web.expresso.message.HttpResponse
-
Set the http response body
- writeResponse(String) - Method in interface com.spec.web.expresso.message.Response
-
Sets the http response body
_
- _closeFlush() - Method in class com.spec.web.expresso.util.ExpressoOutputStream
-
Closes the output stream.
- _closeOutputStream() - Method in class com.spec.web.expresso.message.HttpResponse
-
Closes the output stream.
- _closeOutputStream() - Method in interface com.spec.web.expresso.message.Response
-
Closes the output stream.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form