Interface IBufferedContent
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultBufferedContent
,LogViewer.MyBufferedContent
Interface to provide buffered content as URL, e.g. for download purposes. The
content is provided as byte[]-array - this means it needs to be built up
within the server side memory as a whole on request. In case this causes
problems use
Instances of IBufferedContent need to be register in BufferedContentMgr using the method
IBufferedStreamContent
interface. Instances of IBufferedContent need to be register in BufferedContentMgr using the method
BufferedContentMgr.add(IBufferedContent)
to be active.
Vice versa they can be de-registered when no longer used by calling method
BufferedContentMgr.remove(IBufferedContent)
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called directly before accessing the content.void
Called directly after accessing the content.byte[]
The content that is downloaded.long
Explicit implementation of this method is not required by default, it is covered by the default implementationDefaultBufferedContent
.Content type of download.File name for download, which is set within the http header response parameters.getId()
Get unique id of this instance.getURL()
URL that can be passed to the client side component.Deprecated.void
passClientFileName
(String clientFileName) If the access to the buffered content is associated with the download to a client file then the name of the file is passed through this method.void
In case the buffered content is accessed from the client side then the query string of the access is passed.void
In case the buffered content is accessed from the client side then the URL of the access is passed.void
preProcessResponse
(javax.servlet.http.HttpServletResponse response) This methods is called at the very beginning of the response processing.
-
Method Details
-
getId
String getId()Get unique id of this instance. The instance is registered with this id within theBufferedContentMgr
. -
getContentLength
long getContentLength()Explicit implementation of this method is not required by default, it is covered by the default implementationDefaultBufferedContent
. -
preProcessResponse
void preProcessResponse(javax.servlet.http.HttpServletResponse response) This methods is called at the very beginning of the response processing. It allows to e.g. set http-header parameters within the response. -
passClientFileName
If the access to the buffered content is associated with the download to a client file then the name of the file is passed through this method. The method is called BEFOREgetContent()
orgetContentType()
is called when a download is processed. -
passCurrentRequestURL
In case the buffered content is accessed from the client side then the URL of the access is passed. The method is called BEFOREgetContent()
orgetContentType()
is called when a download is processed. -
passCurrentRequestQueryString
In case the buffered content is accessed from the client side then the query string of the access is passed. The method is called BEFOREgetContent()
orgetContentType()
is called when a download is processed. -
beginGetting
void beginGetting()Called directly before accessing the content. -
endGetting
void endGetting()Called directly after accessing the content. -
getContent
byte[] getContent()The content that is downloaded. -
getContentType
String getContentType()Content type of download. -
getURL
String getURL()URL that can be passed to the client side component. In case of using the URL to be used within the BROWSER component you should usegetURLForBROWSERUsage()
-
getURLForBROWSERUsage
Deprecated.Deprecated - the RISC client does not support embedded mode. Use normalgetURL()
method.
URL that can be passed into the BROWSER component. Background: CaptainCasa Enterprise Client can be run in embedded usage mode. In this case Tomcat is directly running inside the client - and not opening any http socket at all. In this case the URL that is passed back is a "file:///"-URL, instead of a normal "http(s)://"-URL. -
getFileName
String getFileName()File name for download, which is set within the http header response parameters. Only is used in the context of browser processing.
-