Interface IMediaCacheItemHTTPReaderFactory

  • All Superinterfaces:
    com.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
    All Known Subinterfaces:
    IMediaCacheItemHTTPReaderFactory2

    public interface IMediaCacheItemHTTPReaderFactory
    extends com.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
    Interface for HTTP byte reader factory implementations
    
    You need to have a IMediaCacehHTTPByteReader implementation available to use with your factory implementation.
    
    In order to make implementation simpler and safer you should extend the factory base with
    
    MediaCacheItemHTTPCustomFactory extends MediaCacheItemHTTPReaderFactoryBase
    
    To use your own implementation you should add the following property to the HTTP media cache source entry
    
    <Property>
    <Name>httpReaderFactoryClass</Name>
    <Value>com.wowza.streamschool.mediacache.ExampleHTTPReaderFactory</Value>
    <Type>String</Type>
    </Property>
    
    The value points to the class name of your implementation.
     
    • Method Detail

      • init

        void init()
        Initialize the HTTP Reader Factory.
      • addProperties

        void addProperties​(WMSProperties properties)
        Add properties to this specific factory, these could be passed from
        Parameters:
        WMSProperties - properties
      • createInstance

        IMediaCacheHTTPByteReader createInstance()
        Create a HTTP byte reader suited to this factory.
        Specified by:
        createInstance in interface com.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
        Returns:
        IMediaCacheHTTPByteReader
      • destroyInstance

        void destroyInstance​(IMediaCacheHTTPByteReader instance)
        Destroy the HTTP Byte reader associated with this factory implementation
        Specified by:
        destroyInstance in interface com.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
        Parameters:
        IMediaCacheHTTPByteReader - instance
      • setMediaCacheItem

        void setMediaCacheItem​(IMediaCacheItem mediaCacheItem)
        Set the Media Cache item associated to this instance.
        Parameters:
        IMediaCacheItem - mediaCacheItem
      • getMediaCacheItem

        IMediaCacheItem getMediaCacheItem()
        Get the Media Cache item associated with this instance.
        Returns:
        IMediaCacheItem
      • setDestinationAddress

        void setDestinationAddress​(String host,
                                   int port)
        Set the destination host and port where to retrieve data. It is up to the specific implementation to use these or not.
        Parameters:
        String - host
        int - port
      • setProxyAddress

        void setProxyAddress​(String host,
                             int port)
        Set the proxy host and port. It is up to the specific byte reader implementation to implement support for proxy connections.
        Parameters:
        String - host
        int - port
      • isRequestFullURL

        boolean isRequestFullURL()
        Set if the request should contain the full URL. It is up to the specific implementation to use this.
        Returns:
        boolean
      • setRequestFullURL

        void setRequestFullURL​(boolean requestFullURL)
        Flag to set if a full URL is required as part of the head/read request.
        Parameters:
        boolean - requestFullURL
      • getReadTimeout

        int getReadTimeout()
        Get the current read time out set.
        Returns:
        int
      • setReadTimeout

        void setReadTimeout​(int readTimeout)
        Set the read timeout for data, milliseconds. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        int - readTimeout
      • getConnectionTimeout

        int getConnectionTimeout()
        Get the current connection timeout set.
        Returns:
        int
      • setConnectionTimeout

        void setConnectionTimeout​(int connectionTimeout)
        Set the connection timeout, milliseconds. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        int - connectionTimeout
      • getPort

        int getPort()
        Get the port to be used for connecting to the remote source.
        Returns:
        int
      • setPort

        void setPort​(int port)
        Set the port to be used for connecting to the remote source. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        int - port
      • getReadRetries

        int getReadRetries()
        Get the retries set for this instance
        Returns:
        int
      • setReadRetries

        void setReadRetries​(int readRetries)
        Set the maximum number retries. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        int - maxRetries
      • getSendBufferSize

        int getSendBufferSize()
        Get the send buffer size set.
        Returns:
        int
      • setSendBufferSize

        void setSendBufferSize​(int sendBufferSize)
        Set the send buffer size, byte size. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        sendBufferSize -
      • getReceiveBufferSize

        int getReceiveBufferSize()
        Get the receive buffer size set.
        Returns:
        int
      • setReceiveBufferSize

        void setReceiveBufferSize​(int receiveBufferSize)
        Set the receive buffer size, byte size. It is up to the specific byte reader implementation to use this setting.
        Parameters:
        receiveBufferSize -