Package rife.engine
Class Site
java.lang.Object
rife.engine.Router
rife.engine.Site
The main site of your web application, which is also the
top-level router.
- Since:
- 1.0
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
A unique random number that's generated only once per web application deployment. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconfig()
Returns this site's config instance.Creates a new workflow instance with a default executor.createWorkflow
(ExecutorService executor) Creates a new workflow instance with a provided executor.void
destroy()
Thedestroy()
method will be called by RIFE2 when the web application tears down.void
loadConfig
(File file) Parses the provided file as an XMLConfig
file and sets it as this site's config instance.void
loadConfig
(String name) Looks for a named resource in the classpath, parses it as an XMLConfig
file and sets it as this site's config instance.Methods inherited from class rife.engine.Router
after, after, after, before, before, before, delete, delete, delete, delete, delete, delete, delete, delete, delete, delete, exception, exception, exception, fallback, fallback, fallback, get, get, get, get, get, get, get, get, get, get, getPost, getPost, getPost, getPost, getPost, getPost, getPost, getPost, getPost, getPost, group, group, patch, patch, patch, patch, patch, patch, patch, patch, patch, patch, post, post, post, post, post, post, post, post, post, post, properties, put, put, put, put, put, put, put, put, put, put, route, route, route, route, route, route, route, route, route, route, setup, site
-
Field Details
-
RND
public final int RNDA unique random number that's generated only once per web application deployment.- Since:
- 1.0
-
-
Constructor Details
-
Site
public Site()
-
-
Method Details
-
destroy
public void destroy()Thedestroy()
method will be called by RIFE2 when the web application tears down.RIFE2 tracks active
Datasource
andScheduler
instances, automatically closing and stopping them when the web application is being shut down.This method can be implemented to close any other application resources that require it.
- Since:
- 1.6.1
-
createWorkflow
Creates a new workflow instance with a default executor.Note that the site doesn't keep a reference to it, so make sure it's not garbage collected unexpectedly.
- Returns:
- the new workflow instance
- Since:
- 1.0
-
createWorkflow
Creates a new workflow instance with a provided executor.Note that the site doesn't keep a reference to it, so make sure it's not garbage collected unexpectedly.
- Parameters:
executor
- the executor to use for running the work- Returns:
- the new workflow instance
- Since:
- 1.0
-
config
Returns this site's config instance.- Returns:
- this site's config instance.
- Since:
- 1.6.0
-
loadConfig
Looks for a named resource in the classpath, parses it as an XMLConfig
file and sets it as this site's config instance.- Parameters:
name
- the name of the resource to parse- Throws:
EngineException
- when an error occurred during the parsing, or if the resource couldn't be found- Since:
- 1.6.0
-
loadConfig
Parses the provided file as an XMLConfig
file and sets it as this site's config instance.- Parameters:
file
- the file to parse- Throws:
EngineException
- when an error occurred during the parsing, or if the resource couldn't be found- Since:
- 1.6.0
-