com.nitido.nimbox.http
Class SkinDispatcherForNimlet
java.lang.Object
com.nitido.nimbox.http.SkinDispatcher
com.nitido.nimbox.http.SkinDispatcherForNimlet
- All Implemented Interfaces:
- HttpNimletConstants
public class SkinDispatcherForNimlet
- extends SkinDispatcher
The SkinDispatcher for Nimlet.
This dispatcher can handle the following two settings
- timelog
(Constant for the configuration key is CONF_KEY_TIME_LOG)
- specifies the category prefix to log the response time to.
- if the value is not specified the response time log will be disabled
- errorskin
(Constant for the configuration key is CONF_KEY_ERROR_SKIN)
- specifies the skin dispatch when the dispatcher catches unexpected
exceptions.
- if the value is not specified or the value is invalid,
the dispatcher will rethrow the exceptions.
Fields inherited from interface com.nitido.nimbox.http.HttpNimletConstants |
CONF_KEY_CONTAINER_ENTITY_ID, CONF_KEY_CONTAINER_ENTITY_PWD, CONF_KEY_CONTAINER_INIT_ALL_NIMLETS, CONF_KEY_ERROR_SKIN, CONF_KEY_PREFIX_NIMLET_MAP, CONF_KEY_PREFIX_NIMLET_SETTING, CONF_KEY_PREFIX_PARSER_MULTIPART, CONF_KEY_PREFIX_SKIN_SETTING, CONF_KEY_PREFIX_SKIN_TYPE, CONF_KEY_REG_ENCODING, CONTAINER_TYPE, DEF_SAVE_DIRECTORY, KEY_ENABLE_AD_SERVICE_FLAG, KEY_ERROR_EXCEPTION, KEY_ERROR_MESSAGE, KEY_ERROR_OLD_SKIN, KEY_NIM_ENTITY, KEY_RESPONSE_EXCLUDED_SKINS, KEY_RESPONSE_OVERRIDE_HEADERS, KEY_SKIN_AD_MAP, LEN_KEY_PREFIX_NIMLET_MAP, LEN_KEY_PREFIX_PARSER_MULTIPART, LEN_KEY_PREFIX_SKIN_TYPE, LEN_PREFIX_KEY_RESPONSE_HEADER, LEN_PROTOCOL_DYNAMIC, LEN_PROTOCOL_FORWARD, LEN_PROTOCOL_INCLUDE, LEN_PROTOCOL_NIMLET, LEN_PROTOCOL_REDIRECT, LEN_PROTOCOL_STATIC, LEN_PROTOCOL_VOID, MSG_NO_NIMLET, MULTIPART_PARSER, PARAM_KEY_NIMLET, PREFIX_KEY_RESPONSE_HEADER, PROTOCOL_DYNAMIC, PROTOCOL_FORWARD, PROTOCOL_INCLUDE, PROTOCOL_NIMLET, PROTOCOL_REDIRECT, PROTOCOL_SEPARATOR, PROTOCOL_STATIC, PROTOCOL_VOID, REGULAR_PARSER, REQ_HEADER_CONTENT_TYPE, SKIN_START_DYNAMIC, SKIN_START_FORWARD, SKIN_START_INCLUDE, SKIN_START_NIMLET, SKIN_START_REDIRECT, SKIN_START_STATIC, SKIN_START_VOID, TYPE_MULTIPART_FORM |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONF_KEY_TIME_LOG
public static final java.lang.String CONF_KEY_TIME_LOG
- See Also:
- Constant Field Values
CONF_KEY_MAX_CHAIN_LEVEL
public static final java.lang.String CONF_KEY_MAX_CHAIN_LEVEL
- See Also:
- Constant Field Values
START_CHAIN_LEVEL
protected static final int START_CHAIN_LEVEL
- See Also:
- Constant Field Values
DEF_MAX_CHAIN_LEVEL
protected static final int DEF_MAX_CHAIN_LEVEL
- See Also:
- Constant Field Values
_maxChainLevel
protected int _maxChainLevel
SkinDispatcherForNimlet
public SkinDispatcherForNimlet()
- Default constructor.
Note: although this class is only used within this package, we
should still leave the constructor public so that we can use
reflection to instantiate this in the future.
init
public void init(java.util.HashMap map)
throws javax.servlet.ServletException
- Initializes this Skin dispatcher with the given configuration
parameters.
- Specified by:
init
in class SkinDispatcher
- Parameters:
map
- Skin dispatcher configuration properties. This service
expects the following configuration properties:
- com.nitido.nimbox.http.skinsetting.nimlet.timelog: If
set this paramter contains the name of the Log used to
keep track of Nimlet execution times. If not set, nimlet
time logging is dissabled.
- com.nitido.nimbox.http.skinsetting.nimlet.maxchainlevel:
If set this parameter contains the maximum number of
levels in a nimlet chain. This configuration parameter
must be an integer value greater than 1.
- Throws:
javax.servlet.ServletException
- If unable to initialize the skin dispatcher
dispatch
public void dispatch(HttpNimletContainer container,
HttpNimletOutput prevOut)
throws javax.servlet.ServletException,
java.io.IOException
- Description copied from class:
SkinDispatcher
- This method is responsible for dispatching the information as
specified by the parameters
- Specified by:
dispatch
in class SkinDispatcher
- Parameters:
container
- The HttpNimletContainer objectprevOut
- The HttpNimletOutput object to be passed to the skin being
dispatched.
- Throws:
javax.servlet.ServletException
- if the target resource throws this exception.
java.io.IOException
- if an input or output error is detected when dispatching.
_dispatch
protected void _dispatch(HttpNimletContainer container,
HttpNimletOutput output,
int currentChainLevel)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
handleNimletExecution
protected void handleNimletExecution(HttpNimletContainer container,
HttpNimletOutput prevOut,
Skin nimletSkin,
int currentChainLevel)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
handleNextSkin
protected void handleNextSkin(HttpNimletContainer container,
java.lang.String nimletName,
HttpNimletOutput newOut,
int currentChainLevel)
throws javax.servlet.ServletException,
java.io.IOException
- Throws:
javax.servlet.ServletException
java.io.IOException
These JavaDoc pages are generated for release/nim_2_5-2.5.44 Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.