public interface

ContainerServices

implements ContainerServicesContext
com.microstrategy.web.platform.ContainerServices
Known Indirect Subclasses

Class Overview

This interfaces exposes, in a generic fashion, the services of any web application container. Whether the container is a servlet engine (Java) or a non-Java server (such as IIS), the methods exposed by this interface allow the caller to be unaware of the actual provider and the mechanics behind those calls. Each instances of this interface is associated with a request.

Summary

Constants
String SPNEGO_CREDENTIAL
Public Methods
abstract void addCookieToResponse(GenericCookie cookie)
This method associates a platform-independent Cookie with a response.
abstract Object getApplicationAttribute(String name)
This method returns the value of an Application Attribute.
abstract String getApplicationPath()
This method returns the full application path of the servlet
abstract int getCodePage()
Returns an integer that represents the character formatting codepage.
abstract GenericCookie getCookie(String cookieName)
This method retrieves a platform-independent Cookie with a specific name.
abstract GenericCookie getCookie(String cookieName, ContainerServicesNamespace namespace)
This method retrieves a platform-independent Cookie with a specific name.
abstract ContainerStringCollection getCookieStrings(ContainerServicesNamespace namespace)
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).
abstract ContainerStringCollection getCookieStrings()
This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).
abstract ContainerStringCollection getFormAndQueryStrings()
This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).
abstract String getHeaderValue(String headerName)
This method returns the value of the requested header
abstract String getMethod()
Return the request's method is post or get
abstract OutputStream getOutputStream()
abstract PostedFile getPostedFile(String name)
Provides a way to access individual files that have been uploaded by a client.
abstract String getQueryString()
This method returns the entire Query String.
abstract String getRemoteAddress()
This method returns the client IP address
abstract Object getRequestAttribute(String name)
This method returns the value of a Request Attribute.
abstract String getRequestServerName()
This method returns the Web Server Name from the request object
abstract ContainerStringCollection getServerVariables()
Returns a collection of server variables.
abstract Object getSessionAttribute(String name, ContainerServicesNamespace namespace)
This method returns the value of a Session Attribute.
abstract Object getSessionAttribute(String name)
This method returns the value of a Session Attribute.
abstract String getSessionID()
Returns HTTP session ID
abstract int getSessionMaxIdleTime()
Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.
abstract ContainerStringCollection getSessionStrings()
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs).
abstract ContainerStringCollection getSessionStrings(ContainerServicesNamespace namespace)
This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs) from the namespace specified.
abstract int getStatusCode()
Returns the HTTP Status code specified for this response.
abstract boolean hasOutputStream()
abstract void invalidateHttpSession()
If the security preference is selected, invalidate and create new http session in jsp part set a flag to show whether a new session need to be created in asp part
abstract boolean isJavaURLSessionSupported()
Indicates if the instance of this container services supports cookieless environments
abstract boolean isRequestSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS
abstract boolean isSessionlessRequest()
Does the request has a pre-established session id.
abstract GenericCookie newCookie(String cookieName, String cookieValue)
This method creates a new platform-independent Cookie.
abstract GenericCookie newCookie(String cookieName, String cookieValue, ContainerServicesNamespace namespace)
This method creates a new platform-independent Cookie.
abstract ParameterBuilder newHiddenInputParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building hidden inputs.
abstract NamespaceEncoder newNamespaceEncoder()
Create a new instance of a NamespaceEncoder that can provide global namespace support.
abstract ParameterBuilder newURIParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building URIs.
abstract void sendBinaryContent(MarkupOutput mo)
Outputs binary content of the MarkupOutput
abstract boolean sendError(int sc)
Sends an error response to the client using the specified status code.
abstract boolean sendError(int sc, String msg)
Sends an error response to the client using the specified status code.
abstract void setApplicationAttribute(String name, Object value)
This method sets the value of a Application Attribute.
abstract void setCodePage(int code)
Sets the code page, an integer representing the character formatting.
abstract void setContentType(String type)
Stes HTTP response content type
abstract void setHeaderValue(String name, String value)
Sets HTTP response header
abstract void setJavaURLSessionSupported(boolean value)
Sets if the instance of this container services supports cookieless environments
abstract void setRequestAttribute(String name, Object value)
This method sets the value of a Request Attribute.
abstract void setSessionAttribute(String name, Object value)
This method sets the value of a Session Attribute.
abstract void setSessionAttribute(String name, Object value, ContainerServicesNamespace namespace)
This method sets the value of a Session Attribute in the given namespace.
abstract void setStatusCode(int statusCode)
Sets the HTTP Status code specified for this response.
[Expand]
Inherited Methods
From interface com.microstrategy.web.platform.ContainerServicesContext

