Package com.wowza.wms.transport.media
Class MediaTransportConfigurationGoogleCloud
- Object
-
- com.wowza.wms.transport.media.MediaTransportConfigurationBase
-
- com.wowza.wms.transport.media.MediaTransportConfigurationGoogleCloud
-
- All Implemented Interfaces:
IMediaTransportProviderConfiguration
public class MediaTransportConfigurationGoogleCloud extends com.wowza.wms.transport.media.MediaTransportConfigurationBase
This is a base configuration object for Google Cloud Storage for the MediaTransport System //Example use//Create a main transport object MediaTransport transport = new MediaTransport(); //Create an Amazon Transport Provider MediaTransportProviderGoogleCloud googleTransport = new MediaTransportProviderGoogleCloud(); //Create an Amazon Configuration Object MediaTransportConfigurationGoogleCloud googleConfig = new MediaTransportConfigurationGoogleCloud(); //Configure the Amazon object with the required parameters googleConfig.setAttributeString(MediaTransportConfigurationGoogleCloud.GC_CONFIG_BUCKET, this.bucketName); googleConfig.setAttributeString(MediaTransportConfigurationGoogleCloud.GC_CONFIG_SECRETACCESSKEY, this.secretKey); googleConfig.setAttributeString(MediaTransportConfigurationGoogleCloud.GC_CONFIG_SERVICEID, this.serviceID); googleConfig.setAttributeString(MediaTransportConfigurationGoogleCloud.GC_CONFIG_PROJECT_ID, this.projectID); //Add the configuration item to the provider googleTransport.setTransportProviderConfiguration(googleConfig); //Set the type of processing to occur, the default is ASYNC, set to SYNC //Async will use a thread pool to handle transports, SYNC will block and do them in the order //they are provided googleTransport.setTransportProcessType(IMediaTransportProvider.TRANSPORT_PROVIDER_PROCESS_SYNC); //Initialize the provider googleTransport.init(); //Add the transport provided to the media transport system transport.addTransportProvider(googleTransport); //You can add multiple transport providers //To push a data block into the transport system the following example should be followed //Lets assume you have a byte array, say from loading a file into this array. byte[] fileBytes = getBytesFromFile(uploadFile); //Create a data object and set up various settings. MediaTransportDataObject transportDataObject = new MediaTransportDataObject(); transportDataObject.setPath("/"+filename); transportDataObject.setContentType("video/mp4"); transportDataObject.setData(fileBytes); transportDataObject.setCommand("PUT"); //Put the object into the transport system trasnport.addTransportDataObject(transportDataObject); // There are several listeners you can use to determine if the transport provider was added // and the return status of the object presented to the system.
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description MediaTransportConfigurationGoogleCloud()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.HashMap<String,String>
getTransportHeaderOutput(java.util.HashMap<String,byte[]> dynamictransportinformation, IMediaTransportObject transportObject)
This should be called by the transport provider using this configuration item.java.util.HashMap<String,String>
getTransportHeaderOutputJSON(java.util.HashMap<String,byte[]> dynamictransportinformation, IMediaTransportObject transportObject)
void
init()
Initialise the provider configuration.-
Methods inherited from class com.wowza.wms.transport.media.MediaTransportConfigurationBase
addCustomHeader, getAttributeBoolean, getAttributeInt, getAttributeLong, getAttributeNames, getAttributeString, getAttributeString, getConfigurationName, getCustomHeaders, getDebug, getProperties, httpDateHeader, isReady, removeCustomHeader, setAttributeBoolean, setAttributeInt, setAttributeLong, setAttributeString, setConfigurationName, setDebug, setIsReady, setProperties
-
-
-
-
Field Detail
-
GC_SERVICE_SCOPE_READ_ONLY
public static final String GC_SERVICE_SCOPE_READ_ONLY
- See Also:
- Constant Field Values
-
GC_SERVICE_SCOPE_READ_WRITE
public static final String GC_SERVICE_SCOPE_READ_WRITE
- See Also:
- Constant Field Values
-
GC_SERVICE_SCOPE_FULL_CONTROL
public static final String GC_SERVICE_SCOPE_FULL_CONTROL
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_STORAGE_CLASS_MULTIREGIONAL
public static final String GC_OBJECT_SERVICE_STORAGE_CLASS_MULTIREGIONAL
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_STORAGE_CLASS_REGIONAL
public static final String GC_OBJECT_SERVICE_STORAGE_CLASS_REGIONAL
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_STORAGE_CLASS_NEARLINE
public static final String GC_OBJECT_SERVICE_STORAGE_CLASS_NEARLINE
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_STORAGE_CLASS_COLDLINE
public static final String GC_OBJECT_SERVICE_STORAGE_CLASS_COLDLINE
- See Also:
- Constant Field Values
-
GC_SERVICE_AUTHENTICATION_JSON_SECRET
public static final String GC_SERVICE_AUTHENTICATION_JSON_SECRET
- See Also:
- Constant Field Values
-
GC_SERVICE_AUTHENTICATION_PKCS12
public static final String GC_SERVICE_AUTHENTICATION_PKCS12
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_PRIVATE
public static final String GC_OBJECT_SERVICE_ACL_PRIVATE
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_BUCKET_OWNER_READ
public static final String GC_OBJECT_SERVICE_ACL_BUCKET_OWNER_READ
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_BUCKET_OWNER_FULL_CONTROL
public static final String GC_OBJECT_SERVICE_ACL_BUCKET_OWNER_FULL_CONTROL
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_PROJECT_PRIVATE
public static final String GC_OBJECT_SERVICE_ACL_PROJECT_PRIVATE
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_AUTHENTICATED_READ
public static final String GC_OBJECT_SERVICE_ACL_AUTHENTICATED_READ
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_PUBLIC_READ
public static final String GC_OBJECT_SERVICE_ACL_PUBLIC_READ
- See Also:
- Constant Field Values
-
GC_OBJECT_SERVICE_ACL_PUBLIC_READ_WRITE
public static final String GC_OBJECT_SERVICE_ACL_PUBLIC_READ_WRITE
- See Also:
- Constant Field Values
-
GC_MD5_ENABLED_TRUE
public static final String GC_MD5_ENABLED_TRUE
- See Also:
- Constant Field Values
-
GC_MD5_ENABLED_FALSE
public static final String GC_MD5_ENABLED_FALSE
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_STORAGE_CLASS
public static final String GC_OBJECT_HEADER_STORAGE_CLASS
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_ACCESS_LIST
public static final String GC_OBJECT_HEADER_ACCESS_LIST
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_COPY_SOURCE
public static final String GC_OBJECT_HEADER_COPY_SOURCE
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_META_DIRECTIVE
public static final String GC_OBJECT_HEADER_META_DIRECTIVE
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_COPY_SOURCE_IF_MATCH
public static final String GC_OBJECT_HEADER_COPY_SOURCE_IF_MATCH
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_COPY_SOURCE_IF_NONE_MATCH
public static final String GC_OBJECT_HEADER_COPY_SOURCE_IF_NONE_MATCH
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_COPY_SOURCE_IF_UNMODIFIED_SINCE
public static final String GC_OBJECT_HEADER_COPY_SOURCE_IF_UNMODIFIED_SINCE
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_COPY_SOURCE_IF_MODIFIED_SINCE
public static final String GC_OBJECT_HEADER_COPY_SOURCE_IF_MODIFIED_SINCE
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_SERVER_ENCRYPT
public static final String GC_OBJECT_HEADER_SERVER_ENCRYPT
- See Also:
- Constant Field Values
-
GC_OBJECT_HEADER_SERVER_ENCRYPT_KEY_SHA256
public static final String GC_OBJECT_HEADER_SERVER_ENCRYPT_KEY_SHA256
- See Also:
- Constant Field Values
-
GC_OBJECT_OPTION_PROJECT_ID
public static final String GC_OBJECT_OPTION_PROJECT_ID
- See Also:
- Constant Field Values
-
GC_OBJECT_OPTION_SCOPE
public static final String GC_OBJECT_OPTION_SCOPE
- See Also:
- Constant Field Values
-
GC_OBJECT_OPTION_BUCKET
public static final String GC_OBJECT_OPTION_BUCKET
- See Also:
- Constant Field Values
-
GC_OBJECT_OPTION_MD5_ENABLE
public static final String GC_OBJECT_OPTION_MD5_ENABLE
- See Also:
- Constant Field Values
-
GC_CONFIG_FULLPATH
public static final String GC_CONFIG_FULLPATH
- See Also:
- Constant Field Values
-
GC_CONFIG_DOMAIN_SUFFIX
public static final String GC_CONFIG_DOMAIN_SUFFIX
- See Also:
- Constant Field Values
-
GC_CONFIG_BUCKET
public static final String GC_CONFIG_BUCKET
- See Also:
- Constant Field Values
-
GC_CONFIG_SECRETACCESSKEY
public static final String GC_CONFIG_SECRETACCESSKEY
- See Also:
- Constant Field Values
-
GC_CONFIG_SERVICEID
public static final String GC_CONFIG_SERVICEID
- See Also:
- Constant Field Values
-
GC_CONFIG_STORAGE_CLASS
public static final String GC_CONFIG_STORAGE_CLASS
- See Also:
- Constant Field Values
-
GC_CONFIG_PROJECT_ID
public static final String GC_CONFIG_PROJECT_ID
- See Also:
- Constant Field Values
-
GC_CONFIG_AUTHENTICATION_TYPE
public static final String GC_CONFIG_AUTHENTICATION_TYPE
- See Also:
- Constant Field Values
-
GC_CONFIG_SECRETACCESS_FILE
public static final String GC_CONFIG_SECRETACCESS_FILE
- See Also:
- Constant Field Values
-
GC_CONFIG_MD5_ENABLE
public static final String GC_CONFIG_MD5_ENABLE
- See Also:
- Constant Field Values
-
GC_CONFIG_SCOPE
public static final String GC_CONFIG_SCOPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
Description copied from interface:IMediaTransportProviderConfiguration
Initialise the provider configuration. This should only be called when all appropriate attributes have been set.- Specified by:
init
in interfaceIMediaTransportProviderConfiguration
- Overrides:
init
in classcom.wowza.wms.transport.media.MediaTransportConfigurationBase
-
getTransportHeaderOutput
public java.util.HashMap<String,String> getTransportHeaderOutput(java.util.HashMap<String,byte[]> dynamictransportinformation, IMediaTransportObject transportObject)
Description copied from interface:IMediaTransportProviderConfiguration
This should be called by the transport provider using this configuration item. You can pass in two objects, one is a HashMapand the other is a IMediaTransportObject The result should be a HashMap that the transport provider can then use to process the data block being transported. - Specified by:
getTransportHeaderOutput
in interfaceIMediaTransportProviderConfiguration
- Overrides:
getTransportHeaderOutput
in classcom.wowza.wms.transport.media.MediaTransportConfigurationBase
- Returns:
- HashMap
-
getTransportHeaderOutputJSON
public java.util.HashMap<String,String> getTransportHeaderOutputJSON(java.util.HashMap<String,byte[]> dynamictransportinformation, IMediaTransportObject transportObject)
-
-