Interface IServerBridgeResponse
- 
 public interface IServerBridgeResponse
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddCookie(de.uplanet.net.http.ICookie p_cookie)Add a cookie to the response or replace a cookie in the response.voidaddDateHeader(String p_strName, long p_lDate)Adds a response header with the given name and date-value.voidaddHeader(String p_strName, String p_strValue)Adds a response header with the given name and value.booleancontainsHeader(String p_strName)Returns a boolean indicating whether the named response header has already been set.StringgetCharacterEncoding()Returns the name of the character encoding used for the body sent in this response.default CharsetgetCharset()Deprecated.UsegetCharacterEncoding()instead.default StringgetCharsetName()Deprecated.UsegetCharacterEncoding()instead.List<de.uplanet.net.http.ICookie>getCookieList()Get a reference to the internal cookie list.StringgetHeader(String p_strName)Gets the value of the response header with the given name.Collection<String>getHeaderNames()Gets the names of the headers of this response.Collection<String>getHeaders(String p_strName)Gets the values of the response header with the given name.StringgetHeaderValue(String p_strKey)Deprecated.UsegetHeader(String)instead.Map<String,String>getHeaderValueMap()Deprecated.UsegetHeaderNames()and get the values with separate class togetHeader(String).OutputStreamgetOutputStream()Get the socket output stream.intgetStatus()Get the HTTP status.WritergetWriter()Get a writer to the underlying output stream with the given charset.booleanisCommitted()Returns a boolean indicating if the response has been committed.voidreset()Clears any data that exists in the response buffer as well as the status code and headers.voidresetBuffer()Clears the content of the underlying buffer in the response without clearing headers or status code.voidsendError(int p_iStatus)Sends an error response to the client using the specified HTTP status code and clears the output buffer.voidsendError(int p_iStatus, String p_strMsg)Sends an error response to the client using the specified HTTP status code and clears the output buffer.voidsendRedirect(String p_strLocation)Sends a temporary redirect response to the client using the specified redirect location URL.voidsetCharacterEncoding(String p_strCharsetName)Sets the character encoding of the response being sent to the client.default voidsetCharset(String p_strCharsetName, Charset p_charset)Deprecated.UsesetCharacterEncoding(String)instead.voidsetDateHeader(String p_strName, long p_lDate)Sets a response header with the given name and date-value.voidsetHeader(String p_strName, String p_strValue)Sets a response header with the given name and value.voidsetHeaderValue(String p_strKey, String p_strValue)Deprecated.UsesetHeader(String, String)instead.voidsetStatus(int p_iStatus)Set the HTTP status and message.
 
- 
- 
- 
Method Detail- 
setStatusvoid setStatus(int p_iStatus) Set the HTTP status and message.- Parameters:
- p_iStatus- The HTTP status code.
 
 - 
getStatusint getStatus() Get the HTTP status.- Returns:
- The HTTP status.
 
 - 
sendErrorvoid sendError(int p_iStatus) throws IOExceptionSends an error response to the client using the specified HTTP status code and clears the output buffer.- Parameters:
- p_iStatus- The HTTP status code.
- Throws:
- IOException- If an I/O error occurs.
- See Also:
- HttpServletResponse.sendError(int)
 
 - 
sendErrorvoid sendError(int p_iStatus, String p_strMsg) throws IOExceptionSends an error response to the client using the specified HTTP status code and clears the output buffer.For more information see HttpServletResponse.sendError(int, String)- Parameters:
- p_iStatus- The HTTP status code.
- p_strMsg- The message to be be included in the error page.
- Throws:
- IOException- If an I/O error occurs.
- See Also:
- HttpServletResponse.sendError(int, String)
 
 - 
sendRedirectvoid sendRedirect(String p_strLocation) throws IOException Sends a temporary redirect response to the client using the specified redirect location URL. This method can accept relative URLs; the servlet container must convert the relative URL to an absolute URL before sending the response to the client. If the location is relative without a leading '/' the container interprets it as relative to the current request URI. If the location is relative with a leading '/' the container interprets it as relative to the servlet container root.- Parameters:
- p_strLocation- The redirect location URL.
- Throws:
- IOException- If an I/O error occurred.
- IllegalStateException- If the response was committed or if a partial URL is given and cannot be converted into a valid URL
 
 - 
isCommittedboolean isCommitted() Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.- Returns:
- A boolean indicating if the response has been committed.
- See Also:
- resetBuffer(),- reset()
 
 - 
resetBuffervoid resetBuffer() Clears the content of the underlying buffer in the response without clearing headers or status code. If the response has been committed, this method throws anIllegalStateException.- Throws:
- IllegalStateException- If the response has already been committed.
- See Also:
- isCommitted()
 
 - 
resetvoid reset() Clears any data that exists in the response buffer as well as the status code and headers. Possibly set ignore-write flags on output streams are also reset tofalse.If the response has been committed, this method throws an IllegalStateException.- Throws:
- IllegalStateException- If the response has already been committed.
- See Also:
- isCommitted()
 
 - 
setHeaderValue@Deprecated void setHeaderValue(String p_strKey, String p_strValue) Deprecated.UsesetHeader(String, String)instead.Set one name-value pair into the header map.- Parameters:
- p_strKey- The header key.
- p_strValue- The header value.
 
 - 
getHeaderValue@Deprecated String getHeaderValue(String p_strKey) Deprecated.UsegetHeader(String)instead.Get a header info value to a specified key.- Parameters:
- p_strKey- The header info key.
- Returns:
- The header value.
 
 - 
