Package com.wowza.wms.client
Interface IClient
- 
 public interface IClientIClient: public interface to Client object. 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringAUDIOSAMPLE_ACCESS_ALLstatic StringAUDIOSAMPLE_ACCESS_NONEstatic StringREAD_ACCESS_ALLstatic StringREAD_ACCESS_NONEstatic StringVIDEOSAMPLE_ACCESS_ALLstatic StringVIDEOSAMPLE_ACCESS_NONEstatic StringWRITE_ACCESS_ALLstatic StringWRITE_ACCESS_NONE
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidacceptConnection()Accept connectionvoidacceptConnection(AMFData successObj)Accept connectionvoidacceptConnection(String successStr)Accept connectionvoidaddAcceptConnectionAttribute(String key, AMFDataObj item)Add and attribute to the resultObj that gets passed back to the client on successful connectionvoidaddAcceptConnectionAttribute(String key, String item)Add and attribute to the resultObj that gets passed back to the client on successful connectionvoidcall(String handlerName)Simplified call client method/handler call.voidcall(String handlerName, IModuleCallResult resultObj, Object... params)Call client method/handler.voidclearFastPlaySettings()Force clear the fastPlay settingsvoidfcSubscribe(String streamName)Subscribe to a live stream (for live stream repeater to start start from edge to origin)voidfcSubscribe(String streamName, String mediaCasterType)Subscribe to a live stream (use a particular mediaCasterType)voidfcUnSubscribe(String streamName)UnSubscribe from a streamvoidfcUnSubscribeAll()UnSubscribe to all streams that this client is current subscribed toIApplicationInstancegetAppInstance()Get parent applicationInstance.IApplicationgetApplication()Get parent application.intgetBufferTime()Get default buffer time for newly created mediaStream objectsintgetClientId()Get client id.longgetConnectTime()Get time in milliseconds the client connected to the server.StringgetDateStarted()Get date and time of client connectionElapsedTimergetElapsedTime()Get elapsed time client has been connected.com.wowza.wms.stream.FastPlaySettingsgetFastPlaySettings()Get the current fastPlay settings.StringgetFlashVer()Get client flash versionStringgetForwardedIP()Get the forwarded IP of the connected client, if available.intgetIdleFrequency()Get client idle frequency (milliseconds)StringgetIp()Client ip addresslonggetLastValidateTime()Get last time (millisecond) the connection was validated with a pingintgetLiveRepeaterCapabilities()Get the live repeater capabilities of this connectionStringgetLiveStreamPacketizerList()Get the comma separated list of LiveStreamPacketizers names being used by this client (see conf/LiveStreamPacketizers.xml)StringgetLiveStreamTranscoderList()Get the comma separated list of LiveStreamTranscoders names being used by this client (see conf/LiveStreamTranscoders.xml)intgetMaximumPendingWriteBytes()Get maximum number a bytes a client connection can have waiting to be sent before the connection is terminated.intgetMaximumSetBufferTime()Get maximum number of milliseconds allowed for the NetStream.setBufferTime(secs) call.IOPerformanceCountergetMediaIOPerformanceCounter()Get performance counter for media bytes transferred to this client.intgetObjectEncoding()Get the object encoding levelStringgetPageUrl()Get the pageUrl for this connection.longgetPingRoundTripTime()Get turn around time (milliseconds) of last ping requestintgetPingTimeout()Get the ping timeout (milliseconds)intgetPlayStreamCount()Get the number of play streamsjava.util.ListgetPlayStreams()Get a collection of all play streams.WMSPropertiesgetProperties()Get client propertiesintgetProtocol()Get connection protocol (1 = RTMP, 3 = RTMPT)intgetPublishStreamCount()Get the number of publish streamsjava.util.ListgetPublishStreams()Get a collection of publish streams.StringgetQueryStr()Get the query string part of the connection string.StringgetReferrer()Get the referrer data for this connection.StringgetRepeaterOriginUrl()Get the origin URL used by the Live Stream RepeaterAMFObjgetRespAMFAudioObj(IMediaStream stream)Get the audio response AMFObj for a given mediaStreamAMFObjgetRespAMFDataObj(IMediaStream stream)Get the data response AMFObj for a given mediaStreamAMFObjgetRespAMFVideoObj(IMediaStream stream)Get the video response AMFObj for a given mediaStreamResponseFunctionsgetRespFunctions()Get client responseFunctions object.AMFObjgetResponseAMFObj(int index)Get the response channel AMFObj for channel index.RTPStreamgetRTPStream()If this client was created due to an RTP connection to the server return the underlying RTPStream objectHostPortgetServerHostPort()Get the hostPort object for the connection that is servicing this clientStringgetSharedObjectReadAccess()Get the shared object read access value.StringgetSharedObjectWriteAccess()Get the shared object write access value.StringgetStreamAudioSampleAccess()Get the audio sample access value.java.io.FilegetStreamFile(String streamName)Get File object for stream with given name.java.io.FilegetStreamFile(String streamName, String streamExt)Get File object for stream with given name and extension.java.io.FilegetStreamFile(String streamName, String streamExt, boolean doCreateFolder)Get File object for stream with given name and extension.StringgetStreamReadAccess()Get the stream read access value.StringgetStreamType()Get default streamTypeStringgetStreamVideoSampleAccess()Get the video sample access value.StringgetStreamWriteAccess()Get the stream write access value.StringgetTimeRunning()Get elapsed time of connectiondoublegetTimeRunningSeconds()Get time running in secondsIOPerformanceCountergetTotalIOPerformanceCounter()Get performance counter for all bytes transferred to this client.StringgetUri()Get the full URI of the connection stringIVHostgetVHost()Get parent vHostcom.wowza.wms.protocol.wowz.WOWZSessiongetWowzSession()com.wowza.wms.client.ClientWriteListenergetWriteListener()Object that tracks write operationsbooleanisAcceptConnection()Is auto accept connectionbooleanisAcceptConnectionSendClientId()Include the client id in the accept connection responsebooleanisConnected()Is this client connectedbooleanisEncrypted()Is this connection encrypted (RTMPE or RTMPTE)booleanisFlashMediaLiveEncoder()Returns true if this connection is the Flash Media Live EncoderbooleanisFlashVersion10()Returns true if the Flash version is equal or greater than 10.x.x.xbooleanisFlashVersion90115()Returns true if the Flash version is equal or greater than 9.0.115.xbooleanisFlashVersionH264Capable()Returns true if the connected client is capable of playing H.264 video (Flash player 9.0.45.x or greater)booleanisLiveRepeater()Returns true if this connection is from the live stream repeaterbooleanisObjectEncodingAMF0()Is the object encoding for this client AMF0booleanisObjectEncodingAMF3()Is the object encoding for this client AMF3booleanisSecure()Is this connection protected by either SSL or encryption (RTMPE, RTMPTE, RTMPS)booleanisSendCloseOnRejectConnection()booleanisSSL()Is this connection SSL (RTMPS)booleanisValidateFMLEConnections()Returns true if validating FMLE connection (default is false)intping(IModulePingResult pingResult)Ping client.voidredirectConnection(String url)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)voidredirectConnection(String url, String description)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)voidredirectConnection(String url, String description, AMFData errorObj)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302).voidredirectConnection(String url, String description, String errorStr)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)voidrejectConnection()Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)voidrejectConnection(AMFData errorObj)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)voidrejectConnection(String errorStr)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)voidrejectConnection(String description, AMFData errorObj)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)voidrejectConnection(String description, String errorStr)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)voidreparentClient(IVHost vhost)Move a client object to a new vhost.voidsetAcceptConnection(boolean acceptConnection)Set the default for accept connectionvoidsetAcceptConnectionDescription(String description)Call this method from onConnect to set the info.description property returned in NetConnection onStatus handlervoidsetAcceptConnectionExObj(AMFDataObj acceptConnectionExObj)Call this method from onConnect to set the info.ex property returned in NetConnection onStatus handlervoidsetAcceptConnectionObj(AMFData acceptConnectionObj)Call this method from onConnect to add an "application" property to the info object that is passed back to the Flash client in the onStatus handler.voidsetAcceptConnectionSendClientId(boolean acceptConnectionSendClientId)Include the client id in the connection responsevoidsetBufferTime(int bufferTime)Set default buffer time for newly created mediaStream objectsvoidsetFastPlaySettings(com.wowza.wms.stream.FastPlaySettings fastPlaySettings)Set fastPlay settingsvoidsetFlashVer(String flashVer)Set client flash versionvoidsetForwardedIP(String IP)Set the forwarded IP of the connected client.voidsetIdleFrequency(int idleFrequency)Set client idle frequency (milliseconds)voidsetLastValidateTime(long lastValidateTime)Set the last time (milliseconds) the connection was validated with pingvoidsetLiveRepeaterCapabilities(int liveRepeaterCapabilities)Set the live repeater capabilities of this connectionvoidsetLiveStreamPacketizerList(String liveStreamPacketizerList)Set the comma separated list of LiveStreamPacketizers names being used by this client (see conf/LiveStreamPacketizers.xml)voidsetLiveStreamTranscoderList(String liveStreamTranscoderList)Set the comma separated list of LiveStreamTranscoders names being used by this client (see conf/LiveStreamTranscoders.xml)voidsetObjectEncoding(int objectEncoding)Set the object encoding levelvoidsetRepeaterOriginUrl(String repeaterOriginUrl)Set the origin URL used by the Live Stream RepeatervoidsetSendCloseOnRejectConnection(boolean sendCloseOnRejectConnection)voidsetSharedObjectReadAccess(String sharedObjectReadAccess)Set the shared object read access value.voidsetSharedObjectWriteAccess(String sharedObjectWriteAccess)Set the shared object write access value.voidsetShutdownClient(boolean shutdownClient)Gracefully and forcefully shutdown a client.voidsetStreamAudioSampleAccess(String audioSampleAccess)Set the stream audio sample access value.voidsetStreamReadAccess(String streamReadAccess)Set the stream object read access value.voidsetStreamType(String streamType)Set default streamTypevoidsetStreamVideoSampleAccess(String videoSampleAccess)Set the stream video sample access value.voidsetStreamWriteAccess(String streamWriteAccess)Set the stream object write access value.voidsetThreadContext()Set the thread logging context to this clientvoidsetValidateFMLEConnections(boolean validateFMLEConnections)Returns true if validating FMLE connection (default is false)voidsetWowzSession(com.wowza.wms.protocol.wowz.WOWZSession wowzSession)voidshutdownClient()Gracefully shutdown a client.inttestFlashVersion(int[] version)Test to see if the connected client flash version is equal to or greater than a given value.voidtouch()Update the last touch time for client
 
