Package com.microstrategy.web.platform
Interface DisconnectedContainerServices
-
- All Superinterfaces:
ContainerServices,ContainerServicesContext
- All Known Implementing Classes:
DisconnectedContainerServicesImpl
public interface DisconnectedContainerServices extends ContainerServices
This interface represents an intermediary between the ASP.net and Microstrategy Java application. At the start of each ASP page request data and all other necessary data must be copied into the object of this class. After request processing is finished response data must be copied from this object to the response.- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.web.platform.ContainerServices
SPNEGO_CREDENTIAL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCookieToRequest(java.lang.String nativeCookieName, java.lang.String nativeCookieValue)Adds request cookie to the internal collection This method is used by non-J2EE environment to add cookies to MicroStrategy Web application.voidaddFormAndQueryString(java.lang.String name, java.lang.String value)Adds a value to the request parameters collection.voidaddRequestHeader(java.lang.String name, java.lang.String value)Adds request header to the internal collectionvoidaddServerVariable(java.lang.String name, java.lang.String value)Adds a server variable with a single value.voidaddServerVariable(java.lang.String name, java.lang.String[] values)Appends a collection of string values of the specified server variable.java.lang.ObjectgetApplicationAttribute(int index)Returns application attributejava.lang.StringgetApplicationAttributeName(int index)Returns application attribute nameintgetApplicationAttributesCount()Returns a number of application attributes.MarkupOutputgetBinaryMarkup()Returns markup outut stored at the sendBinaryContent method.java.lang.StringgetContentType()Returns response content typebooleangetCreateNewSessionValue()Gets a boolean value indicating whether create a new http sessionintgetErrorCode()Returns the error status code for response.java.lang.StringgetErrorMessage()Returns the error message for response.AppGlobalContextgetGlobalContext()Returns the global context held by this services.java.lang.ObjectgetRequestAttribute(int index)Returns requst attributejava.lang.StringgetRequestAttributeName(int index)Returns requst attribute nameintgetRequestAttributesCount()Returns a number of request attributes.GenericCookiegetResponseCookie(int index)Returns a cookie that must be added to the responseintgetResponseCookiesCount()Returns number of cookeis that must be added to the responsejava.lang.StringgetResponseHeaderName(int index)Returns response header nameintgetResponseHeadersCount()Returns number of response headersjava.lang.StringgetResponseHeaderValue(int index)Returns response header valuejava.lang.ObjectgetSessionAttribute(int i)Returns session attributejava.lang.StringgetSessionAttributeName(int i)Returns session attribute nameintgetSessionAttributesCount()Returns a number of session attributes.voidhandleMultipartRequest(byte[] request)This method shall be called if the request type is multipart/form-datavoidsetCreateNewSessionValue(boolean value)Sets a boolean indicating whether create a new http sessionvoidsetGlobalContext(AppGlobalContext globalContext)Sets current application global context.voidsetMethod(java.lang.String method)Sets the request methodvoidsetNativeSessionAttribute(java.lang.String nativeName, java.lang.Object nativeValue)This method sets the value of a Session Attribute without using namespace in Session variable.voidsetQueryString(java.lang.String queryString)Sets HTTP request query stringvoidsetRemoteAddress(java.lang.String remoteAddress)Set the remote (IP) address for this requestvoidsetRequestSecure(boolean value)Sets a boolean indicating whether this request was made using a secure channel, such as HTTPSvoidsetSessionID(java.lang.String sessionID)Sets the HTTP session ID-
Methods inherited from interface com.microstrategy.web.platform.ContainerServices
addCookieToResponse, getApplicationAttribute, getApplicationPath, getCodePage, getCookie, getCookie, getCookieStrings, getCookieStrings, getFormAndQueryStrings, getHeaderValue, getMethod, getOutputStream, getPostedFile, getQueryString, getRemoteAddress, getRequestAttribute, getRequestServerName, getServerVariables, getSessionAttribute, getSessionAttribute, getSessionID, getSessionMaxIdleTime, getSessionStrings, getSessionStrings, getStatusCode, hasOutputStream, invalidateHttpSession, isJavaURLSessionSupported, isQueryParam, isRequestSecure, isSessionlessRequest, newCookie, newCookie, newHiddenInputParameterBuilder, newNamespaceEncoder, newURIParameterBuilder, sendBinaryContent, sendError, sendError, setApplicationAttribute, setCodePage, setContentType, setHeaderValue, setJavaURLSessionSupported, setRequestAttribute, setSessionAttribute, setSessionAttribute, setStatusCode
-
Methods inherited from interface com.microstrategy.web.platform.ContainerServicesContext
getApplicationParameters, getContextPath, getControllerParameter, getInitParameter, getInitParameterNames, getRealPath, getResource, getResourceAsStream, getResourcePaths, initGlobalObjects
-
-
-
-
Method Detail
-
addFormAndQueryString
void addFormAndQueryString(java.lang.String name, java.lang.String value)Adds a value to the request parameters collection. There can be several values assosiated with the same name in this collection.- Parameters:
name- parameter name.value- parameter value.
-
setQueryString
void setQueryString(java.lang.String queryString)
Sets HTTP request query string- Parameters:
queryString- request query string
-
setRemoteAddress
void setRemoteAddress(java.lang.String remoteAddress)
Set the remote (IP) address for this request- Parameters:
remoteAddress- IP address
-
setSessionID
void setSessionID(java.lang.String sessionID)
Sets the HTTP session ID- Parameters:
sessionID- HTTP session ID
-
setMethod
void setMethod(java.lang.String method)
Sets the request method- Parameters:
request- type post/get is required
-
getResponseCookiesCount
int getResponseCookiesCount()
Returns number of cookeis that must be added to the response- Returns:
- number of cookeis that must be added to the response
-
getResponseCookie
GenericCookie getResponseCookie(int index)
Returns a cookie that must be added to the response- Parameters:
index- an index in the cookies collection- Returns:
- a cookie that must be added to the response
-
getRequestAttributesCount
int getRequestAttributesCount()
Returns a number of request attributes. The request attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Returns:
- number of request attributes.
-
getRequestAttributeName
java.lang.String getRequestAttributeName(int index)
Returns requst attribute name- Parameters:
index- an index in the attribute collection- Returns:
- requst attribute name
-
getRequestAttribute
java.lang.Object getRequestAttribute(int index)
Returns requst attribute- Parameters:
index- an index in the attribute collection- Returns:
- request attribute
-
getSessionAttributesCount
int getSessionAttributesCount()
Returns a number of session attributes. The session attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Returns:
- number of session attributes.
-
getSessionAttributeName
java.lang.String getSessionAttributeName(int i)
Returns session attribute name- Parameters:
i- an index in the attribute collection- Returns:
- session attribute name
-
getSessionAttribute
java.lang.Object getSessionAttribute(int i)
Returns session attribute- Parameters:
i- an index in the attribute collection- Returns:
- session attribute
-
setNativeSessionAttribute
void setNativeSessionAttribute(java.lang.String nativeName, java.lang.Object nativeValue)This method sets the value of a Session Attribute without using namespace in Session variable.- Parameters:
nativeName- AStringwhich identifies the name of the attribute.nativeValue- AnObjectrepresenting the value of a named attribute. If used in namespaced mode, the native value should containes the namespace encoding, that can be loaded byLRUHashList.load(String)- Since:
- MicroStrategy Web 8.0.2
-
getBinaryMarkup
MarkupOutput getBinaryMarkup()
Returns markup outut stored at the sendBinaryContent method. If this method returns not null the content of markup output must be displayed.- Returns:
- binary markup output
-
addRequestHeader
void addRequestHeader(java.lang.String name, java.lang.String value)Adds request header to the internal collection- Parameters:
name- header namevalue- header value
-
addCookieToRequest
void addCookieToRequest(java.lang.String nativeCookieName, java.lang.String nativeCookieValue)Adds request cookie to the internal collection This method is used by non-J2EE environment to add cookies to MicroStrategy Web application.- Parameters:
nativeCookieName- The native cookie name used in browsernativeCookieValue- The native cookie value stored in browser
-
getContentType
java.lang.String getContentType()
Returns response content type- Returns:
- response content type
-
getResponseHeadersCount
int getResponseHeadersCount()
Returns number of response headers- Returns:
- number of response headers
-
getResponseHeaderName
java.lang.String getResponseHeaderName(int index)
Returns response header name- Parameters:
index- an index in the collection- Returns:
- response header name
-
getResponseHeaderValue
java.lang.String getResponseHeaderValue(int index)
Returns response header value- Parameters:
index- an index in the collection- Returns:
- response header value
-
handleMultipartRequest
void handleMultipartRequest(byte[] request) throws java.io.IOExceptionThis method shall be called if the request type is multipart/form-data- Parameters:
request- a byte array containing entire HTTP request- Throws:
java.io.IOException
-
getGlobalContext
AppGlobalContext getGlobalContext()
Returns the global context held by this services.- Returns:
- an AppGlobalContext. If there has no AppGlobalContext been set to
this object,
nulllwill be returned.
-
setGlobalContext
void setGlobalContext(AppGlobalContext globalContext)
Sets current application global context.- Parameters:
globalContext- is anAppGlobalContextobject.
-
getApplicationAttributesCount
int getApplicationAttributesCount()
Returns a number of application attributes. The Application attributes is a read-writy collection. Attributes can be replaced in it during execution. Therefore entire collection shall be copied in and out of disconnected container services.- Returns:
- number of Application attributes.
-
getApplicationAttributeName
java.lang.String getApplicationAttributeName(int index)
Returns application attribute name- Parameters:
index- an index in the attribute collection- Returns:
- application attribute name
-
getApplicationAttribute
java.lang.Object getApplicationAttribute(int index)
Returns application attribute- Parameters:
index- an index in the attribute collection- Returns:
- application attribute
-
getErrorCode
int getErrorCode()
Returns the error status code for response.- Returns:
- The error status code. We reuse HTTP status code "OK" (200) to mean no error.
- See Also:
ContainerServices.sendError(int),ContainerServices.sendError(int, String)
-
getErrorMessage
java.lang.String getErrorMessage()
Returns the error message for response.- Returns:
- The error message. If no error message, empty string will be returned.
- See Also:
ContainerServices.sendError(int),ContainerServices.sendError(int, String)
-
addServerVariable
void addServerVariable(java.lang.String name, java.lang.String value)Adds a server variable with a single value. If the server variable already exists, appends the new value- Parameters:
name- the name of the server variable.value- the value of the server variable.- Since:
- MicroStrategy Web 7.5.4
-
addServerVariable
void addServerVariable(java.lang.String name, java.lang.String[] values)Appends a collection of string values of the specified server variable. If the server variable already exists, appends the new values.- Parameters:
name- the name of the server variable.values- an array of string values of the server variable.- Since:
- MicroStrategy Web 7.5.4
-
setRequestSecure
void setRequestSecure(boolean value)
Sets a boolean indicating whether this request was made using a secure channel, such as HTTPS- Since:
- MicroStrategy Web 9.0.0
-
getCreateNewSessionValue
boolean getCreateNewSessionValue()
Gets a boolean value indicating whether create a new http session
-
setCreateNewSessionValue
void setCreateNewSessionValue(boolean value)
Sets a boolean indicating whether create a new http session
-
-