getHeaderValueMap@Deprecated Map<String,String> getHeaderValueMap() Deprecated.UsegetHeaderNames()and get the values with separate class togetHeader(String).Get an unmodifiable reference to the internal header map.Note: This method is for internal use only. It must not be used in scripts. - Returns:
- An unmodifiable header map.
 
 - 
containsHeaderboolean containsHeader(String p_strName) Returns a boolean indicating whether the named response header has already been set.- Parameters:
- p_strName- The header name.
- Returns:
- trueif the named response header has already been set, or- falseotherwise.
- Since:
- Intrexx 9.5.
 
 - 
getHeadersCollection<String> getHeaders(String p_strName) Gets the values of the response header with the given name.This method considers only response headers set or added via setHeader(String, String),addHeader(String, String),setDateHeader(String, long),addDateHeader(String, long), respectively.Any changes to the returned Collectiondo not affect thisHttpServletResponse.- Parameters:
- p_strName- The name of the response header whose values to return.
- Returns:
- A (possibly empty) Collectionof the values of the response header with the given name.
- Since:
- Intrexx 9.5.
 
 - 
getHeaderNamesCollection<String> getHeaderNames() Gets the names of the headers of this response.This method considers only response headers set or added via setHeader(String, String),addHeader(String, String),setDateHeader(String, long),addDateHeader(String, long), respectively.Any changes to the returned Collectiondo not affect thisHttpServletResponse.- Returns:
- A (possibly empty) Collectionof the names of the headers of this response.
- Since:
- Intrexx 9.5.
 
 - 
getHeaderString getHeader(String p_strName) Gets the value of the response header with the given name.If a response header with the given name exists and contains multiple values, the value that was added first will be returned. This method considers only response headers set or added via setHeader(String, String),addHeader(String, String),setDateHeader(String, long),addDateHeader(String, long), respectively.- Parameters:
- p_strName- The name of the response header whose value to return.
- Returns:
- The value of the response header with the given name,
 or nullif no header with the given name has been set on this response.
- Since:
- Intrexx 9.5.
 
 - 
setHeadervoid setHeader(String p_strName, String p_strValue) Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one. ThecontainsHeader(String)method can be used to test for the presence of a header before setting its value.- Parameters:
- p_strName- The name of the header.
- p_strValue- The header value If it contains octet string, it should be encoded according to RFC 2047.
- Since:
- Intrexx 9.5.
- See Also:
- containsHeader(String),- addHeader(String, String)
 
 - 
addHeadervoid addHeader(String p_strName, String p_strValue) Adds a response header with the given name and value. This method allows response headers to have multiple values.- Parameters:
- p_strName- The name of the header.
- p_strValue- The header value If it contains octet string, it should be encoded according to RFC 2047.
- Since:
- Intrexx 9.5.
- See Also:
- setHeader(String, String)
 
 - 
setDateHeadervoid setDateHeader(String p_strName, long p_lDate) Sets a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. If the header had already been set, the new value overwrites the previous one. ThecontainsHeader(String)method can be used to test for the presence of a header before setting its value.- Parameters:
- p_strName- The name of the header.
- p_lDate- The assigned date value.
- Since:
- Intrexx 9.5.
- See Also:
- containsHeader(String),- addDateHeader(String, long)
 
 - 
addDateHeadervoid addDateHeader(String p_strName, long p_lDate) Adds a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. This method allows response headers to have multiple values.- Parameters:
- p_strName- The name of the header.
- p_lDate- The additional date value.
- Since:
- Intrexx 9.5.
- See Also:
- setDateHeader(String, long)
 
 - 
addCookievoid addCookie(de.uplanet.net.http.ICookie p_cookie) Add a cookie to the response or replace a cookie in the response.An already existing cookie is being replaced if it is considered equal according to RFC 2965, 3.3.3, ie. - it comes from same domain (case-insensitive),
- has the same name (case-insensitive),
- and has the same path (case-sensitive).
 - Parameters:
- p_cookie- The cookie to be added.
 
 - 
getCookieListList<de.uplanet.net.http.ICookie> getCookieList() Get a reference to the internal cookie list.Note: This method is for internal use only. It must not be used in scripts. - Returns:
- The cookie list.
 
 - 
getOutputStreamOutputStream getOutputStream() throws IOException Get the socket output stream.- Returns:
- The socket output stream.
- Throws:
- IOException
 
 - 
getWriterWriter getWriter() throws IOException Get a writer to the underlying output stream with the given charset.- Returns:
- The writer.
- Throws:
- IOException
 
 - 
setCharacterEncodingvoid setCharacterEncoding(String p_strCharsetName) Sets the character encoding of the response being sent to the client.- Parameters:
- p_strCharsetName- The name of the character encoding to be set.
 
 - 
getCharacterEncodingString getCharacterEncoding() Returns the name of the character encoding used for the body sent in this response.- Returns:
- The name of the character encoding
 
 - 
getCharsetName@Deprecated default String getCharsetName() Deprecated.UsegetCharacterEncoding()instead.Get this response charset's name.- Returns:
- The charset.
 
 - 
getCharset@Deprecated default Charset getCharset() Deprecated.UsegetCharacterEncoding()instead.Get this response's charset.- Returns:
- The charset.
 
 - 
setCharset@Deprecated default void setCharset(String p_strCharsetName, Charset p_charset) Deprecated.UsesetCharacterEncoding(String)instead.
 
- 
 
-