- 
- 
- 
Field Detail- 
VIDEOSAMPLE_ACCESS_ALLstatic final String VIDEOSAMPLE_ACCESS_ALL - See Also:
- Constant Field Values
 
 - 
VIDEOSAMPLE_ACCESS_NONEstatic final String VIDEOSAMPLE_ACCESS_NONE - See Also:
- Constant Field Values
 
 - 
AUDIOSAMPLE_ACCESS_ALLstatic final String AUDIOSAMPLE_ACCESS_ALL - See Also:
- Constant Field Values
 
 - 
AUDIOSAMPLE_ACCESS_NONEstatic final String AUDIOSAMPLE_ACCESS_NONE - See Also:
- Constant Field Values
 
 - 
READ_ACCESS_ALLstatic final String READ_ACCESS_ALL - See Also:
- Constant Field Values
 
 - 
READ_ACCESS_NONEstatic final String READ_ACCESS_NONE - See Also:
- Constant Field Values
 
 - 
WRITE_ACCESS_ALLstatic final String WRITE_ACCESS_ALL - See Also:
- Constant Field Values
 
 - 
WRITE_ACCESS_NONEstatic final String WRITE_ACCESS_NONE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getClientIdint getClientId() Get client id. Assigned by server and connection time.- Returns:
- client id
 
 - 
