Interface IMediaTransportDataObject


public interface IMediaTransportDataObject
IMediaTransportDataObject This object is used by the MediaTransport sub system and should contain a command ( used by the appropriate transport provider ), content-type, path and a byte[] array of the data to transport.
  • Method Details

    • init

      void init()
      This initialises the object. IT MUST create a UUID for the object upon initialisation and MUST be a string. It is up to the individual implementation to determine the format however MUST have a low chance of conflict for the period of use of the specific object.
    • getUUID

      String getUUID()
      Return the UUID created when the object was initialised.
      Returns:
      String
    • setContentType

      void setContentType(String contentType)
      Set the content type of the object. This should be a known MIME type that can be understood by the destination for the transport provider being used.
      Parameters:
      String -
    • setCommand

      void setCommand(String command)
      This is the command the object needs to use to execute transport within the transport provider. A default provider available is a HTTP provider so common commands would be GET, PUT, POST, DELETE This is implementation independent so can be anything the provider can understand.
      Parameters:
      String -
    • setData

      void setData(byte[] data)
      This sets the data body of the object and must be a byte array.
      Parameters:
      byte - []
    • setPath

      void setPath(String path)
      This sets the destination path of the object. This will be used by the transport provider. A common path could be /sample.mp4 which would indicate the data set should be stored as sample.mp4 in the root of the transport provider destination.
      Parameters:
      String -
    • getData

      byte[] getData()
      Get the data body set
      Returns:
      byte[]
    • getPath

      String getPath()
      Get the path set
      Returns:
      String
    • getContentType

      String getContentType()
      Get the content type set.
      Returns:
      String
    • getCommand

      String getCommand()
      Get the command set
      Returns:
      String
    • setOption

      void setOption(String name, String value)
      Set an option for this object. The option name set would be used by a transport provider when transporting this object.
      Parameters:
      String -
      String -
    • getOption

      String getOption(String name)
      Get an option for this object. If the option named does not exist it should return null.
      Parameters:
      String -
      Returns:
      String
    • getOptions

      HashMap<String,String> getOptions()
      Get the map of options set for this object.
      Returns:
      HashMap<String,String>
    • setHeader

      void setHeader(String name, String value)
    • getHeader

      String getHeader(String name)
    • getHeaders

      HashMap<String,String> getHeaders()
    • getCacheControl

      String getCacheControl()
    • setCacheControl

      void setCacheControl(String cacheControl)