Class PushPublishHTTPCupertinoAkamaiHandler
- Object
-
- com.wowza.wms.pushpublish.model.PushPublishBase
-
- com.wowza.wms.pushpublish.model.PushPublishHTTPBase
-
- com.wowza.wms.pushpublish.protocol.cupertino.PushPublishHTTPCupertino
-
- com.wowza.wms.pushpublish.protocol.cupertino.PushPublishHTTPCupertinoAkamaiHandler
-
- All Implemented Interfaces:
com.wowza.wms.pushpublish.akamai.IPushPublishAkamai
,IPushPublish
,IPushPublishHTTPGroupMember
,IPushPublishHTTPOutputBuilder
,IPushPublishHTTPCupertino
public class PushPublishHTTPCupertinoAkamaiHandler extends PushPublishHTTPCupertino implements com.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
-
Field Summary
-
Fields inherited from class com.wowza.wms.pushpublish.protocol.cupertino.PushPublishHTTPCupertino
addEndListOnDisconnect, chunkDurationTarget, CHUNKLISTNAME_AUDIOONLY, CHUNKLISTNAME_AUDIOVIDEO, CHUNKLISTNAME_KEYFRAMEONLY, CHUNKLISTNAME_VIDEOONLY, CHUNKLISTNAMES, keepMediaSegmentDataAfterSending, liveStreamPacketizerCupertino, minNumToDelete, minNumToSend, PLAYLISTNAME, pusher, RENDITION_AUDIOONLY, RENDITION_AUDIOVIDEO, RENDITION_KEYFRAMEONLY, RENDITION_SUBTITLES, RENDITION_VIDEOONLY, RENDITIONINDEX_AUDIOONLY, RENDITIONINDEX_AUDIOVIDEO, RENDITIONINDEX_COUNT, RENDITIONINDEX_KEYFRAMEONLY, RENDITIONINDEX_SUBTITLES, RENDITIONINDEX_VIDEOONLY, SUBTITLELISTNAME
-
Fields inherited from class com.wowza.wms.pushpublish.model.PushPublishHTTPBase
CACHE_CONTROL_FACTOR, CACHE_CONTROL_HEADER, CACHE_CONTROL_HEADER_KEY, CACHE_CONTROL_HEADER_NONE, CACHE_CONTROL_MEDIA_DEFAULT, httpLogManifests, httpManifestDebug, INDETERMINATE_PLAYLIST_COUNT, maxSegmentCountFromMap, maxSegmentCountFromPacketizer, MIN_PLAYLIST_COUNT, playlistAcrossSessions, playlistBaseUrl, playlistCountFromMap, playlistCountFromPacketizer, playlistCrossName, playlistDurationFromMap, playlistMap, playlistName, playlistTimeout, relativePlaylists
-
Fields inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
appInstance, className, DESTINATION_BAK, DESTINATION_PRI, DESTINATION_RED, destinationName, destinationServer, dstStreamName, entryName, hostname, inetAddr, isAdaptiveStreaming, isExternalRedundancy, logger, mImplementation, myMap, password, playbackHostname, port, profile, properties, pushPublishSession, pushPublishStreamDebug, pushPublishType, reconnectWaitTime, sendingPerformance, srcStream, srcStreamName, totalIOPerformance2Last, totalIOPerformanceLast, userName
-
Fields inherited from interface com.wowza.wms.pushpublish.model.IPushPublish
CONNECTED_STATE_CONNECTED, CONNECTED_STATE_CONNECTING, CONNECTED_STATE_NOT_CONNECTED, CONNECTED_STATE_WAITING, PUSHPUBLISH_TYPE_CUPERTINO, PUSHPUBLISH_TYPE_MPEGDASH, PUSHPUBLISH_TYPE_NOTIFY_PACKET, PUSHPUBLISH_TYPE_RTMP, PUSHPUBLISH_TYPE_RTP, PUSHPUBLISH_TYPE_RTP_BUFFERED, PUSHPUBLISH_TYPE_SANJOSE, PUSHPUBLISH_TYPE_SRT, PUSHPUBLISH_TYPE_UNKNOWN
-
Fields inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPOutputBuilder
PUSHER_ERROR_LIVEPACKETIZER_NOT_CONFIGURED, PUSHER_ERROR_RENDITIONS_MISCONFIGURED
-
-
Constructor Summary
Constructors Constructor Description PushPublishHTTPCupertinoAkamaiHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
HTTPByteWriter
createByteWriter(java.net.URI uri, int port)
int
deleteMediaSegment(MediaSegmentModel mediaSegment)
Deletes the media (chunk) at the destination URI.boolean
destroyByteWriter()
String
getAkamaiEventName()
String
getAkamaiHostId()
String
getAkamaiStreamId()
int
getChunkDurationTarget(ILiveStreamPacketizer liveStreamPacketizer)
String
getDestionationLogData()
Get a JSON formatted string of data that represents the destination to include with the connect/disconnect loggingWMSProperties
getPlaylistProperties()
String
getUserAgent()
void
init(IApplicationInstance appInstance, String streamName, IMediaStream stream, java.util.Map<String,String> profileData, java.util.Map<String,String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug)
Inits the instance.boolean
isAkamaiIngestAcceleration()
boolean
isSendToBackupServer()
Is this implementation sending to a backup servervoid
load(java.util.HashMap<String,String> dataMap)
Loads map and profile parametersboolean
outputClose()
Close the destination (if needed).boolean
outputOpen()
Open the destination (if needed) in preparation of having one or more items (playlists/media segments) pushed to itvoid
resetConnection()
int
sendGroupMasterPlaylist(String groupName, PlaylistModel playlist)
Sends a group master playlist to the destination.int
sendMasterPlaylist(PlaylistModel playlist)
Sends the master playlist to the destination.int
sendMediaPlaylist(PlaylistModel playlist)
Sends the media playlist to the destination.int
sendMediaSegment(MediaSegmentModel mediaSegment)
Sends the media (chunk) to the destination; media provided as a fragment list.void
setAkamaiEventName(String akamaiEventName)
void
setAkamaiHostId(String akamaiHostId)
void
setAkamaiIngestAcceleration(boolean akamaiIngestAcceleration)
void
setAkamaiStreamId(String akamaiStreamId)
void
setSendToBackupServer(boolean backup)
Setup to send to a backup destinationvoid
setUserAgent(String userAgent)
boolean
updateGroupMasterPlaylistPlaybackURI(String groupName, PlaylistModel masterPlaylist)
Get the group master playlist URI for the given group master playlist file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myGroup/playlist.m3u8"boolean
updateMasterPlaylistPlaybackURI(PlaylistModel playlist)
update the master playlist URI for the provided playlist model that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/playlist.m3u8" where "playlist.m3u8" is the value given for masterPlaylistFilenameboolean
updateMediaPlaylistPlaybackURI(PlaylistModel playlist)
update/set the media playlist (chunklist) URI for the provided media playlist file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/chunklist.m3u8" where "chunklist.m3u8" is the value given for mediaPlaylistFilenameboolean
updateMediaSegmentPlaybackURI(MediaSegmentModel mediaSegment)
set the media URI for the given media (chunk) file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/media_1.ts" where "media_1.ts" is the value given for mediaFilename-
Methods inherited from class com.wowza.wms.pushpublish.protocol.cupertino.PushPublishHTTPCupertino
adaptiveGroupPlaylistNeedsUpdating, addPlaylistToMasterPlaylist, addTagToPlaylist, addTagToPlaylist, createGroupPlaylist, createMasterPlaylist, createMediaPlaylist, createMediaSegmentModel, createOutputItem, createStreamInfTag, createTag, disconnect, disconnect, error, getConnectedState, getContextStr, getGroupPlaylistRenditionDescription, getHeaderSegment, getLastChunkId, getLiveStreamPacketizerCupertino, getLiveStreamPacketizerName, getMediaPlaylistForRendtion, getMediaPlaylistPlaybackURL, getMediaPlaylists, getMediaPlaylistStr, getMessagesAttemptedCount, getMessagesFailedCount, getMessagesRetriedCount, getPacketizerLock, getPlaylistCount, getRandomSessionStr, getRenditionsStr, isGroupReady, isInRedundancyPair, isRendition, loadMediaSegment, outputSend, prepareMediaPlaylist, printPlaylist, processPlaylistChunks, renditionIndexToRendition, renditionToPacketizerRendition, renditionToRenditionIndex, resetNewPacketizer, sendGroupPlaylist, setLiveStreamPacketizer, setRenditionsStr, writeTagToString
-
Methods inherited from class com.wowza.wms.pushpublish.model.PushPublishHTTPBase
getAdaptiveGroupName, getMaxSegmentCount, getPlaylistBaseUrl, getPlaylistMap, getPlaylistTimeout, isInAdaptiveGroup, isLogDebugManifest, isPlaylistAcrossSessions, isRelativePlaylists, logDebugManifest, setAdaptiveGroupName, setMaxSegmentCountFromMap, setMaxSegmentCountFromPacketizer, setPlaylistAcrossSessions, setPlaylistBaseUrl, setPlaylistCountFromMap, setPlaylistCountFromPacketizer, setPlaylistTimeout, setRelativePlaylists
-
Methods inherited from class com.wowza.wms.pushpublish.model.PushPublishBase
add, addIOPerformance2, clearLoggingValues, createPushPublishSession, getAppInstance, getBandwidth, getBaseParams, getDestinationID, getDestinationName, getDestinationServer, getDstStreamName, getEntryName, getHostname, getImplementation, getInetAddr, getMap, getMessagesOutBytes, getMessagesOutCount, getPassword, getPlaybackHostname, getPort, getProfile, getProperties, getPushPublishType, getReconnectWaitTime, getSrcStream, getSrcStreamName, getUserName, getWowzaStreamingEngineVersionStr, incrementMessagesOut, isAdaptiveStreaming, isDebugLog, isExternalRedundancy, logDebug, logError, logError, logError, logInfo, logWarn, resolveHostName, setAdaptiveStreaming, setAdaptiveStreaming, setAppInstance, setDebugLog, setDestinationName, setDestinationServer, setDestinationServer, setDstStreamName, setEntryName, setExternalRedundancy, setExternalRedundancy, setHost, setHostname, setImplementation, setInetAddr, setPassword, setPlaybackHostname, setPort, setPort, setProfile, setReconnectWaitTime, setSrcStream, setSrcStreamName, setStreamName, setUserName, updateLoggingValues, updateUsageTracker
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.wowza.wms.pushpublish.akamai.IPushPublishAkamai
getContextStr, getDstStreamName, getEntryName, getHostname, getPlaybackHostname, getSrcStreamName, isDebugLog, logDebug, logError, logError, logError, logInfo, logWarn, setDebugLog, setDstStreamName, setEntryName, setHostname, setPlaybackHostname, setSrcStreamName
-
Methods inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPGroupMember
getAdaptiveGroupName, isInAdaptiveGroup, isLogDebugManifest
-
Methods inherited from interface com.wowza.wms.pushpublish.model.IPushPublishHTTPOutputBuilder
getAppInstance, getDstStreamName, getSrcStreamName, isDebugLog
-
-
-
-
Method Detail
-
init
public void init(IApplicationInstance appInstance, String streamName, IMediaStream stream, java.util.Map<String,String> profileData, java.util.Map<String,String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug)
Description copied from class:PushPublishHTTPBase
Inits the instance.- Specified by:
init
in interfaceIPushPublish
- Overrides:
init
in classPushPublishHTTPCupertino
- Parameters:
appInstance
- the app instancestreamName
- the source stream nameprofileData
- the profile paramsmaps
- the map entry paramsstreamDebug
- stream debug flag
-
load
public void load(java.util.HashMap<String,String> dataMap)
Description copied from class:PushPublishHTTPBase
Loads map and profile parameters- Overrides:
load
in classPushPublishHTTPCupertino
- Parameters:
dataMap
- the data map
-
outputOpen
public boolean outputOpen()
Description copied from interface:IPushPublishHTTPCupertino
Open the destination (if needed) in preparation of having one or more items (playlists/media segments) pushed to it- Specified by:
outputOpen
in interfaceIPushPublishHTTPCupertino
- Specified by:
outputOpen
in interfaceIPushPublishHTTPOutputBuilder
- Returns:
- true if the destination was opened
-
outputClose
public boolean outputClose()
Description copied from interface:IPushPublishHTTPCupertino
Close the destination (if needed). All items (playlist/media segments) have been pushed to bring the destination up to date with the current state- Specified by:
outputClose
in interfaceIPushPublishHTTPCupertino
- Specified by:
outputClose
in interfaceIPushPublishHTTPOutputBuilder
- Returns:
- true if the destination was closed
-
connect
public void connect()
- Specified by:
connect
in interfaceIPushPublish
- Overrides:
connect
in classPushPublishHTTPCupertino
-
resetConnection
public void resetConnection()
- Specified by:
resetConnection
in interfaceIPushPublish
- Overrides:
resetConnection
in classPushPublishHTTPCupertino
-
getChunkDurationTarget
public int getChunkDurationTarget(ILiveStreamPacketizer liveStreamPacketizer)
- Specified by:
getChunkDurationTarget
in interfaceIPushPublishHTTPOutputBuilder
- Overrides:
getChunkDurationTarget
in classPushPublishHTTPCupertino
-
isSendToBackupServer
public boolean isSendToBackupServer()
Description copied from interface:IPushPublishHTTPCupertino
Is this implementation sending to a backup server- Specified by:
isSendToBackupServer
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
- Specified by:
isSendToBackupServer
in interfaceIPushPublishHTTPCupertino
- Specified by:
isSendToBackupServer
in interfaceIPushPublishHTTPGroupMember
- Returns:
- true if sending to a backup server
-
setSendToBackupServer
public void setSendToBackupServer(boolean backup)
Description copied from interface:IPushPublishHTTPCupertino
Setup to send to a backup destination- Specified by:
setSendToBackupServer
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
- Specified by:
setSendToBackupServer
in interfaceIPushPublishHTTPCupertino
-
getPlaylistProperties
public WMSProperties getPlaylistProperties()
- Specified by:
getPlaylistProperties
in interfaceIPushPublishHTTPGroupMember
- Overrides:
getPlaylistProperties
in classPushPublishHTTPCupertino
-
updateGroupMasterPlaylistPlaybackURI
public boolean updateGroupMasterPlaylistPlaybackURI(String groupName, PlaylistModel masterPlaylist)
Description copied from interface:IPushPublishHTTPCupertino
Get the group master playlist URI for the given group master playlist file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myGroup/playlist.m3u8"- Specified by:
updateGroupMasterPlaylistPlaybackURI
in interfaceIPushPublishHTTPCupertino
- Parameters:
groupName
- group namemasterPlaylist
- master group playlist- Returns:
- true if the uri was updated
-
updateMasterPlaylistPlaybackURI
public boolean updateMasterPlaylistPlaybackURI(PlaylistModel playlist)
Description copied from interface:IPushPublishHTTPCupertino
update the master playlist URI for the provided playlist model that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/playlist.m3u8" where "playlist.m3u8" is the value given for masterPlaylistFilename- Specified by:
updateMasterPlaylistPlaybackURI
in interfaceIPushPublishHTTPCupertino
- Parameters:
playlist
- the master playlist model to update the URI in- Returns:
- true if the URI was updated
-
updateMediaPlaylistPlaybackURI
public boolean updateMediaPlaylistPlaybackURI(PlaylistModel playlist)
Description copied from interface:IPushPublishHTTPCupertino
update/set the media playlist (chunklist) URI for the provided media playlist file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/chunklist.m3u8" where "chunklist.m3u8" is the value given for mediaPlaylistFilename- Specified by:
updateMediaPlaylistPlaybackURI
in interfaceIPushPublishHTTPCupertino
- Parameters:
playlist
- to update the uri in- Returns:
- true if the playlist uri was updated
-
updateMediaSegmentPlaybackURI
public boolean updateMediaSegmentPlaybackURI(MediaSegmentModel mediaSegment)
Description copied from interface:IPushPublishHTTPCupertino
set the media URI for the given media (chunk) file that a player would use to consume the content from the CDN Example: "http://myHost.com/myPath/myStream/media_1.ts" where "media_1.ts" is the value given for mediaFilename- Specified by:
updateMediaSegmentPlaybackURI
in interfaceIPushPublishHTTPCupertino
- Parameters:
mediaSegment
- to update the uri of- Returns:
- true if the uri was updated
-
sendGroupMasterPlaylist
public int sendGroupMasterPlaylist(String groupName, PlaylistModel playlist)
Description copied from interface:IPushPublishHTTPCupertino
Sends a group master playlist to the destination.- Specified by:
sendGroupMasterPlaylist
in interfaceIPushPublishHTTPCupertino
- Parameters:
groupName
- the group nameplaylist
- the group master playlist model- Returns:
- number of bytes sent to output
-
sendMasterPlaylist
public int sendMasterPlaylist(PlaylistModel playlist)
Description copied from interface:IPushPublishHTTPCupertino
Sends the master playlist to the destination.- Specified by:
sendMasterPlaylist
in interfaceIPushPublishHTTPCupertino
- Parameters:
playlist
- the master playlist model- Returns:
- number of bytes sent to output (less than zero implies the implementation does not support, 0 is a failure, > 0 is success)
-
sendMediaPlaylist
public int sendMediaPlaylist(PlaylistModel playlist)
Description copied from interface:IPushPublishHTTPCupertino
Sends the media playlist to the destination.- Specified by:
sendMediaPlaylist
in interfaceIPushPublishHTTPCupertino
- Parameters:
playlist
- the media playlist model- Returns:
- number of bytes sent to output (less than zero implies the implementation does not support, 0 is a failure, > 0 is success)
-
sendMediaSegment
public int sendMediaSegment(MediaSegmentModel mediaSegment)
Description copied from interface:IPushPublishHTTPCupertino
Sends the media (chunk) to the destination; media provided as a fragment list.- Specified by:
sendMediaSegment
in interfaceIPushPublishHTTPCupertino
- Parameters:
mediaSegment
- the media file in fragment list form- Returns:
- number of bytes sent to output (less than zero implies the implementation does not support, 0 is a failure, > 0 is success)
-
deleteMediaSegment
public int deleteMediaSegment(MediaSegmentModel mediaSegment)
Description copied from interface:IPushPublishHTTPCupertino
Deletes the media (chunk) at the destination URI. Default implementation assumes the URI uses the HTTP schema and deletes the media using the WSE HTTPByteWriter. Implementations not using the HTTP schema or not wanting to use the default HTTPByteWriter should override the default method.- Specified by:
deleteMediaSegment
in interfaceIPushPublishHTTPCupertino
- Parameters:
mediaSegment
- the media destination URI- Returns:
- number of bytes sent if successful (less than zero implies the implementation does not support, 0 is a failure, > 0 is success)
-
getDestionationLogData
public String getDestionationLogData()
Description copied from class:PushPublishHTTPCupertino
Get a JSON formatted string of data that represents the destination to include with the connect/disconnect logging- Specified by:
getDestionationLogData
in interfaceIPushPublishHTTPCupertino
- Specified by:
getDestionationLogData
in classPushPublishHTTPCupertino
- Returns:
- JSON formatted string representation
-
getAkamaiEventName
public String getAkamaiEventName()
- Specified by:
getAkamaiEventName
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
setAkamaiEventName
public void setAkamaiEventName(String akamaiEventName)
- Specified by:
setAkamaiEventName
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
getAkamaiStreamId
public String getAkamaiStreamId()
- Specified by:
getAkamaiStreamId
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
setAkamaiStreamId
public void setAkamaiStreamId(String akamaiStreamId)
- Specified by:
setAkamaiStreamId
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
getAkamaiHostId
public String getAkamaiHostId()
- Specified by:
getAkamaiHostId
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
setAkamaiHostId
public void setAkamaiHostId(String akamaiHostId)
- Specified by:
setAkamaiHostId
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
isAkamaiIngestAcceleration
public boolean isAkamaiIngestAcceleration()
- Specified by:
isAkamaiIngestAcceleration
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
setAkamaiIngestAcceleration
public void setAkamaiIngestAcceleration(boolean akamaiIngestAcceleration)
- Specified by:
setAkamaiIngestAcceleration
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
getUserAgent
public String getUserAgent()
- Specified by:
getUserAgent
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
setUserAgent
public void setUserAgent(String userAgent)
- Specified by:
setUserAgent
in interfacecom.wowza.wms.pushpublish.akamai.IPushPublishAkamai
-
createByteWriter
public HTTPByteWriter createByteWriter(java.net.URI uri, int port)
-
destroyByteWriter
public boolean destroyByteWriter()
-
-