getFlashVerString getFlashVer() Get client flash version- Returns:
- client flash version string
 
 - 
setFlashVervoid setFlashVer(String flashVer) Set client flash version- Parameters:
- flashVer- client flash version string
 
 - 
getTotalIOPerformanceCounterIOPerformanceCounter getTotalIOPerformanceCounter() Get performance counter for all bytes transferred to this client. This includes function calls.- Returns:
- performance counter
 
 - 
getMediaIOPerformanceCounterIOPerformanceCounter getMediaIOPerformanceCounter() Get performance counter for media bytes transferred to this client. Only includes bytes to mediaStream objects- Returns:
- performance counter
 
 - 
getAppInstanceIApplicationInstance getAppInstance() Get parent applicationInstance. Is null if connection reject or before accepted.- Returns:
- parent applicationInstance
 
 - 
getApplicationIApplication getApplication() Get parent application. Is null if connection reject or before accepted.- Returns:
- application
 
 - 
getPlayStreamsjava.util.List getPlayStreams() Get a collection of all play streams. Play streams are streams that are created due to a call to play.Iterate Play StreamsIClient client; List playStreams = client.getPlayStreams(); Iterator iter = playStreams.iterator(); while(iter.hasNext()) { IMediaStream stream = (IMediaStream)iter.next(); WMSLoggerFactory.getLogger(null).debug("stream: "+stream.getName()); }- Returns:
- collection of play streams
 
 - 
getPublishStreamsjava.util.List getPublishStreams() Get a collection of publish streams. Publish streams are streams that are created due to a call to publish.Iterate Public StreamsIClient client; List publishStreams = client.getPublishStreams(); Iterator iter = publishStreams.iterator(); while(iter.hasNext()) { IMediaStream stream = (IMediaStream)iter.next(); WMSLoggerFactory.getLogger(null).debug("stream: "+stream.getName()); }- Returns:
- collection of publish stream
 
 - 
getPlayStreamCountint getPlayStreamCount() Get the number of play streams- Returns:
- number of play streams
 
 - 
getPublishStreamCountint getPublishStreamCount() Get the number of publish streams- Returns:
- number of publish streams
 
 - 
shutdownClientvoid shutdownClient() Gracefully shutdown a client. Only use this method to shutdown a client if you know the client is connected to Wowza Pro. If the client may be disconnected from Wowza Pro, use IClient.setShutdownClient(true)
 - 
touchvoid touch() Update the last touch time for client
 - 
isConnectedboolean isConnected() Is this client connected- Returns:
- is connected
 
 - 
getPropertiesWMSProperties getProperties() Get client properties- Returns:
- collection of client properties
 
 - 
getStreamTypeString getStreamType() Get default streamType- Returns:
- streamType
 
 - 
setStreamTypevoid setStreamType(String streamType) Set default streamType- Parameters:
- streamType- streamType
 
 - 
isAcceptConnectionboolean isAcceptConnection() Is auto accept connection- Returns:
- auto accept connection
 
 - 
acceptConnectionvoid acceptConnection() Accept connection
 - 
acceptConnectionvoid acceptConnection(String successStr) Accept connection- Parameters:
- successStr- application property value added to NetConnection.Connect.Success event object
 
 - 
acceptConnectionvoid acceptConnection(AMFData successObj) Accept connection- Parameters:
- successObj- application property value added to NetConnection.Connect.Success event object
 
 - 
rejectConnectionvoid rejectConnection() Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)
 - 
rejectConnectionvoid rejectConnection(String errorStr) Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)- Parameters:
- errorStr- error (returned in onStatus handler in info.application parameter)
 
 - 
rejectConnectionvoid rejectConnection(AMFData errorObj) Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)- Parameters:
- errorObj- error AMFData (returned in onStatus handler in info.application parameter)
 
 - 
