Package com.wowza.wms.pushpublish.model
Class PushPublishBase
Object
com.wowza.wms.pushpublish.model.PushPublishBase
- All Implemented Interfaces:
IPushPublish
- Direct Known Subclasses:
PushPublishHTTPBase,PushPublishRTMP,PushPublishRTP,PushPublishShoutcast
The Class PushPublishBase.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IApplicationInstanceThe app instance within-which the module is running.protected Stringstatic final intstatic final intstatic final intprotected StringName of the target destination; e.g.protected intDestination server for Stream Target destinations; can be primary, backup, or redundant.protected StringThe destination stream name.protected StringThe map file entry name.protected StringThe destination host.protected InetAddressThe destination inet address.protected booleanThe is adaptive streaming.protected booleanStream Target has a redundant stream being pushed by another WSE instanceprotected WMSLoggerprotected StringThe profile implementation.protected StringThe password.protected StringThe destination host.protected intThe destination port.protected StringThe map file entry profile.protected WMSPropertiesThe properties.protected IPushPublishSessionprotected booleanEnables stream debug.protected intThe type of stream to be published.protected intThe time between reconnect attempts (only applies to some profiles).protected IOPerformanceCounterprotected IMediaStreamprotected StringThe src stream name.protected IOPerformanceCounterprotected IOPerformanceCounterprotected StringThe user name.Fields inherited from interface com.wowza.wms.pushpublish.model.IPushPublish
CONNECTED_STATE_CONNECTED, CONNECTED_STATE_CONNECTING, CONNECTED_STATE_NOT_CONNECTED, CONNECTED_STATE_WAITING, PUSHPUBLISH_MAP_PATH_FIELD_NAME, 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(IOPerformanceCounter totalValue) voidaddIOPerformance2(IOPerformanceCounter totalIOPerformanceResult) protected voidClear global logging values previously set by updateLoggingValues.Get appInstance interface.doubleabstract StringintGet destination ID.Get destination name.intGet destination server.Get destination stream name.Get map file entry name.Get destination server host name.Gets the implementation.getMap()longlongGet password.Get playback server host name.intgetPort()Get destination server port.Get entry profile.Get properties.intintGet the reconnect wait time (milliseconds).Get source IMediaStream.Get source stream name.Gets the user name.static StringGets the server version str.voidincrementMessagesOut(long bytes) voidinit(IApplicationInstance appInstance, String streamName, IMediaStream stream, Map<String, String> profileData, Map<String, String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug) Inits the instance.booleanChecks if is adaptive streaming.booleanbooleanIs there an redundant stream being pushed by an external WSE instance? return true or falsevoidLoads map and profile parametersvoidvoidvoidvoidvoidvoidResolve host name to connect tovoidsetAdaptiveStreaming(boolean isAdaptiveStreaming) Sets the adaptive streaming.voidsetAdaptiveStreaming(String adaptiveStreamingStr) voidsetAppInstance(IApplicationInstance appInstance) Set appInstance interface.voidsetDebugLog(boolean debugLog) Set debug logging.voidsetDestinationName(String destinationName) Set destination name.voidsetDestinationServer(int destinationServer) Set destination server.voidsetDestinationServer(String destinationServer) Set destination server.voidsetDstStreamName(String dstStreamName) Set destination stream name.voidsetEntryName(String entryName) Set map file entry name.voidsetExternalRedundancy(boolean isExternalRedundancy) Set whether there is an external redundant stream.voidsetExternalRedundancy(String externalRedundancy) voidSet destination server host name.voidsetHostname(String hostname) voidsetImplementation(String implementation) Sets the implementation.voidsetInetAddr(InetAddress inetAddr) voidsetPassword(String password) Set password.voidsetPlaybackHostname(String playbackHostname) Set playback server host name.voidsetPort(int port) Set destination server port.voidSet destination server port.voidsetProfile(String profile) Set map file entry profile.voidsetReconnectWaitTime(int reconnectWaitTime) Set the reconnect wait time (milliseconds).voidsetSrcStream(IMediaStream srcStream) Sets the source IMediaStream.voidsetSrcStreamName(String srcStreamName) Set source stream name.voidsetStreamName(String streamName) Sets the stream name.voidsetUserName(String userName) Set user name.protected voidupdateLoggingValues(String protocol) Update global logging values: protocol (logger ID: WMSLoggerIDs.PROTO_XXX) application name application instance name vhost name source stream name IOPerformanceCounter message out bytes This call is inherently threadsafe as it sets values in the log4j MDC, which is managed on a per thread basis.voidMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.wowza.wms.pushpublish.model.IPushPublish
connect, disconnect, getConnectedState, getMessagesAttemptedCount, getMessagesFailedCount, getMessagesRetriedCount, resetConnection
-
Field Details
-
logger
-
className
-
pushPublishType
protected int pushPublishTypeThe type of stream to be published. -
pushPublishStreamDebug
protected boolean pushPublishStreamDebugEnables stream debug. -
reconnectWaitTime
protected int reconnectWaitTimeThe time between reconnect attempts (only applies to some profiles). -
sendingPerformance
-
totalIOPerformanceLast
-
totalIOPerformance2Last
-
properties
The properties. -
profile
The map file entry profile. -
entryName
The map file entry name. -
isAdaptiveStreaming
protected boolean isAdaptiveStreamingThe is adaptive streaming. -
userName
The user name. -
password
The password. -
appInstance
The app instance within-which the module is running. -
srcStreamName
The src stream name. -
srcStream
-
dstStreamName
The destination stream name. -
hostname
The destination host. -
playbackHostname
The destination host. -
inetAddr
The destination inet address. -
port
protected int portThe destination port. -
mImplementation
The profile implementation. -
DESTINATION_PRI
public static final int DESTINATION_PRI- See Also:
-
DESTINATION_BAK
public static final int DESTINATION_BAK- See Also:
-
DESTINATION_RED
public static final int DESTINATION_RED- See Also:
-
destinationServer
protected int destinationServerDestination server for Stream Target destinations; can be primary, backup, or redundant. -
isExternalRedundancy
protected boolean isExternalRedundancyStream Target has a redundant stream being pushed by another WSE instance -
destinationName
Name of the target destination; e.g. "wowzavideo", "akamai", "rtmp" (generic). -
pushPublishSession
-
myMap
-
-
Constructor Details
-
PushPublishBase
public PushPublishBase() throws com.wowza.wms.server.LicensingExceptionInstantiates a new push publisher base.- Throws:
com.wowza.wms.server.LicensingException
-
-
Method Details
-
init
public void init(IApplicationInstance appInstance, String streamName, IMediaStream stream, Map<String, String> profileData, Map<String, String> maps, com.wowza.wms.pushpublish.manager.IPushPublisher pushPublisher, boolean streamDebug) Inits the instance.- Specified by:
initin interfaceIPushPublish- Parameters:
appInstance- the app instancestreamName- the source stream namemaps- the map entry paramsprofileData- the profile paramsstreamDebug- stream debug flag
-
updateUsageTracker
public void updateUsageTracker()- Specified by:
updateUsageTrackerin interfaceIPushPublish
-
getImplementation
Gets the implementation.- Returns:
- the implementation
-
setImplementation
Sets the implementation.- Parameters:
implementation- the new implementation
-
getProperties
Get properties.- Specified by:
getPropertiesin interfaceIPushPublish- Returns:
- properties
-
getProfile
Get entry profile.- Specified by:
getProfilein interfaceIPushPublish- Returns:
- map entry profile
-
setProfile
Set map file entry profile.- Specified by:
setProfilein interfaceIPushPublish- Parameters:
profile- map entry profile
-
getEntryName
Get map file entry name.- Specified by:
getEntryNamein interfaceIPushPublish- Returns:
- map file entry name
-
setEntryName
Set map file entry name.- Specified by:
setEntryNamein interfaceIPushPublish- Parameters:
entryName- map file entry name
-
isAdaptiveStreaming
public boolean isAdaptiveStreaming()Checks if is adaptive streaming.- Returns:
- true, if is adaptive streaming
-
setAdaptiveStreaming
public void setAdaptiveStreaming(boolean isAdaptiveStreaming) Sets the adaptive streaming.- Parameters:
isAdaptiveStreaming- the new adaptive streaming
-
setAdaptiveStreaming
-
getUserName
Gets the user name.- Returns:
- the user name
-
setUserName
Set user name.- Parameters:
userName- user name
-
getPassword
Get password.- Returns:
- password
-
setPassword
Set password.- Parameters:
password- password
-
getAppInstance
Get appInstance interface.- Returns:
- appInstance interface
-
setAppInstance
Set appInstance interface.- Parameters:
appInstance- appInstance interface
-
getSrcStreamName
Get source stream name.- Specified by:
getSrcStreamNamein interfaceIPushPublish- Returns:
- source stream name
-
setSrcStreamName
Set source stream name.- Specified by:
setSrcStreamNamein interfaceIPushPublish- Parameters:
srcStreamName- source stream name
-
getDstStreamName
Get destination stream name.- Specified by:
getDstStreamNamein interfaceIPushPublish- Returns:
- destination stream name
-
setDstStreamName
Set destination stream name.- Specified by:
setDstStreamNamein interfaceIPushPublish- Parameters:
dstStreamName- destination stream name
-
setStreamName
Sets the stream name.- Specified by:
setStreamNamein interfaceIPushPublish- Parameters:
streamName- the new stream name
-
getHostname
Get destination server host name.- Specified by:
getHostnamein interfaceIPushPublish- Returns:
- destination server host name
-
setHost
Set destination server host name.- Specified by:
setHostin interfaceIPushPublish- Parameters:
hostname- destination server host name
-
setHostname
- Specified by:
setHostnamein interfaceIPushPublish
-
getPlaybackHostname
Get playback server host name.- Returns:
- playback server host name
-
setPlaybackHostname
Set playback server host name.- Parameters:
playbackHostname- playback server host name
-
getPort
public int getPort()Get destination server port.- Specified by:
getPortin interfaceIPushPublish- Returns:
- destination server port
-
setPort
public void setPort(int port) Set destination server port.- Specified by:
setPortin interfaceIPushPublish- Parameters:
port- destination server port
-
setPort
Set destination server port.- Specified by:
setPortin interfaceIPushPublish- Parameters:
port- destination server port
-
setDestinationServer
Set destination server.- Parameters:
destinationServer- destination server
-
getDestinationServer
public int getDestinationServer()Get destination server. return destination server -
setDestinationServer
public void setDestinationServer(int destinationServer) Set destination server.- Parameters:
destinationServer- destination server
-
isExternalRedundancy
public boolean isExternalRedundancy()Is there an redundant stream being pushed by an external WSE instance? return true or false -
setExternalRedundancy
public void setExternalRedundancy(boolean isExternalRedundancy) Set whether there is an external redundant stream.- Parameters:
isExternalRedundancy-
-
setExternalRedundancy
-
getDestinationName
Get destination name.- Specified by:
getDestinationNamein interfaceIPushPublish- Returns:
- destination name
-
setDestinationName
Set destination name.- Specified by:
setDestinationNamein interfaceIPushPublish- Parameters:
destinationName- destination name
-
getWowzaStreamingEngineVersionStr
Gets the server version str.- Returns:
- the server version str
-
load
Loads map and profile parameters- Parameters:
dataMap- the data map
-
getReconnectWaitTime
public int getReconnectWaitTime()Get the reconnect wait time (milliseconds). Shortest time between connection attempts.- Specified by:
getReconnectWaitTimein interfaceIPushPublish- Returns:
- reconnect wait time (milliseconds)
-
setReconnectWaitTime
public void setReconnectWaitTime(int reconnectWaitTime) Set the reconnect wait time (milliseconds). Shortest time between connection attempts.- Specified by:
setReconnectWaitTimein interfaceIPushPublish- Parameters:
reconnectWaitTime- reconnect wait time (milliseconds)
-
getBandwidth
public double getBandwidth() -
getInetAddr
- Returns:
- the inetAddr
-
setInetAddr
- Parameters:
inetAddr- the inetAddr to set
-
getPushPublishType
public int getPushPublishType()- Specified by:
getPushPublishTypein interfaceIPushPublish
-
createPushPublishSession
- Specified by:
createPushPublishSessionin interfaceIPushPublish
-
getSrcStream
Get source IMediaStream.- Specified by:
getSrcStreamin interfaceIPushPublish- Returns:
- source IMediaStream
-
setSrcStream
Sets the source IMediaStream.- Specified by:
setSrcStreamin interfaceIPushPublish- Parameters:
srcStream- the source IMediaStream
-
getMap
- Specified by:
getMapin interfaceIPushPublish
-
getBaseParams
-
incrementMessagesOut
public void incrementMessagesOut(long bytes) -
getMessagesOutBytes
public long getMessagesOutBytes() -
getMessagesOutCount
public long getMessagesOutCount() -
add
-
addIOPerformance2
-
getDestinationID
public int getDestinationID()Get destination ID. A return value of 0 means the destination ID cannot be determined.- Specified by:
getDestinationIDin interfaceIPushPublish- Returns:
- destination ID
-
getContextStr
- Specified by:
getContextStrin interfaceIPushPublish
-
updateLoggingValues
Update global logging values: protocol (logger ID: WMSLoggerIDs.PROTO_XXX) application name application instance name vhost name source stream name IOPerformanceCounter message out bytes This call is inherently threadsafe as it sets values in the log4j MDC, which is managed on a per thread basis.- Parameters:
protocol- protocol
-
clearLoggingValues
protected void clearLoggingValues()Clear global logging values previously set by updateLoggingValues. This call is inherently threadsafe as it clears values in the log4j MDC, which is managed on a per thread basis. -
isDebugLog
public boolean isDebugLog()- Specified by:
isDebugLogin interfaceIPushPublish
-
setDebugLog
public void setDebugLog(boolean debugLog) Set debug logging.- Specified by:
setDebugLogin interfaceIPushPublish- Parameters:
debugLog- debug logging
-
logDebug
-
logInfo
-
logWarn
-
logError
-
logError
-
logError
-
resolveHostName
Resolve host name to connect to- Returns:
- hostname
-