Constants

public static final String SPNEGO_CREDENTIAL

Constant Value: "Credential"

Public Methods

public abstract void addCookieToResponse (GenericCookie cookie)

This method associates a platform-independent Cookie with a response. When the response is sent back to the client, it will contain this cookie.

Parameters
cookie The GenericCookie to be added to the Response.

public abstract Object getApplicationAttribute (String name)

This method returns the value of an Application Attribute.

Parameters
name the name of an attribute.
Returns
  • An Object representing the value of a named application attribute.

public abstract String getApplicationPath ()

This method returns the full application path of the servlet

Returns
  • A String that indicates the full application path of the servlet. (i.e. http://localhost:8080/MicroStrategy/servlet)

public abstract int getCodePage ()

Returns an integer that represents the character formatting codepage. The CodePage property specifies how literal (static) strings are encoded in a Web page. A codepage is a character set that can include numbers, punctuation marks, and other glyphs. Codepages are not the same for each language. Some languages have multi-byte characters, while others only need one byte to represent each character.

Returns
  • an integer that represents the character formatting codepage.

public abstract GenericCookie getCookie (String cookieName)

This method retrieves a platform-independent Cookie with a specific name.

Parameters
cookieName A String which identifies the name of the cookie.
Returns
  • A GenericCookie for the name supplied. If no cookie exists with this name, a null pointer is returned.

public abstract GenericCookie getCookie (String cookieName, ContainerServicesNamespace namespace)

This method retrieves a platform-independent Cookie with a specific name.

Parameters
cookieName A String which identifies the name of the cookie.
namespace A ContainerServicesNamespace object represention the namespace requirement.
Returns
  • A GenericCookie for the name supplied. If no cookie exists with this name, a null pointer is returned.

public abstract ContainerStringCollection getCookieStrings (ContainerServicesNamespace namespace)

This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).

Parameters
namespace A ContainerServicesNamespace object representing the namespace requirement. If null, no namespace is used.
Returns

public abstract ContainerStringCollection getCookieStrings ()

This method returns the contents of all Cookies as a collection of sub strings (as name/value pairs).

Returns

public abstract ContainerStringCollection getFormAndQueryStrings ()

This method returns the contents of the Form Data and Query String as a collection of sub strings (as name/value pairs).

Returns

public abstract String getHeaderValue (String headerName)

This method returns the value of the requested header

Parameters
headerName A String with the name of the header to search for
Returns
  • A String with the value of the header requested. If the header was not found, it shall return a null value.

public abstract String getMethod ()

Return the request's method is post or get

public abstract OutputStream getOutputStream ()

public abstract PostedFile getPostedFile (String name)

Provides a way to access individual files that have been uploaded by a client.

Parameters
name a name of posted file
Returns
  • a posted file

public abstract String getQueryString ()

This method returns the entire Query String.

Returns
  • A String that contains the contents of the Query String.

public abstract String getRemoteAddress ()

This method returns the client IP address

Returns
  • A String with the value of the client IP address

public abstract Object getRequestAttribute (String name)

This method returns the value of a Request Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name the name of an attribute.
Returns
  • An Object representing the value of a named attribute.

public abstract String getRequestServerName ()

This method returns the Web Server Name from the request object

Returns
  • A String that indicates the Web Server Name. (i.e. if you access the web server with the URL which reads as http://localhost:8080/MicroStrategy/servlet then this method will return "localhost" as the web server name. If you access the webserver with the URL which reads as http://machine1:8080/MicroStrategy/servlet then this method will return "machine1" as the web server name.

public abstract ContainerStringCollection getServerVariables ()

Returns a collection of server variables.

Returns
  • a collection of server variables.

public abstract Object getSessionAttribute (String name, ContainerServicesNamespace namespace)

This method returns the value of a Session Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name the name of an attribute.
namespace the name of the URL parameter that privides the namespace name.
Returns
  • An Object representing the value of a named session attribute.

public abstract Object getSessionAttribute (String name)

This method returns the value of a Session Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name the name of an attribute.
Returns
  • An Object representing the value of a named session attribute.

public abstract String getSessionID ()

Returns HTTP session ID

Returns
  • HTTP session ID

public abstract int getSessionMaxIdleTime ()

Returns the maximum time interval, in seconds, that the container will keep this session open between client accesses.

public abstract ContainerStringCollection getSessionStrings ()

This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs). Only those session variables that return values of type String are considered.

Returns

