|
|||||||||
| Home >> All >> [ JSPservletPkg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JSPservletPkg
Class JSPhandler

java.lang.ObjectJSPservletPkg.JSPhandler
- All Implemented Interfaces:
- org.osgi.framework.BundleActivator, java.util.EventListener, org.osgi.framework.ServiceListener
- public class JSPhandler
- extends java.lang.Object
- implements org.osgi.framework.BundleActivator, org.osgi.framework.ServiceListener
- extends java.lang.Object
It loads classes through ClassEntry with JSPloader and registers them. JES2 activator. Based on Sun SnoopActivator.java
Copyright (c) 2000-2001
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- Version:
- 1, 0
| Nested Class Summary | |
(package private) class |
JSPhandler.ClassEntry
Class invoked by JSPhandler for a given jar name. |
(package private) class |
JSPhandler.Log
Class wraping trace use. |
(package private) class |
JSPhandler.Scanner
Implements a scanner thread. |
| Field Summary | |
(package private) java.lang.String |
adminPasswd
password for admin page authentication (ServletLog, ServletStat, ServletUpdate) |
(package private) java.lang.String |
adminUser
user for admin page authentication (ServletLog, ServletStat, ServletUpdate) |
(package private) java.lang.String[] |
aErrorPage
Area of error handling pages |
(package private) java.lang.String |
allPermissionPolicy
describes an default policy file and set sandbox for archive execution. |
(package private) BasicSchemeHandler |
basic
Handle on BasicSchemeHandler. |
(package private) java.lang.String |
basicPasswd
password for basic page authentication |
(package private) java.lang.String |
basicUser
user for basic page authentication |
(package private) org.osgi.framework.BundleContext |
bundleContext
Context of the bundle (parameter of start method) |
(package private) java.lang.String |
cachePath
path were jars are locally stored - initialized by constructor. |
(package private) java.lang.String |
CALDAPpasswd
Password to use to connect to LDAP for CA certificate. |
(package private) java.lang.String |
CALDAPuser
Principal to use to connect to LDAP for CA certificate. |
(package private) java.lang.String |
CAURL
URL to access CA certificate in LDAP. |
(package private) java.util.HashMap |
classEntries
ClassEntry HashMap. |
(package private) java.util.Properties |
configProp
Configuration Properties - initialized by constructor. |
(package private) java.lang.String |
contextPath
Used to identify a particular JSPservlet bundle. |
(package private) java.lang.String |
CRLLDAPpasswd
Password to use to connect to LDAP for CRL. |
(package private) java.lang.String |
CRLLDAPuser
Principal to use to connect to LDAP for CRL. |
(package private) int |
CRLperiod
Certificate Revocation List Scan Period in seconds. |
(package private) java.lang.String |
CRLURL
URL to access Certificate Revocation List in LDAP. |
(package private) java.lang.String |
defaultPolicy
describes a policy for archive without policy. |
(package private) static int |
EP_NOTFOUND
servlet or resource not found |
(package private) static int |
EP_OTHER
other errors |
(package private) static int |
EP_REVOKED
archive certificate revoked |
(package private) static int |
EP_SIZE
error page array size |
(package private) static int |
EP_UNAUTHORIZED
servlet attempted an unauthorized access |
(package private) int |
expiration
resources expiration time in seconds - initialized by constructor. |
(package private) org.osgi.service.http.HttpService |
http
Handle on HttpService. |
(package private) org.osgi.framework.ServiceReference |
httpauthref
Initialized in start from com.sun.jes.service.http.auth.basic.BasicSchemeHandler |
(package private) org.osgi.framework.ServiceReference |
httpref
Initialized in start from org.osgi.service.http.HttpService |
(package private) java.lang.String |
ID
PageBox unique identifier |
(package private) java.lang.String |
keystore
keystore location. |
(package private) java.lang.String |
keystorePassword
keystore password. |
(package private) JSPhandler.Log |
log
Handle on Log object. |
(package private) java.lang.String |
logfile
Path of log file. |
(package private) java.lang.String |
remoteLocFile
remote locations properties file name - initialized by constructor. |
(package private) java.util.Properties |
remoteLocProp
remote locations Properties - initialized by constructor. |
(package private) JSPhandler.Scanner |
scanner
Scanner object |
(package private) static int |
SCANPERIOD
Scanner wake-up |
(package private) java.lang.ClassLoader |
servletClassLoader
ClassLoader used to create JSPhandler. |
(package private) java.lang.String |
SERVLETLOG_ALIAS
ServletLog alias |
(package private) java.lang.String |
SERVLETSTAT_ALIAS
ServletStat alias |
(package private) java.lang.String |
SERVLETUPDATE_ALIAS
ServletUpdate alias |
(package private) ServletLog |
sl
Handle on ServletLog servlet. |
(package private) ServletStat |
ss
Handle on ServletStat servlet. |
(package private) ServletUpdate |
su
Handle on ServletUpdate servlet. |
(package private) boolean |
toStat
record statistics or not |
(package private) boolean |
toTrace
Initial tracing mode. |
(package private) boolean |
useBundleSpace
If true, uses bundle space provided by BundleContext. |
| Constructor Summary | |
JSPhandler()
|
|
| Method Summary | |
void |
delete(java.lang.String jarName)
Invoked by ServletUpdate. |
protected void |
finalize()
to avoid loitering |
(package private) java.io.File |
getFile(java.lang.String path)
Get a File using path parameter and checks it exists or can be created. |
(package private) java.lang.String |
getInitParameter(java.lang.String parameter)
Parameters retrieval from a property file. |
private void |
httpRegister()
Method invoked from start and serviceChanged |
private void |
httpUnregister()
Method invoked from stop and serviceChanged |
void |
initialize()
Initializes parameters from property file in archive. |
private void |
initializeParameters()
Restores InitParameters from JSPservlet.properties in this jar file. |
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
ServiceListener's serviceChanged method. |
void |
start(org.osgi.framework.BundleContext bc)
BundleActivator method invoked at bundle start. |
void |
stop(org.osgi.framework.BundleContext bc)
BundleActivator method invoked at bundle stop. |
boolean |
update(java.lang.String jarName,
java.lang.String remoteLocation)
Invoked by ServletUpdate. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
cachePath
java.lang.String cachePath
- path were jars are locally stored - initialized by constructor.
- See Also:
- JSPhandler.ClassEntry, JSPloader
classEntries
java.util.HashMap classEntries
- ClassEntry HashMap.
key: jar name
value: ClassEntry
remoteLocFile
java.lang.String remoteLocFile
- remote locations properties file name - initialized by constructor.
- See Also:
- JSPhandler.ClassEntry
logfile
java.lang.String logfile
- Path of log file.
toTrace
boolean toTrace
- Initial tracing mode.
log
JSPhandler.Log log
- Handle on Log object.
remoteLocProp
java.util.Properties remoteLocProp
- remote locations Properties - initialized by constructor.
servletClassLoader
java.lang.ClassLoader servletClassLoader
- ClassLoader used to create JSPhandler.
defaultPolicy
java.lang.String defaultPolicy
- describes a policy for archive without policy.
allPermissionPolicy
java.lang.String allPermissionPolicy
- describes an default policy file and set sandbox for archive execution.
keystore
java.lang.String keystore
- keystore location. Also states if policy should be downloaded.
keystorePassword
java.lang.String keystorePassword
- keystore password.
expiration
int expiration
- resources expiration time in seconds - initialized by constructor.
CRLURL
java.lang.String CRLURL
- URL to access Certificate Revocation List in LDAP.
Initialized by constructor.
CRLLDAPuser
java.lang.String CRLLDAPuser
- Principal to use to connect to LDAP for CRL.
Initialized by constructor.
CRLLDAPpasswd
java.lang.String CRLLDAPpasswd
- Password to use to connect to LDAP for CRL.
Initialized by constructor.
CRLperiod
int CRLperiod
- Certificate Revocation List Scan Period in seconds.
Initialized by constructor.
CAURL
java.lang.String CAURL
- URL to access CA certificate in LDAP.
Initialized by constructor.
CALDAPuser
java.lang.String CALDAPuser
- Principal to use to connect to LDAP for CA certificate.
Initialized by constructor.
CALDAPpasswd
java.lang.String CALDAPpasswd
- Password to use to connect to LDAP for CA certificate.
Initialized by constructor.
basicUser
java.lang.String basicUser
- user for basic page authentication
basicPasswd
java.lang.String basicPasswd
- password for basic page authentication
adminUser
java.lang.String adminUser
- user for admin page authentication (ServletLog, ServletStat, ServletUpdate)
adminPasswd
java.lang.String adminPasswd
- password for admin page authentication (ServletLog, ServletStat, ServletUpdate)
toStat
boolean toStat
- record statistics or not
EP_OTHER
static final int EP_OTHER
- other errors
- See Also:
- Constant Field Values
EP_NOTFOUND
static final int EP_NOTFOUND
- servlet or resource not found
- See Also:
- Constant Field Values
EP_UNAUTHORIZED
static final int EP_UNAUTHORIZED
- servlet attempted an unauthorized access
- See Also:
- Constant Field Values
EP_REVOKED
static final int EP_REVOKED
- archive certificate revoked
- See Also:
- Constant Field Values
EP_SIZE
static final int EP_SIZE
- error page array size
- See Also:
- Constant Field Values
SCANPERIOD
static final int SCANPERIOD
- Scanner wake-up
- See Also:
- Constant Field Values
scanner
JSPhandler.Scanner scanner
- Scanner object
aErrorPage
java.lang.String[] aErrorPage
- Area of error handling pages
ID
java.lang.String ID
- PageBox unique identifier
configProp
java.util.Properties configProp
- Configuration Properties - initialized by constructor.
Replaces web.xml that doesn't exist on embedded servers.
useBundleSpace
boolean useBundleSpace
- If true, uses bundle space provided by BundleContext.
sl
ServletLog sl
- Handle on ServletLog servlet.
ss
ServletStat ss
- Handle on ServletStat servlet.
su
ServletUpdate su
- Handle on ServletUpdate servlet.
http
org.osgi.service.http.HttpService http
- Handle on HttpService. Created in start method.
Used to register/unregister servlets.
basic
BasicSchemeHandler basic
- Handle on BasicSchemeHandler. Created in start method.
Used in HttpContext to prompt the user for credentials.
httpref
org.osgi.framework.ServiceReference httpref
- Initialized in start from org.osgi.service.http.HttpService
httpauthref
org.osgi.framework.ServiceReference httpauthref
- Initialized in start from
com.sun.jes.service.http.auth.basic.BasicSchemeHandler
SERVLETUPDATE_ALIAS
final java.lang.String SERVLETUPDATE_ALIAS
- ServletUpdate alias
- See Also:
- Constant Field Values
SERVLETLOG_ALIAS
final java.lang.String SERVLETLOG_ALIAS
- ServletLog alias
- See Also:
- Constant Field Values
SERVLETSTAT_ALIAS
final java.lang.String SERVLETSTAT_ALIAS
- ServletStat alias
- See Also:
- Constant Field Values
contextPath
java.lang.String contextPath
- Used to identify a particular JSPservlet bundle.
bundleContext
org.osgi.framework.BundleContext bundleContext
- Context of the bundle (parameter of start method)
| Constructor Detail |
JSPhandler
public JSPhandler()
| Method Detail |
getFile
java.io.File getFile(java.lang.String path)
- Get a File using path parameter and checks it exists or can be created.
initializeParameters
private void initializeParameters()
- Restores InitParameters from JSPservlet.properties in this jar file.
getInitParameter
java.lang.String getInitParameter(java.lang.String parameter)
- Parameters retrieval from a property file.
initialize
public void initialize()
- Initializes parameters from property file in archive.
delete
public final void delete(java.lang.String jarName)
- Invoked by ServletUpdate.
update
public final boolean update(java.lang.String jarName, java.lang.String remoteLocation) throws JSPloaderException
- Invoked by ServletUpdate.
- Remove local cache
- If remote location was set by ServletUpdate, updates and persists remote properties.
- Search ClassEntry with jarName. Creates it if not found
finalize
protected void finalize()
- to avoid loitering
start
public void start(org.osgi.framework.BundleContext bc) throws org.osgi.framework.BundleException
- BundleActivator method invoked at bundle start.
- Specified by:
startin interfaceorg.osgi.framework.BundleActivator
serviceChanged
public void serviceChanged(org.osgi.framework.ServiceEvent event)
- ServiceListener's serviceChanged method.
Note start has subscribed to events from org.osgi.service.http.HttpService
and com.sun.jes.service.http.auth.basic.BasicSchemeHandler.
- Specified by:
serviceChangedin interfaceorg.osgi.framework.ServiceListener
httpRegister
private void httpRegister()
- Method invoked from start and serviceChanged
httpUnregister
private void httpUnregister()
- Method invoked from stop and serviceChanged
stop
public void stop(org.osgi.framework.BundleContext bc) throws org.osgi.framework.BundleException
- BundleActivator method invoked at bundle stop.
It invokes scanner.toEnd to stop scanner thread.
It can take up to SCANPERIOD to end.
- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator
|
|||||||||
| Home >> All >> [ JSPservletPkg overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
JSPservletPkg.JSPhandler