Class ServerServicesInterceptorResponseWrapper
java.lang.Object
com.esri.arcgis.enterprise.interceptor.server.ServerServicesInterceptorResponseWrapper
- All Implemented Interfaces:
IInterceptorResponse
public class ServerServicesInterceptorResponseWrapper
extends Object
implements IInterceptorResponse
-
Constructor Summary
ConstructorsConstructorDescriptionServerServicesInterceptorResponseWrapper
(IInterceptorResponse interceptorResponse) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a response header with the given name and value.void
Forces any content in the buffer to be written to the client.Returns the name of the character encodingReturns a String that indicates the content-type of the responseReturns the value of the specified request header as a StringGets the names of the headers of this response.getHeaders
(String name) Gets the values of the response header with the given name.jakarta.servlet.ServletOutputStream
Returns a ServletOutputStream suitable for writing binary data in the response.Returns a PrintWriter object that can send character text to the client.boolean
Returns a boolean indicating if the response has been committed.void
reset()
Clears any data that exists in the buffer as well as the status code and headers.void
sendError
(int sc) Sends an error response to the client using the specified status code and clears the buffer.void
Sends an error response to the client using the specified status code and clears the buffer.void
setCharacterEncoding
(String var1) Sets the character encoding of the response being sent to the client.void
Sets a response header with the given name and value.void
setStatus
(int sc) Sets the status code for this response.
-
Constructor Details
-
ServerServicesInterceptorResponseWrapper
-
-
Method Details
-
sendError
Description copied from interface:IInterceptorResponse
Sends an error response to the client using the specified status code and clears the buffer.- Specified by:
sendError
in interfaceIInterceptorResponse
- Parameters:
sc
- - the error status codemsg
- - the descriptive message- Throws:
IOException
- If an input or output exception occurs
-
sendError
Description copied from interface:IInterceptorResponse
Sends an error response to the client using the specified status code and clears the buffer.- Specified by:
sendError
in interfaceIInterceptorResponse
- Parameters:
sc
- - the error status code- Throws:
IOException
- If an input or output exception occurs
-
setHeader
Description copied from interface:IInterceptorResponse
Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one.- Specified by:
setHeader
in interfaceIInterceptorResponse
- Parameters:
name
- - the name of the headervalue
- - the header value
-
addHeader
Description copied from interface:IInterceptorResponse
Adds a response header with the given name and value.- Specified by:
addHeader
in interfaceIInterceptorResponse
- Parameters:
name
- - the name of the headervalue
- - the additional header value
-
setStatus
Description copied from interface:IInterceptorResponse
Sets the status code for this response.- Specified by:
setStatus
in interfaceIInterceptorResponse
- Parameters:
sc
- - the status code
-
getHeader
Description copied from interface:IInterceptorResponse
Returns the value of the specified request header as a String- Specified by:
getHeader
in interfaceIInterceptorResponse
- Parameters:
name
- - the name of the response header whose value to return- Returns:
- the value of the response header with the given name, or null if no header with the given name has been set on this response
-
getHeaders
Description copied from interface:IInterceptorResponse
Gets the values of the response header with the given name.- Specified by:
getHeaders
in interfaceIInterceptorResponse
- Parameters:
name
- - the name of the response header whose values to return- Returns:
- a Collection of the values of the response header with the given name
-
getHeaderNames
Description copied from interface:IInterceptorResponse
Gets the names of the headers of this response.- Specified by:
getHeaderNames
in interfaceIInterceptorResponse
- Returns:
- a Collection of the names of the headers of this response
-
getOutputStream
Description copied from interface:IInterceptorResponse
Returns a ServletOutputStream suitable for writing binary data in the response.- Specified by:
getOutputStream
in interfaceIInterceptorResponse
- Returns:
- a ServletOutputStream for writing binary data
- Throws:
IOException
- if the getWriter method has been called on this response
-
getWriter
Description copied from interface:IInterceptorResponse
Returns a PrintWriter object that can send character text to the client.- Specified by:
getWriter
in interfaceIInterceptorResponse
- Returns:
- a PrintWriter object that can return character data to the client
- Throws:
IOException
- if an input or output exception occurred
-
flushBuffer
Description copied from interface:IInterceptorResponse
Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.- Specified by:
flushBuffer
in interfaceIInterceptorResponse
- Throws:
IOException
-
reset
Description copied from interface:IInterceptorResponse
Clears any data that exists in the buffer as well as the status code and headers.- Specified by:
reset
in interfaceIInterceptorResponse
-
setCharacterEncoding
Description copied from interface:IInterceptorResponse
Sets the character encoding of the response being sent to the client.- Specified by:
setCharacterEncoding
in interfaceIInterceptorResponse
- Parameters:
var1
- - a String specifying only the character
-
getCharacterEncoding
Description copied from interface:IInterceptorResponse
Returns the name of the character encoding- Specified by:
getCharacterEncoding
in interfaceIInterceptorResponse
-
isCommitted
Description copied from interface:IInterceptorResponse
Returns a boolean indicating if the response has been committed. A committed response has already had its status code and headers written.- Specified by:
isCommitted
in interfaceIInterceptorResponse
- Returns:
- a boolean indicating if the response has been committed
-
getContentType
Description copied from interface:IInterceptorResponse
Returns a String that indicates the content-type of the response- Specified by:
getContentType
in interfaceIInterceptorResponse
- Returns:
- String that indicates the content-type of the response
-
getAppInterceptorResponse
-