|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.talika.tarsis.context.ContextImpl
public final class ContextImpl
Implementation of Context
interface.
Method Summary | |
---|---|
void |
destroy()
Called on shutdown of the Tarsis MVC Framework and put all components out of service. |
Authenticator |
getAuthenticator()
Returns default Authenticator for this context. |
Authorizator |
getAuthorizator()
Returns default Authorizator for this context. |
CommandFactory |
getCommandFactory()
Returns default CommandFactory for this context. |
Factory |
getFactory(java.lang.String name)
Returns an object Factory for given name in this context. |
java.lang.String |
getInitParameter(java.lang.String name)
Returns an init parameter of this context. |
java.util.Map |
getInitParameters()
Returns a map with all the init parameters of this context. |
static ContextImpl |
getInstance()
Returns singleton ContextImpl instance. |
Logger |
getLogger()
Returns Logger of this context. |
java.lang.String |
getRealPath(java.lang.String path)
Returns a String containing the real path for a given virtual path. |
java.net.URL |
getResource(java.lang.String path)
Returns a URL to the resource that is mapped to a specified path. |
java.io.InputStream |
getResourceAsStream(java.lang.String path)
Returns the resource located at the named path as an InputStream
object. |
void |
init(javax.servlet.ServletContext ctx)
Called on starts up of the Tarsis MVC Framework and put all components in service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ContextImpl getInstance()
ContextImpl
instance.
ContextImpl
instance.public void init(javax.servlet.ServletContext ctx) throws ConfigException, ServiceException
ctx
- ServletContext the ServletContext
of web application
where Tarsis MVC Framework is contained.
ConfigException
- if there is any problem loading configuration.
ServiceException
- if there is any problem initializing services.public void destroy()
public Authenticator getAuthenticator()
Authenticator
for this context.
getAuthenticator
in interface Context
Authenticator
for this context.Context.getAuthenticator()
public Authorizator getAuthorizator()
Authorizator
for this context.
getAuthorizator
in interface Context
Authorizator
for this context.Context.getAuthorizator()
public java.lang.String getInitParameter(java.lang.String name)
getInitParameter
in interface Context
name
- String name of parameter.
null
if parameter does not
exist.Context.getInitParameter(String)
public java.util.Map getInitParameters()
getInitParameters
in interface Context
Context.getInitParameters()
public Logger getLogger()
Logger
of this context.
getLogger
in interface Context
Logger
of this context.Context.getLogger()
public CommandFactory getCommandFactory()
CommandFactory
for this context.
getCommandFactory
in interface Context
CommandFactory
for this context.Context.getCommandFactory()
public Factory getFactory(java.lang.String name)
Factory
for given name in this context.
getFactory
in interface Context
name
- String name of factory.
Factory
for given name in this context or
null
if does not exist.Context.getFactory(String)
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
getResource
in interface Context
path
- String a String
specifying the path to the resource.
null
if
there is no resource at that path.
java.net.MalformedURLException
- if the pathname is not given in the correct form.ServletContext.getResource(java.lang.String)
,
Context.getResource(String)
public java.io.InputStream getResourceAsStream(java.lang.String path)
InputStream
object.
getResourceAsStream
in interface Context
path
- String a String
specifying the path to the resource.
InputStream
returned to the servlet, or
null
if no resource exists at the specified path.ServletContext.getResourceAsStream(java.lang.String)
,
Context.getResourceAsStream(String)
public java.lang.String getRealPath(java.lang.String path)
getRealPath
in interface Context
path
- String a String
specifying the path to the resource.
String
specifying the real path, or
null
if the translation cannot be performedServletContext.getRealPath(java.lang.String)
,
Context.getRealPath(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |