public class DojoToolkitHandler extends AbstractModulesHandler
Starting from the target the Dojo module resource name is constructed by replacing the DOJO_TOOLKIT_ROOT with DOJO_TOOLKIT. Then the module resource is loaded and sent as response to the requester.
IMPORTANT: Don't use logging anywhere inside this class. When used in a web client, this runs in conjunction with an authentication plugin during session establishment with the P2J server and using logging the application will deadlock.
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DOJO_TOOLKIT
Dojo toolkit package.
|
private static java.lang.String |
DOJO_TOOLKIT_ROOT
Dojo toolkit root path.
|
Constructor and Description |
---|
DojoToolkitHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
isModuleRequest(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request)
Returns true if it is a request for a dojo js module or a dojo html resource, otherwise
false.
|
java.lang.String |
mapToResource(java.lang.String target)
Maps the target of the request to its resource name.
|
handle
detectContentType, sendResponse
destroy, doStart, doStop, dumpThis, getServer, setServer
addBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
private static final java.lang.String DOJO_TOOLKIT
private static final java.lang.String DOJO_TOOLKIT_ROOT
public boolean isModuleRequest(java.lang.String target, org.eclipse.jetty.server.Request base, javax.servlet.http.HttpServletRequest request)
isModuleRequest
in class AbstractModulesHandler
target
- The target of the request - either a URI or a name.base
- The base request.request
- The object or a wrapper of the request.public java.lang.String mapToResource(java.lang.String target)
mapToResource
in class AbstractModulesHandler
target
- The target of the request - either a URI or a name.