Tags:
no tags assigned
Class HandlerDispatcher
in package de.infoasset.platform.handler
- Declaration
- public class HandlerDispatcher
- extends AbstractInitializable
- Hierarchy
java.lang.Object
de.infoasset.platform.util.AbstractInitializable
de.infoasset.platform.handler.HandlerDispatcher- All Implemented Interfaces
- de.infoasset.imf.blackbox.Configurable
- de.infoasset.imf.blackbox.Initializable
URL Mapping
A dispatcher implements a mapping from a URL to an instance of Handler.There are two different strategies (see getHandler(String, boolean)). For a given URL they are applied in that order:
- Convention-based mapping for static URLs, and
- regex-based mapping for dynamic meaningful URLs using HandlerPatterns.
Convention-based URL Mapping
Convention means here, that the Handler class name corresponds directly with the given path.At first the path is translated into the class name of the Handler:
- All slashes in the path are translated into .
- the last part of the path gets a capital first letter and the Suffix Handler.
Example:
The path document/edit translates to the class name
de.infoasset.%PROJECT_NAME%.handler.document.EditHandler
Now the dispatcher tries to find a handler class in all plugins according to their inheritance hierarchy see Plugin. If one is found it is instantiated with the Loader and returned.
Field Summary
| static String |
|---|
Constructor Summary
Method Summary
| Object |
|
|---|---|
| void |
|
| static HandlerDispatcher |
|
| void |
Field Detail
URL_CHARACTERS
public static final String URL_CHARACTERS
Constructor Detail
HandlerDispatcher
public HandlerDispatcher()
Method Detail
INSTANCE
public static HandlerDispatcher INSTANCE()
initNew
public void initNew()
testGetClassName
public void testGetClassName()
Referenced by:
|
Referenced by
(11)
|
0 Comments