rejectConnectionvoid rejectConnection(String description, String errorStr)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)- Parameters:
- description- description (returned in onStatus handler in info.description parameter)
- errorStr- error (returned in onStatus handler in info.application parameter)
 
 - 
rejectConnectionvoid rejectConnection(String description, AMFData errorObj)Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)- Parameters:
- description- description (returned in onStatus handler in info.description parameter)
- errorObj- error AMFData (returned in onStatus handler in info.application parameter)
 
 - 
redirectConnectionvoid redirectConnection(String url) Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)- Parameters:
- url- url (returned in onStatus handler in info.ex.redirect parameter)
 
 - 
redirectConnectionvoid redirectConnection(String url, String description)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)- Parameters:
- url- url (returned in onStatus handler in info.ex.redirect parameter)
- description- description (returned in onStatus handler in info.description parameter)
 
 - 
redirectConnectionvoid redirectConnection(String url, String description, String errorStr)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302)- Parameters:
- url- url (returned in onStatus handler in info.ex.redirect parameter)
- description- description (returned in onStatus handler in info.description parameter)
- errorStr- error (returned in onStatus handler in info.application parameter)
 
 - 
redirectConnectionvoid redirectConnection(String url, String description, AMFData errorObj)Redirection connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected and info.ex.code of 302). Code must be added client side to capture the NetConnection.Connect.Rejected message, look for the info.ex.code value of 302 and attempt a reconnect to the info.ex.redirect url. Client side example:public function ncOnStatus(infoObject:NetStatusEvent) { if (infoObject.info.code == "NetConnection.Connect.Rejected") { if (infoObject.info.ex.code == 302) { trace("Connection redirected: "+infoObject.info.ex.redirect); nc.connect(infoObject.info.ex.redirect); } else trace("Connection rejected"); } } nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);- Parameters:
- url- url (returned in onStatus handler in info.ex.redirect parameter)
- description- description (returned in onStatus handler in info.description parameter)
- errorObj- error AMFData (returned in onStatus handler in info.application parameter)
 
 - 
isAcceptConnectionSendClientIdboolean isAcceptConnectionSendClientId() Include the client id in the accept connection response- Returns:
- true if client id is included
 
 - 
setAcceptConnectionSendClientIdvoid setAcceptConnectionSendClientId(boolean acceptConnectionSendClientId) Include the client id in the connection response- Parameters:
- acceptConnectionSendClientId- true if client id is included
 
 - 
getVHostIVHost getVHost() Get parent vHost- Returns:
- vHost object
 
 - 
callvoid call(String handlerName, IModuleCallResult resultObj, Object... params)Call client method/handler. You can call any method/handler attached to NetConnection object. Such as netConnection.myFuncCall Client Handler Method With Result ObjectIClient client; class ReturnObj implements IModuleCallResult { public void onResult(IClient client, RequestFunction function, AMFDataList params) { WMSLoggerFactory.getLogger(null).debug("onResult"); } } client.call("onCustomMethod", new ReturnObj(), "param1", 1.2345, false, new Date());- Parameters:
- handlerName- handler name
- resultObj- if client method returns data this object will receive callback, null if don't care or no return on client method/handler.
- params- variable list of argument. Will be automatically wrapped in AMFData objects
 
 - 
callvoid call(String handlerName) Simplified call client method/handler call. No resultObj. No parameters- Parameters:
- handlerName- handler name
 
 - 
