org.eclnt.jsfserver.bufferedcontent

## Interface IBufferedContent

- All Superinterfaces:
    java.io.Serializable
  All Known Implementing Classes:
    DefaultBufferedContent, LogViewer.MyBufferedContent

      public interface IBufferedContent
      extends java.io.Serializable

  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 `IBufferedStreamContent` interface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beginGetting()` Called directly before accessing the content.
    `void` | `endGetting()` Called directly after accessing the content.
    `byte[]` | `getContent()` The content that is downloaded.
    `long` | `getContentLength()` Explicit implementation of this method is not required by default, it is covered by the default implementation `DefaultBufferedContent`.
    `java.lang.String` | `getContentType()` Content type of download.
    `java.lang.String` | `getFileName()` File name for download, which is set within the http header response parameters.
    `java.lang.String` | `getId()` Get unique id of this instance.
    `java.lang.String` | `getURL()` URL that can be passed to the client side component.
    `java.lang.String` | `getURLForBROWSERUsage()` Deprecated.
    `void` | `passClientFileName(java.lang.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` | `passCurrentRequestQueryString(java.lang.String value)` In case the buffered content is accessed from the client side then the query string of the access is passed.
    `void` | `passCurrentRequestURL(java.lang.String url)` In case the buffered content is accessed from the client side then the URL of the access is passed.
    `void` | `preProcessResponse(HttpServletResponse response)` This methods is called at the very beginning of the response processing.

- - ### Method Detail

    - #### getId

          java.lang.String getId()

      Get unique id of this instance. The instance is registered with this id within the `BufferedContentMgr`.

    - #### getContentLength

          long getContentLength()

      Explicit implementation of this method is not required by default, it is covered by the default implementation `DefaultBufferedContent`.

    - #### preProcessResponse

          void preProcessResponse(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

          void passClientFileName(java.lang.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. The method is called BEFORE `getContent()` or `getContentType()` is called when a download is processed.

    - #### passCurrentRequestURL

          void passCurrentRequestURL(java.lang.String url)

      In case the buffered content is accessed from the client side then the URL of the access is passed. The method is called BEFORE `getContent()` or `getContentType()` is called when a download is processed.

    - #### passCurrentRequestQueryString

          void passCurrentRequestQueryString(java.lang.String value)

      In case the buffered content is accessed from the client side then the query string of the access is passed. The method is called BEFORE `getContent()` or `getContentType()` 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

          java.lang.String getContentType()

      Content type of download. In case

    - #### getURL

          java.lang.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 use `getURLForBROWSERUsage()`

    - #### getURLForBROWSERUsage

          @Deprecated
          java.lang.String getURLForBROWSERUsage()

      Deprecated.
      Deprecated - the RISC client does not support embedded mode. Use normal `getURL()` 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

          java.lang.String getFileName()

      File name for download, which is set within the http header response parameters. Only is used in the context of browser processing.

Copyright © CaptainCasa Gmbh. All Rights Reserved.