|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jwarp.service.Context
This implements a basic application context. An application context provides a runtime environment controlling processes, threads and security of application services. All JWeb components actually are built on top of these services.
| Field Summary | |
(package private) ILogWriter |
log
|
| Fields inherited from interface org.jwarp.service.IContext |
CONTEXT_STATUS_CREATED, CONTEXT_STATUS_NOT_AVAILABLE, CONTEXT_STATUS_RUNNING, CONTEXT_STATUS_STARTING, CONTEXT_STATUS_STOPPED, CONTEXT_STATUS_STOPPING, ELEM_CONTEXT |
| Constructor Summary | |
Context(org.jdom.Element configuration)
Creates the context with the given element |
|
| Method Summary | |
void |
addService(org.jdom.Element config,
ITicket ticket)
Add dynamically a new service. |
void |
addService(IService service,
java.lang.String serviceName,
ITicket ticket)
Add dynamically a new service. |
void |
checkAccess(java.lang.String op,
int level,
ITicket ticket)
Direct access to the security service for right authorization. |
IService |
connectService(org.jdom.Element tree,
ITicket ticket)
This method is used for reusal of the service intitialization and reference code. |
ILogWriter |
getLog()
Returns the context's default log writer object. |
java.lang.String |
getName()
Returns the context's name |
IReferenceResolver |
getResolver()
|
IService |
getService(java.lang.String serviceName,
ITicket ticket)
Return the service with the given name |
int |
getStatus()
Returns the current status of the context |
ITicket |
getSystemTicket()
Returns the context's system ticket EXACTLY once after initialization. |
ITicket |
login(java.lang.String user,
java.lang.String pwd)
Login to this context. |
ILogWriter |
makeLog(org.jdom.Element tree,
ITicket ticket)
This method is used for reusal of the log intitialization and reference code. |
void |
removeService(java.lang.String serviceName,
ITicket ticket)
Add dynamically a new service. |
void |
start(ITicket ticket)
|
void |
stop(ITicket ticket)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
ILogWriter log
| Constructor Detail |
public Context(org.jdom.Element configuration)
throws ConfigurationException
configuration - The XML configuration of the context| Method Detail |
public final ITicket getSystemTicket()
throws java.lang.SecurityException
public IReferenceResolver getResolver()
getResolver in interface IContext
public ITicket login(java.lang.String user,
java.lang.String pwd)
throws java.lang.SecurityException
login in interface IContextuser - The user id,pwd - The user passwordjava.lang.SecurityException - When access to the context was denied.
public void addService(IService service,
java.lang.String serviceName,
ITicket ticket)
throws java.lang.SecurityException
addService in interface IContextservice - The new serviceserviceName - The service name under which the service should registeredticket - The system user who must WRITE access to the factoryjava.lang.SecurityException - If access was denied or a service with
the same name is running yet
public void addService(org.jdom.Element config,
ITicket ticket)
throws java.lang.SecurityException
addService in interface IContextservice - The new serviceserviceName - The service name under which the service should registeredticket - The system user who must WRITE access to the factoryjava.lang.SecurityException - If access was denied or a service with
the same name is running yet
public void removeService(java.lang.String serviceName,
ITicket ticket)
throws java.lang.SecurityException,
ServiceNotFoundException
removeService in interface IContextserviceName - The service name under which the service should registeredticket - The system user who must WRITE access to the factoryjava.lang.SecurityException - If access was denied or a service with
the same name is running yetServiceNotFoundException - If the service could not be foundpublic java.lang.String getName()
getName in interface IContext
public IService getService(java.lang.String serviceName,
ITicket ticket)
throws java.lang.SecurityException
getService in interface IContextserviceName - The name of the service to returnThe - user ticketServiceNotFoundException - If the service could not be locatedjava.lang.SecurityException - If access was denied.public int getStatus()
getStatus in interface IContext
public void start(ITicket ticket)
throws java.lang.SecurityException,
ServiceRuntimeException,
ServiceInitializationException
start in interface IContext
public void stop(ITicket ticket)
throws java.lang.SecurityException,
ServiceRuntimeException
stop in interface IContext
public void checkAccess(java.lang.String op,
int level,
ITicket ticket)
throws java.lang.SecurityException
IContextcheckAccess in interface IContextorg.jwarp.service.IContextobject - The objectlevel - The access levelticket - The user to access the objectpublic ILogWriter getLog()
IContextgetLog in interface IContextorg.jwarp.service.IContext
public IService connectService(org.jdom.Element tree,
ITicket ticket)
throws java.lang.SecurityException
connectService in interface IContexttree - The service or reference jdom treeticket - The system ticket
public ILogWriter makeLog(org.jdom.Element tree,
ITicket ticket)
throws java.lang.SecurityException,
ConfigurationException
makeLog in interface IContexttree - The log or reference jdom treelogName - The name of the logticket - The system ticket
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||