public abstract ContainerStringCollection getSessionStrings (ContainerServicesNamespace namespace)

This method returns the contents of the Session Variables as a collection of sub strings (as name/value pairs) from the namespace specified. Only those session variables that return values of type String are considered.

Parameters
namespace A ContainerServicesNamespace object representing the namespace requirement.
Returns

public abstract int getStatusCode ()

Returns the HTTP Status code specified for this response.

Returns
  • The HTTP Status code specified for this response.

public abstract boolean hasOutputStream ()

public abstract void invalidateHttpSession ()

If the security preference is selected, invalidate and create new http session in jsp part set a flag to show whether a new session need to be created in asp part

public abstract boolean isJavaURLSessionSupported ()

Indicates if the instance of this container services supports cookieless environments

public abstract boolean isRequestSecure ()

Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS

public abstract boolean isSessionlessRequest ()

Does the request has a pre-established session id.

public abstract GenericCookie newCookie (String cookieName, String cookieValue)

This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.

Parameters
cookieName A String which identifies the name of the cookie.
cookieValue A String representing the value of the cookie.
Returns

public abstract GenericCookie newCookie (String cookieName, String cookieValue, ContainerServicesNamespace namespace)

This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.

Parameters
cookieName A String which identifies the name of the cookie.
cookieValue A String representing the value of the cookie.
namespace A ContainerServicesNamespace object representing the namespace requirement. If null, no namespace is used.
Returns

public abstract ParameterBuilder newHiddenInputParameterBuilder ()

Create a new instance of a ParameterBuilder that is suited for building hidden inputs.

Returns
  • An instance of a ParameterBuilder that generates a string of hidden inputs.

public abstract NamespaceEncoder newNamespaceEncoder ()

Create a new instance of a NamespaceEncoder that can provide global namespace support.

Returns
  • An instance of a NamespaceEncoder that should be used for global namespacing.

public abstract ParameterBuilder newURIParameterBuilder ()

Create a new instance of a ParameterBuilder that is suited for building URIs.

Returns
  • An instance of a ParameterBuilder that generates URIs.

public abstract void sendBinaryContent (MarkupOutput mo)

Outputs binary content of the MarkupOutput

Parameters
mo markup outpu containing binary image

public abstract boolean sendError (int sc)

Sends an error response to the client using the specified status code.

Parameters
sc The status errror code. We reuse HTTP status code "OK" (200) to mean no error, so please do not use it for any error status.
Returns
  • true to indicate this action succeeded. false to indicate error in performing this action.

public abstract boolean sendError (int sc, String msg)

Sends an error response to the client using the specified status code.

Parameters
sc The errror status code.
msg The error message.
Returns
  • true to indicate this action succeeded. false to indicate error in performing this action.

public abstract void setApplicationAttribute (String name, Object value)

This method sets the value of a Application Attribute.

Parameters
name A String which identifies the name of the attribute.
value An Object representing the value of a named attribute.

public abstract void setCodePage (int code)

Sets the code page, an integer representing the character formatting. The CodePage property specifies how literal (static) strings are encoded in a Web page. A codepage is a character set that can include numbers, punctuation marks, and other glyphs. Codepages are not the same for each language. Some languages have multi-byte characters, while others only need one byte to represent each character.

Parameters
code an integer that represents the character formatting codepage.

public abstract void setContentType (String type)

Stes HTTP response content type

Parameters
type content type

public abstract void setHeaderValue (String name, String value)

Sets HTTP response header

Parameters
name header name
value header value

public abstract void setJavaURLSessionSupported (boolean value)

Sets if the instance of this container services supports cookieless environments

Parameters
value true if cookieless environment is supported

public abstract void setRequestAttribute (String name, Object value)

This method sets the value of a Request Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name A String which identifies the name of the attribute.
value An Object representing the value of a named attribute.

public abstract void setSessionAttribute (String name, Object value)

This method sets the value of a Session Attribute. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name A String which identifies the name of the attribute.
value An Object representing the value of a named attribute.

public abstract void setSessionAttribute (String name, Object value, ContainerServicesNamespace namespace)

This method sets the value of a Session Attribute in the given namespace. In Java, there is a clear distinction between Request and Session variables. In ASP, the two are combined as there is not a similar concept.

Parameters
name A String which identifies the name of the attribute.
value An Object representing the value of a named attribute.
namespace A ContainerServicesNamespace object representing the namespace requirement. If null, no namespace is used.

public abstract void setStatusCode (int statusCode)

Sets the HTTP Status code specified for this response.

Parameters
statusCode the HTTP Status code specified for this response.