Interface ResourceView.HasStreamSettings

All Known Subinterfaces:
ClasspathResource, FileResource, FileStorageResource, StreamResource
All Known Implementing Classes:
AbstractStreamSettingsResource, ClasspathResourceImpl, FileResourceImpl, FileStorageResourceImpl, StreamResourceImpl
Enclosing interface:
ResourceView

public static interface ResourceView.HasStreamSettings
Marker interface to indicate that the implementing class has stream settings (such as cache time, buffer size or file name).
  • Method Details

    • setCacheTime

      @StudioProperty void setCacheTime(long cacheTime)
      Sets the length of cache expiration time.

      This gives the adapter the possibility cache streams sent to the client. The caching may be made in adapter or at the client if the client supports caching. Zero or negative value disables the caching of this stream.

      Parameters:
      cacheTime - the cache time in milliseconds
    • getCacheTime

      long getCacheTime()
      Returns:
      resource cache time
    • setBufferSize

      @StudioProperty void setBufferSize(int bufferSize)
      Sets the size of the download buffer used for this resource.
      Parameters:
      bufferSize - the size of the buffer in bytes
    • getBufferSize

      int getBufferSize()
      Returns:
      buffer size
    • setFileName

      void setFileName(String fileName)
      Sets the filename.
      Parameters:
      fileName - the filename to set
    • getFileName

      @Nullable String getFileName()
      Returns:
      resource file name