pingint ping(IModulePingResult pingResult) Ping client. Unlike FMS this ping is asynchronous. pingResult object will be notified of successful response by client or timeout.Ping Client and Shutdown Connection If Client Has Stoppedclass PingResult implements IModulePingResult { public void onResult(IClient client, long pingTime, int pingId, boolean result) { WMSLogger log = WMSLoggerFactory.getLogger(null); log.debug("onResult: result:"+result); if (!result) { // client has stopped lets shut it down client.getAppInstance().shutdownClient(client); } else log.debug("lastPingTime: "+client.getPingRoundTripTime()); } } client.ping(new PingResult());- Parameters:
- pingResult- ping result object. Will receive callback on result of ping or timeout. Can be null.
- Returns:
- ping id
 
 - 
getIpString getIp() Client ip address- Returns:
- client ip address
 
 - 
getForwardedIPString getForwardedIP() Get the forwarded IP of the connected client, if available. Default retrurns null- Returns:
 
 - 
setForwardedIPvoid setForwardedIP(String IP) Set the forwarded IP of the connected client.- Parameters:
- IP-
 
 - 
getFastPlaySettingscom.wowza.wms.stream.FastPlaySettings getFastPlaySettings() Get the current fastPlay settings. FastPlay settings when set from the client are immediatly cleared on the next call to seek/unpause/play.- Returns:
- fastPlay settings
 
 - 
setFastPlaySettingsvoid setFastPlaySettings(com.wowza.wms.stream.FastPlaySettings fastPlaySettings) Set fastPlay settings- Parameters:
- fastPlaySettings- fastPlay settings
 
 - 
clearFastPlaySettingsvoid clearFastPlaySettings() Force clear the fastPlay settings
 - 
getRespFunctionsResponseFunctions getRespFunctions() Get client responseFunctions object. The responseFunctions object is the method by which events are sent to the client. This code snippet shows how to send an onStatus event for a mediaStream (stream) to the client.Send Status Message to ClientResponseFunctions respFunctions = client.getRespFunctions(); ResponseFunction resp = new ResponseFunction(); resp.createDefaultMessage("onStatus", 0.0); resp.setRetAMFObj(stream.getRespAMFDataObj()); resp.setSrc(stream.getSrc()); AMFDataObj data = new AMFDataObj(); data.put("level", new AMFDataItem("status")); data.put("code", new AMFDataItem("NetStream.Publish.Success")); data.put("description", new AMFDataItem(stream.getName()+" is now unpublished.")); data.put("clientid", new AMFDataItem(clientID)); resp.addBody(data); respFunctions.add(resp);- Returns:
- responseFunctions object
 
 - 
getConnectTimelong getConnectTime() Get time in milliseconds the client connected to the server. To get the duration of time in milliseconds that the client has been connected to the server us the following formula: (System.currentTimeMillis() - client.getConnectTime())- Returns:
- duration connected (millseconds)
 
 - 
getPingRoundTripTimelong getPingRoundTripTime() Get turn around time (milliseconds) of last ping request- Returns:
- time (milliseconds)
 
 - 
getDateStartedString getDateStarted() Get date and time of client connection- Returns:
- date and time of connection
 
 - 
getTimeRunningString getTimeRunning() Get elapsed time of connection- Returns:
- elapsed time of connection
 
 - 
getTimeRunningSecondsdouble getTimeRunningSeconds() Get time running in seconds- Returns:
- time running in seconds
 
 - 
getStreamFilejava.io.File getStreamFile(String streamName) Get File object for stream with given name. Assumes file extension is .flv.- Parameters:
- streamName- stream name
- Returns:
- file
 
 - 
getStreamFilejava.io.File getStreamFile(String streamName, String streamExt)Get File object for stream with given name and extension. For example test.flv would be getStreamFile("test", "flv");Get File DescriptorIClient client; File file = client.getStreamFile("test", "flv"); WMSLogger log = WMSLoggerFactory.getLogger(null); if (file != null) { if (file.exists()) log.debug("getStreamFile: "+ file.getPath()); }- Parameters:
- streamName- stream name
- streamExt- stream extension
- Returns:
- file
 
 - 
getStreamFilejava.io.File getStreamFile(String streamName, String streamExt, boolean doCreateFolder)Get File object for stream with given name and extension. If doCreateFolder is true, create folder necessary to make path exist. For example test.flv would be getStreamFile("test", "flv");- Parameters:
- streamName- stream name
- streamExt- stream extension
- doCreateFolder- create folders if needed
- Returns:
- file
 
 - 
getBufferTimeint getBufferTime() Get default buffer time for newly created mediaStream objects- Returns:
- default buffer time (millseconds)
 
 - 
setBufferTimevoid setBufferTime(int bufferTime) Set default buffer time for newly created mediaStream objects- Parameters:
- bufferTime- bufer time (milliseconds)
 
 - 
getResponseAMFObjAMFObj getResponseAMFObj(int index) Get the response channel AMFObj for channel index.- Parameters:
- index- channel index
- Returns:
- AMFObj
 
 - 
getRespAMFAudioObjAMFObj getRespAMFAudioObj(IMediaStream stream) Get the audio response AMFObj for a given mediaStream- Parameters:
- stream- mediaStream
- Returns:
- response channel AMFObj
 
 - 
getRespAMFVideoObjAMFObj getRespAMFVideoObj(IMediaStream stream) Get the video response AMFObj for a given mediaStream- Parameters:
- stream- mediaStream
- Returns:
- response channel AMFObj
 
 - 
getRespAMFDataObjAMFObj getRespAMFDataObj(IMediaStream stream) Get the data response AMFObj for a given mediaStream- Parameters:
- stream- mediaStream
- Returns:
- response channel AMFObj
 
 - 
getQueryStrString getQueryStr() Get the query string part of the connection string. If the connection string where:rtmp://localhost/app/appInst?data1=myData1&data2=myData2, then query string would bedata1=myData1&data2=myData2- Returns:
- query string
 
 - 
getReferrerString getReferrer() Get the referrer data for this connection. The referrer in Wowza Streaming Engine terms is the full url to the Flash movie that connected to the server. Checking referre upon connection is a great way to secure server connections and only allow your Flash movies to connect to the server.Only Allow Your .swf Files to Connect to Wowza Pro serverpublic class MyModule extends ModuleBase { static public void onConnect(IClient client, RequestFunction function, AMFDataList params) { String referrer = client.getReferrer(); if (referrer.indexOf("www.mycompany.com") >= 0 && referrer.indexOf("mycoolflash.swf") >= 0) client.acceptConnection("valid referrer"); else client.rejectConnection("invalid referrer: "+referrer); } }- Returns:
- referrer
 
 - 
getPageUrlString getPageUrl() Get the pageUrl for this connection.- Returns:
- pageUrl for this connection
 
 - 
getUriString getUri() Get the full URI of the connection string- Returns:
- URI of connection string
 
 - 
getProtocolint getProtocol() Get connection protocol (1 = RTMP, 3 = RTMPT)- Returns:
- connection protocol (1 = RTMP, 3 = RTMPT)
 
 - 
getServerHostPortHostPort getServerHostPort() Get the hostPort object for the connection that is servicing this client- Returns:
- vHost hostPort servicing request
 
 - 
isSecureboolean isSecure() Is this connection protected by either SSL or encryption (RTMPE, RTMPTE, RTMPS)- Returns:
- is connection protected by either SSL or encryption (RTMPE, RTMPTE, RTMPS)
 
 - 
isSSLboolean isSSL() Is this connection SSL (RTMPS)- Returns:
- is connection (RTMPS)
 
 - 
isEncryptedboolean isEncrypted() Is this connection encrypted (RTMPE or RTMPTE)- Returns:
- is connection encrypted (RTMPE or RTMPTE)
 
 - 
getIdleFrequencyint getIdleFrequency() Get client idle frequency (milliseconds)- Returns:
- client idle frequency (milliseconds)
 
 - 
setIdleFrequencyvoid setIdleFrequency(int idleFrequency) Set client idle frequency (milliseconds)- Parameters:
- idleFrequency- client idle frequency (milliseconds)
 
 - 
getSharedObjectReadAccessString getSharedObjectReadAccess() Get the shared object read access value. see setSharedObjectReadAccess for more information.- Returns:
- shared object read access value
 
 - 
setSharedObjectReadAccessvoid setSharedObjectReadAccess(String sharedObjectReadAccess) Set the shared object read access value. This list is a semi-colon delimeted list of shared objects that this client has access to. By default the value is set to IClient.READ_ACCESS_ALL which indicates this client can read all shared objects. If you want to disable read access to all shared objects set this value to IClient.READ_ACCESS_NONE. If this value is set to anything other than IClient.READ_ACCESS_ALL or IClient.READ_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming shared object read requests. If any item in the list completely matches the shared object name or the start of the shared object name, then access is allowed. For example, if the sharedObjectReadAccess list is set to "testa/testb;testc" then the following requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- sharedObjectReadAccess- shared object read access value
 
 - 
getSharedObjectWriteAccessString getSharedObjectWriteAccess() Get the shared object write access value. see setSharedObjectWriteAccess for more information.- Returns:
- shared object write access value
 
 - 
setSharedObjectWriteAccessvoid setSharedObjectWriteAccess(String sharedObjectWriteAccess) Set the shared object write access value. This list is a semi-colon delimeted list of shared objects that this client has access to. By default the value is set to IClient.WRITE_ACCESS_ALL which indicates this client can write all shared objects. If you want to disable write access to all shared objects set this value to IClient.WRITE_ACCESS_NONE. If this value is set to anything other than IClient.WRITE_ACCESS_ALL or IClient.WRITE_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming shared object write requests. If any item in the list completely matches the shared object name or the start of the shared object name, then access is allowed. For example, if the sharedObjectWriteAccess list is set to "testa/testb;testc" then the following requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- sharedObjectWriteAccess-
 
 - 
getStreamVideoSampleAccessString getStreamVideoSampleAccess() Get the video sample access value. see setVideoStreamAccess for more information.- Returns:
- video sample access
 
 - 
setStreamVideoSampleAccessvoid setStreamVideoSampleAccess(String videoSampleAccess) Set the stream video sample access value. This list is a semi-colon delimeted list of stream names that this client has access to. By default the value is set to IClient.VIDEOSTREAM_ACCESS_NONE which indicates this client can access no stream data client side. If you want to enable access to all stream names set this value to IClient.VIDEOSTREAM_ACCESS_ALL. If this value is set to anything other than IClient.VIDEOSTREAM_ACCESS_ALL or IClient.VIDEOSTREAM_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming stream play requests. If any item in the list completely matches the stream name or the start of the stream name, then access is allowed. For example, if the streamVideoSampleAccess list is set to "testa/testb;testc" then the following play requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- videoSampleAccess-
 
 - 
getStreamAudioSampleAccessString getStreamAudioSampleAccess() Get the audio sample access value. see setVideoStreamAccess for more information.- Returns:
- audio sample access
 
 - 
setStreamAudioSampleAccessvoid setStreamAudioSampleAccess(String audioSampleAccess) Set the stream audio sample access value. This list is a semi-colon delimeted list of stream names that this client has access to. By default the value is set to IClient.AUDIOSTREAM_ACCESS_NONE which indicates this client can access no stream data client side. If you want to enable access to all stream names set this value to IClient.AUDIOSTREAM_ACCESS_ALL. If this value is set to anything other than IClient.AUDIOSTREAM_ACCESS_ALL or IClient.AUDIOSTREAM_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming stream play requests. If any item in the list completely matches the stream name or the start of the stream name, then access is allowed. For example, if the streamAudioSampleAccess list is set to "testa/testb;testc" then the following play requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- audioSampleAccess-
 
 - 
getStreamReadAccessString getStreamReadAccess() Get the stream read access value. see setStreamReadAccess for more information.- Returns:
- stream read access value
 
 - 
setStreamReadAccessvoid setStreamReadAccess(String streamReadAccess) Set the stream object read access value. This list is a semi-colon delimeted list of stream names that this client has access to. By default the value is set to IClient.READ_ACCESS_ALL which indicates this client can play all streams. If you want to disable read access to all stream names set this value to IClient.READ_ACCESS_NONE. If this value is set to anything other than IClient.READ_ACCESS_ALL or IClient.READ_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming stream play requests. If any item in the list completely matches the stream name or the start of the stream name, then access is allowed. For example, if the streamReadAccess list is set to "testa/testb;testc" then the following play requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- streamReadAccess- shared object read access value
 
 - 
getStreamWriteAccessString getStreamWriteAccess() Get the stream write access value. see setStreamWriteAccess for more information.- Returns:
- stream write access value
 
 - 
setStreamWriteAccessvoid setStreamWriteAccess(String streamWriteAccess) Set the stream object write access value. This list is a semi-colon delimeted list of stream names that this client has access to. By default the value is set to IClient.WRITE_ACCESS_ALL which indicates this client can play all streams. If you want to disable write access to all stream names set this value to IClient.WRITE_ACCESS_NONE. If this value is set to anything other than IClient.WRITE_ACCESS_ALL or IClient.WRITE_ACCESS_NONE then each item in the semi-color delimited list is compared against incoming stream play requests. If any item in the list completely matches the stream name or the start of the stream name, then access is allowed. For example, if the streamWriteAccess list is set to "testa/testb;testc" then the following play requests would be granted the following access:- testc: Granted Access
- testc/test: Granted Access
- testC/test: Denied Access (incorrect case)
- testa/testb: Granted Access
- testa/testb123: Granted Access
- testa/testb/file123: Granted Access
- testa/test: Denied Access (incomplete match)
 - Parameters:
- streamWriteAccess- shared object read access value
 
 - 
getWriteListenercom.wowza.wms.client.ClientWriteListener getWriteListener() Object that tracks write operations- Returns:
- Object that tracks write operations
 
 - 
addAcceptConnectionAttributevoid addAcceptConnectionAttribute(String key, AMFDataObj item)Add and attribute to the resultObj that gets passed back to the client on successful connection- Parameters:
- key- key
- item- item to add
 
 - 
addAcceptConnectionAttributevoid addAcceptConnectionAttribute(String key, String item)Add and attribute to the resultObj that gets passed back to the client on successful connection- Parameters:
- key- key
- item- item to add
 
 - 
getRepeaterOriginUrlString getRepeaterOriginUrl() Get the origin URL used by the Live Stream Repeater- Returns:
- URL used by the Live Stream Repeater
 
 - 
setRepeaterOriginUrlvoid setRepeaterOriginUrl(String repeaterOriginUrl) Set the origin URL used by the Live Stream Repeater- Parameters:
- repeaterOriginUrl- URL used by the Live Stream Repeater
 
 - 
getLastValidateTimelong getLastValidateTime() Get last time (millisecond) the connection was validated with a ping- Returns:
- last time (millisecond) the connection was validated with a ping
 
 - 
setLastValidateTimevoid setLastValidateTime(long lastValidateTime) Set the last time (milliseconds) the connection was validated with ping- Parameters:
- lastValidateTime- last time (milliseconds) the connection was validated with ping
 
 - 
getPingTimeoutint getPingTimeout() Get the ping timeout (milliseconds)- Returns:
- ping timeout (milliseconds)
 
 - 
isLiveRepeaterboolean isLiveRepeater() Returns true if this connection is from the live stream repeater- Returns:
- true if this connection is from the live stream repeater
 
 - 
isFlashVersionH264Capableboolean isFlashVersionH264Capable() Returns true if the connected client is capable of playing H.264 video (Flash player 9.0.45.x or greater)- Returns:
- returns true if the connected client is capable of playing H.264 video (Flash player 9.0.45.x or greater)
 
 - 
isFlashVersion90115boolean isFlashVersion90115() Returns true if the Flash version is equal or greater than 9.0.115.x- Returns:
- returns true if the Flash version is equal or greater than 9.0.115.x
 
 - 
isFlashVersion10boolean isFlashVersion10() Returns true if the Flash version is equal or greater than 10.x.x.x- Returns:
- returns true if the Flash version is equal or greater than 10.x.x.x
 
 - 
isFlashMediaLiveEncoderboolean isFlashMediaLiveEncoder() Returns true if this connection is the Flash Media Live Encoder- Returns:
- true if this connection is the Flash Media Live Encoder
 
 - 
testFlashVersionint testFlashVersion(int[] version) Test to see if the connected client flash version is equal to or greater than a given value. Example: int isGood = testFlashVersion( { 9, 0, 5, 12} );- Parameters:
- version- array of version values
- Returns:
- 1 if greater, 0 if equal, -1 if less then
 
 - 
isObjectEncodingAMF3boolean isObjectEncodingAMF3() Is the object encoding for this client AMF3- Returns:
- true of the object encoding for this client is AMF3
 
 - 
isObjectEncodingAMF0boolean isObjectEncodingAMF0() Is the object encoding for this client AMF0- Returns:
- true of the object encoding for this client is AMF0
 
 - 
setObjectEncodingvoid setObjectEncoding(int objectEncoding) Set the object encoding level- Parameters:
- objectEncoding- object encoding level
 
 - 
getObjectEncodingint getObjectEncoding() Get the object encoding level- Returns:
- object encoding level
 
 - 
setAcceptConnectionObjvoid setAcceptConnectionObj(AMFData acceptConnectionObj) Call this method from onConnect to add an "application" property to the info object that is passed back to the Flash client in the onStatus handler.- Parameters:
- acceptConnectionObj- connection object
 
 - 
setAcceptConnectionDescriptionvoid setAcceptConnectionDescription(String description) Call this method from onConnect to set the info.description property returned in NetConnection onStatus handler- Parameters:
- description- description
 
 - 
setAcceptConnectionExObjvoid setAcceptConnectionExObj(AMFDataObj acceptConnectionExObj) Call this method from onConnect to set the info.ex property returned in NetConnection onStatus handler- Parameters:
- acceptConnectionExObj- exObj AMFData item return in info.ex propert of NetConnection onStatus handler
 
 - 
getRTPStreamRTPStream getRTPStream() If this client was created due to an RTP connection to the server return the underlying RTPStream object- Returns:
- underlying RTPStream object
 
 - 
setAcceptConnectionvoid setAcceptConnection(boolean acceptConnection) Set the default for accept connection- Parameters:
- acceptConnection- default for accept connection
 
 - 
setShutdownClientvoid setShutdownClient(boolean shutdownClient) Gracefully and forcefully shutdown a client.- Parameters:
- shutdownClient- set to true to gracefully and forcefully shutdown a client
 
 - 
reparentClientvoid reparentClient(IVHost vhost) Move a client object to a new vhost. This can only be done right after the handshake process has completed. See IVHostNotify.onVHostClientConnect.- Parameters:
- vhost- new vhost
 
 - 
getMaximumSetBufferTimeint getMaximumSetBufferTime() Get maximum number of milliseconds allowed for the NetStream.setBufferTime(secs) call. If set to zero this feature is turned off.- Returns:
- maximum number of milliseconds allowed for the NetStream.setBufferTime(secs) call
 
 - 
getMaximumPendingWriteBytesint getMaximumPendingWriteBytes() Get maximum number a bytes a client connection can have waiting to be sent before the connection is terminated. If set to zero this feature is turned off.- Returns:
- maximum number a bytes a client connection can have waiting to be sent before the connection is terminated
 
 - 
getLiveStreamPacketizerListString getLiveStreamPacketizerList() Get the comma separated list of LiveStreamPacketizers names being used by this client (see conf/LiveStreamPacketizers.xml)- Returns:
- comma separated list of LiveStreamPacketizers names
 
 - 
setLiveStreamPacketizerListvoid setLiveStreamPacketizerList(String liveStreamPacketizerList) Set the comma separated list of LiveStreamPacketizers names being used by this client (see conf/LiveStreamPacketizers.xml)- Parameters:
- liveStreamPacketizerList- comma separated list of LiveStreamPacketizers names
 
 - 
getLiveStreamTranscoderListString getLiveStreamTranscoderList() Get the comma separated list of LiveStreamTranscoders names being used by this client (see conf/LiveStreamTranscoders.xml)- Returns:
- comma separated list of LiveStreamTranscoders names
 
 - 
setLiveStreamTranscoderListvoid setLiveStreamTranscoderList(String liveStreamTranscoderList) Set the comma separated list of LiveStreamTranscoders names being used by this client (see conf/LiveStreamTranscoders.xml)- Parameters:
- liveStreamTranscoderList- comma separated list of LiveStreamTranscoders names
 
 - 
getElapsedTimeElapsedTimer getElapsedTime() Get elapsed time client has been connected.- Returns:
- elapsed time client has been connected.
 
 - 
getLiveRepeaterCapabilitiesint getLiveRepeaterCapabilities() Get the live repeater capabilities of this connection- Returns:
- live repeater capabilities of this connection
 
 - 
setLiveRepeaterCapabilitiesvoid setLiveRepeaterCapabilities(int liveRepeaterCapabilities) Set the live repeater capabilities of this connection- Parameters:
- liveRepeaterCapabilities- live repeater capabilities of this connection
 
 - 
fcSubscribevoid fcSubscribe(String streamName) Subscribe to a live stream (for live stream repeater to start start from edge to origin)- Parameters:
- streamName- stream name
 
 - 
fcSubscribevoid fcSubscribe(String streamName, String mediaCasterType)Subscribe to a live stream (use a particular mediaCasterType)- Parameters:
- streamName- stream name
- mediaCasterType- media caster type name
 
 - 
fcUnSubscribeAllvoid fcUnSubscribeAll() UnSubscribe to all streams that this client is current subscribed to
 - 
fcUnSubscribevoid fcUnSubscribe(String streamName) UnSubscribe from a stream- Parameters:
- streamName- stream name
 
 - 
isValidateFMLEConnectionsboolean isValidateFMLEConnections() Returns true if validating FMLE connection (default is false)- Returns:
- true if validating FMLE connection
 
 - 
setValidateFMLEConnectionsvoid setValidateFMLEConnections(boolean validateFMLEConnections) Returns true if validating FMLE connection (default is false)- Parameters:
- validateFMLEConnections- true if validating FMLE connection
 
 - 
setThreadContextvoid setThreadContext() Set the thread logging context to this client
 - 
getWowzSessioncom.wowza.wms.protocol.wowz.WOWZSession getWowzSession() 
 - 
setWowzSessionvoid setWowzSession(com.wowza.wms.protocol.wowz.WOWZSession wowzSession) 
 - 
isSendCloseOnRejectConnectionboolean isSendCloseOnRejectConnection() 
 - 
setSendCloseOnRejectConnectionvoid setSendCloseOnRejectConnection(boolean sendCloseOnRejectConnection) 
 
- 
 
-