Nitido Inc.

com.nitido.nimbox.http
Class HttpNimletContainer

java.lang.Object
  extended by com.nitido.nimbox.http.HttpNimletContainer
All Implemented Interfaces:
NimletContainer, HttpNimletConstants

public class HttpNimletContainer
extends java.lang.Object
implements NimletContainer, HttpNimletConstants

This an HTTP implementation of the NimletContainer interface.


Field Summary
protected  HttpNimletDriver _driver
           
protected  javax.servlet.http.HttpServletRequest _request
           
protected  javax.servlet.http.HttpServletResponse _response
           
 
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
 
Constructor Summary
HttpNimletContainer(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, HttpNimletDriver driver)
          This methods is used to create a new instance of an HttpNimletContainer.
 
Method Summary
 void attachEntity(Entity entity)
          This method is used to attach an entity to the container.
 void detachEntity(Entity entity)
          This method is used to detach an entity from the container.
 java.lang.String getContainerType()
          This method returns a string representation of the container type.
 Entity getEntityFromSession()
          This method is used to get the Entity object from the HttpSession for the client.
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          This method returns a reference to the HttpServletRequest object associated with a client request.
 javax.servlet.http.HttpServletResponse getHttpServletResponse()
          This method returns a reference to the HttpServletResponse object associated with a client request.
 HttpNimletDriver getNimletDriver()
          This method returns the cached reference to the HttpNimletDriver object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_request

protected final javax.servlet.http.HttpServletRequest _request

_response

protected final javax.servlet.http.HttpServletResponse _response

_driver

protected final HttpNimletDriver _driver
Constructor Detail

HttpNimletContainer

public HttpNimletContainer(javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response,
                           HttpNimletDriver driver)
This methods is used to create a new instance of an HttpNimletContainer.

Parameters:
request - Reference to the HttpServletRequest object.
response - Reference to the HttpServletResponse object.
driver - Reference to the HttpNimletDriver being used.
Method Detail

getContainerType

public java.lang.String getContainerType()
Description copied from interface: NimletContainer
This method returns a string representation of the container type.

Specified by:
getContainerType in interface NimletContainer
Returns:
The type of the nimlet container.

attachEntity

public void attachEntity(Entity entity)
                  throws NimletException
Description copied from interface: NimletContainer
This method is used to attach an entity to the container. Subsequent requests from this user will be treated as "authenticated" and the Container Server will invoke the corresponding Nimlet request handling method.

Specified by:
attachEntity in interface NimletContainer
Throws:
NimletException - If an error occur when attaching the entity to the Container. This error usually occur when the system has not been configured properly.

detachEntity

public void detachEntity(Entity entity)
                  throws NimletException
Description copied from interface: NimletContainer
This method is used to detach an entity from the container. Subsequent requests from the client will be treated as "unauthenticated" and the Container Server will invoke the corresponding Nimlet request handling method.

Specified by:
detachEntity in interface NimletContainer
Throws:
NimletException - If an error occur when dettaching the entity from the Container. This error usually occurs when the system has not been configured properly.

getEntityFromSession

public Entity getEntityFromSession()
This method is used to get the Entity object from the HttpSession for the client.

Returns:
Reference to the authenticated Entity associated with the request

getNimletDriver

public HttpNimletDriver getNimletDriver()
This method returns the cached reference to the HttpNimletDriver object.

Returns:
Reference to the HttpNimletDriver.

getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()
This method returns a reference to the HttpServletRequest object associated with a client request. This method gives Nimlet developers access to HTTP specific actions, such as getting the cookie or accessing the input stream directly.

Returns:
Reference to the HttpServletRequest object created by the underlying application server for a client request.

getHttpServletResponse

public javax.servlet.http.HttpServletResponse getHttpServletResponse()
This method returns a reference to the HttpServletResponse object associated with a client request. This object gives Nimlet developers access to HTTP specific actions, such as setting cookies or assigning the HTTP error code in the response header.

Returns:
Reference to the HttpServletResponse object created by the underlying application server for a client request.

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.