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.server.handler.AbstractHandler.ErrorDispatchHandlerorg.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListenerorg.eclipse.jetty.util.component.LifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
basePath
The parent context path for this resource.
|
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()
Create a new handler with an empty parent context path.
|
DojoToolkitHandler(java.lang.String basePath)
Create a new handler with the specified parent context path.
|
| 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.
|
handledetectContentType, sendResponsedestroy, doError, doStart, doStop, getServer, setServeraddBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, start, stop, stopprivate static final java.lang.String DOJO_TOOLKIT
private static final java.lang.String DOJO_TOOLKIT_ROOT
private final java.lang.String basePath
public DojoToolkitHandler()
public DojoToolkitHandler(java.lang.String basePath)
basePath - The parent context path.public boolean isModuleRequest(java.lang.String target,
org.eclipse.jetty.server.Request base,
javax.servlet.http.HttpServletRequest request)
isModuleRequest in class AbstractModulesHandlertarget - 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 AbstractModulesHandlertarget - The target of the request - either a URI or a name.