Package com.wowza.wms.mediacache.impl
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 Summary
Modifier and TypeMethodDescriptionvoid
addProperties
(WMSProperties properties) Add properties to this specific factory, these could be passed fromCreate a HTTP byte reader suited to this factory.void
destroyInstance
(IMediaCacheHTTPByteReader instance) Destroy the HTTP Byte reader associated with this factory implementationint
Get the current connection timeout set.Get the Media Cache item associated with this instance.int
getPort()
Get the port to be used for connecting to the remote source.int
Get the retries set for this instanceint
Get the current read time out set.int
Get the receive buffer size set.int
Get the send buffer size set.void
init()
Initialize the HTTP Reader Factory.boolean
Set if the request should contain the full URL.void
setConnectionTimeout
(int connectionTimeout) Set the connection timeout, milliseconds.void
setDestinationAddress
(String host, int port) Set the destination host and port where to retrieve data.void
setMediaCacheItem
(IMediaCacheItem mediaCacheItem) Set the Media Cache item associated to this instance.void
setPort
(int port) Set the port to be used for connecting to the remote source.void
setProxyAddress
(String host, int port) Set the proxy host and port.void
setReadRetries
(int readRetries) Set the maximum number retries.void
setReadTimeout
(int readTimeout) Set the read timeout for data, milliseconds.void
setReceiveBufferSize
(int receiveBufferSize) Set the receive buffer size, byte size.void
setRequestFullURL
(boolean requestFullURL) Flag to set if a full URL is required as part of the head/read request.void
setSendBufferSize
(int sendBufferSize) Set the send buffer size, byte size.
-
Method Details
-
init
void init()Initialize the HTTP Reader Factory. -
addProperties
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 interfacecom.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
- Returns:
- IMediaCacheHTTPByteReader
-
destroyInstance
Destroy the HTTP Byte reader associated with this factory implementation- Specified by:
destroyInstance
in interfacecom.wowza.util.IGenericPoolFactory<IMediaCacheHTTPByteReader>
- Parameters:
IMediaCacheHTTPByteReader
- instance
-
setMediaCacheItem
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
Set the destination host and port where to retrieve data. It is up to the specific implementation to use these or not.- Parameters:
String
- hostint
- port
-
setProxyAddress
Set the proxy host and port. It is up to the specific byte reader implementation to implement support for proxy connections.- Parameters:
String
- hostint
- 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
-
-