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 IApplicationInstance
The app instance within-which the module is running.protected String
static final int
static final int
static final int
protected String
Name of the target destination; e.g.protected int
Destination server for Stream Target destinations; can be primary, backup, or redundant.protected String
The destination stream name.protected String
The map file entry name.protected String
The destination host.protected InetAddress
The destination inet address.protected boolean
The is adaptive streaming.protected boolean
Stream Target has a redundant stream being pushed by another WSE instanceprotected WMSLogger
protected String
The profile implementation.protected String
The password.protected String
The destination host.protected int
The destination port.protected String
The map file entry profile.protected WMSProperties
The properties.protected IPushPublishSession
protected boolean
Enables stream debug.protected int
The type of stream to be published.protected int
The time between reconnect attempts (only applies to some profiles).protected IOPerformanceCounter
protected IMediaStream
protected String
The src stream name.protected IOPerformanceCounter
protected IOPerformanceCounter
protected String
The 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 TypeMethodDescriptionvoid
add
(IOPerformanceCounter totalValue) void
addIOPerformance2
(IOPerformanceCounter totalIOPerformanceResult) protected void
Clear global logging values previously set by updateLoggingValues.Get appInstance interface.double
abstract String
int
Get destination ID.Get destination name.int
Get destination server.Get destination stream name.Get map file entry name.Get destination server host name.Gets the implementation.getMap()
long
long
Get password.Get playback server host name.int
getPort()
Get destination server port.Get entry profile.Get properties.int
int
Get the reconnect wait time (milliseconds).Get source IMediaStream.Get source stream name.Gets the user name.static String
Gets the server version str.void
incrementMessagesOut
(long bytes) 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.boolean
Checks if is adaptive streaming.boolean
boolean
Is there an redundant stream being pushed by an external WSE instance? return true or falsevoid
Loads map and profile parametersvoid
void
void
void
void
void
Resolve host name to connect tovoid
setAdaptiveStreaming
(boolean isAdaptiveStreaming) Sets the adaptive streaming.void
setAdaptiveStreaming
(String adaptiveStreamingStr) void
setAppInstance
(IApplicationInstance appInstance) Set appInstance interface.void
setDebugLog
(boolean debugLog) Set debug logging.void
setDestinationName
(String destinationName) Set destination name.void
setDestinationServer
(int destinationServer) Set destination server.void
setDestinationServer
(String destinationServer) Set destination server.void
setDstStreamName
(String dstStreamName) Set destination stream name.void
setEntryName
(String entryName) Set map file entry name.void
setExternalRedundancy
(boolean isExternalRedundancy) Set whether there is an external redundant stream.void
setExternalRedundancy
(String externalRedundancy) void
Set destination server host name.void
setHostname
(String hostname) void
setImplementation
(String implementation) Sets the implementation.void
setInetAddr
(InetAddress inetAddr) void
setPassword
(String password) Set password.void
setPlaybackHostname
(String playbackHostname) Set playback server host name.void
setPort
(int port) Set destination server port.void
Set destination server port.void
setProfile
(String profile) Set map file entry profile.void
setReconnectWaitTime
(int reconnectWaitTime) Set the reconnect wait time (milliseconds).void
setSrcStream
(IMediaStream srcStream) Sets the source IMediaStream.void
setSrcStreamName
(String srcStreamName) Set source stream name.void
setStreamName
(String streamName) Sets the stream name.void
setUserName
(String userName) Set user name.protected void
updateLoggingValues
(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.void
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.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:
init
in 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:
updateUsageTracker
in interfaceIPushPublish
-
getImplementation
Gets the implementation.- Returns:
- the implementation
-
setImplementation
Sets the implementation.- Parameters:
implementation
- the new implementation
-
getProperties
Get properties.- Specified by:
getProperties
in interfaceIPushPublish
- Returns:
- properties
-
getProfile
Get entry profile.- Specified by:
getProfile
in interfaceIPushPublish
- Returns:
- map entry profile
-
setProfile
Set map file entry profile.- Specified by:
setProfile
in interfaceIPushPublish
- Parameters:
profile
- map entry profile
-
getEntryName
Get map file entry name.- Specified by:
getEntryName
in interfaceIPushPublish
- Returns:
- map file entry name
-
setEntryName
Set map file entry name.- Specified by:
setEntryName
in 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:
getSrcStreamName
in interfaceIPushPublish
- Returns:
- source stream name
-
setSrcStreamName
Set source stream name.- Specified by:
setSrcStreamName
in interfaceIPushPublish
- Parameters:
srcStreamName
- source stream name
-
getDstStreamName
Get destination stream name.- Specified by:
getDstStreamName
in interfaceIPushPublish
- Returns:
- destination stream name
-
setDstStreamName
Set destination stream name.- Specified by:
setDstStreamName
in interfaceIPushPublish
- Parameters:
dstStreamName
- destination stream name
-
setStreamName
Sets the stream name.- Specified by:
setStreamName
in interfaceIPushPublish
- Parameters:
streamName
- the new stream name
-
getHostname
Get destination server host name.- Specified by:
getHostname
in interfaceIPushPublish
- Returns:
- destination server host name
-
setHost
Set destination server host name.- Specified by:
setHost
in interfaceIPushPublish
- Parameters:
hostname
- destination server host name
-
setHostname
- Specified by:
setHostname
in 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:
getPort
in interfaceIPushPublish
- Returns:
- destination server port
-
setPort
public void setPort(int port) Set destination server port.- Specified by:
setPort
in interfaceIPushPublish
- Parameters:
port
- destination server port
-
setPort
Set destination server port.- Specified by:
setPort
in 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:
getDestinationName
in interfaceIPushPublish
- Returns:
- destination name
-
setDestinationName
Set destination name.- Specified by:
setDestinationName
in 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:
getReconnectWaitTime
in 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:
setReconnectWaitTime
in 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:
getPushPublishType
in interfaceIPushPublish
-
createPushPublishSession
- Specified by:
createPushPublishSession
in interfaceIPushPublish
-
getSrcStream
Get source IMediaStream.- Specified by:
getSrcStream
in interfaceIPushPublish
- Returns:
- source IMediaStream
-
setSrcStream
Sets the source IMediaStream.- Specified by:
setSrcStream
in interfaceIPushPublish
- Parameters:
srcStream
- the source IMediaStream
-
getMap
- Specified by:
getMap
in 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:
getDestinationID
in interfaceIPushPublish
- Returns:
- destination ID
-
getContextStr
- Specified by:
getContextStr
in 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:
isDebugLog
in interfaceIPushPublish
-
setDebugLog
public void setDebugLog(boolean debugLog) Set debug logging.- Specified by:
setDebugLog
in interfaceIPushPublish
- Parameters:
debugLog
- debug logging
-
logDebug
-
logInfo
-
logWarn
-
logError
-
logError
-
logError
-
resolveHostName
Resolve host name to connect to- Returns:
- hostname
-