Interface IClient


  • public interface IClient

    IClient: public interface to Client object.

    • Method Detail

      • getClientId

        int getClientId()
        Get client id. Assigned by server and connection time.
        Returns:
        client id
      • getFlashVer

        String getFlashVer()
        Get client flash version
        Returns:
        client flash version string
      • setFlashVer

        void setFlashVer​(String flashVer)
        Set client flash version
        Parameters:
        flashVer - client flash version string
      • getTotalIOPerformanceCounter

        IOPerformanceCounter getTotalIOPerformanceCounter()
        Get performance counter for all bytes transferred to this client. This includes function calls.
        Returns:
        performance counter
      • getMediaIOPerformanceCounter

        IOPerformanceCounter getMediaIOPerformanceCounter()
        Get performance counter for media bytes transferred to this client. Only includes bytes to mediaStream objects
        Returns:
        performance counter
      • getAppInstance

        IApplicationInstance getAppInstance()
        Get parent applicationInstance. Is null if connection reject or before accepted.
        Returns:
        parent applicationInstance
      • getApplication

        IApplication getApplication()
        Get parent application. Is null if connection reject or before accepted.
        Returns:
        application
      • getPlayStreams

        java.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 Streams

        IClient 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
      • getPublishStreams

        java.util.List getPublishStreams()
        Get a collection of publish streams. Publish streams are streams that are created due to a call to publish.

        Iterate Public Streams

        IClient 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
      • getPlayStreamCount

        int getPlayStreamCount()
        Get the number of play streams
        Returns:
        number of play streams
      • getPublishStreamCount

        int getPublishStreamCount()
        Get the number of publish streams
        Returns:
        number of publish streams
      • shutdownClient

        void 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)
      • touch

        void touch()
        Update the last touch time for client
      • isConnected

        boolean isConnected()
        Is this client connected
        Returns:
        is connected
      • getProperties

        WMSProperties getProperties()
        Get client properties
        Returns:
        collection of client properties
      • getStreamType

        String getStreamType()
        Get default streamType
        Returns:
        streamType
      • setStreamType

        void setStreamType​(String streamType)
        Set default streamType
        Parameters:
        streamType - streamType
      • isAcceptConnection

        boolean isAcceptConnection()
        Is auto accept connection
        Returns:
        auto accept connection
      • acceptConnection

        void acceptConnection()
        Accept connection
      • acceptConnection

        void acceptConnection​(String successStr)
        Accept connection
        Parameters:
        successStr - application property value added to NetConnection.Connect.Success event object
      • acceptConnection

        void acceptConnection​(AMFData successObj)
        Accept connection
        Parameters:
        successObj - application property value added to NetConnection.Connect.Success event object
      • rejectConnection

        void rejectConnection()
        Reject connection (NetConnection.onStatus handler returns info.code of NetConnection.Connect.Rejected)
      • rejectConnection

        void 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)
      • rejectConnection

        void 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)
      • rejectConnection

        void 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)
      • rejectConnection

        void 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)
      • redirectConnection

        void 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)
      • redirectConnection

        void 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)
      • redirectConnection

        void 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)
      • redirectConnection

        void 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)
      • isAcceptConnectionSendClientId

        boolean isAcceptConnectionSendClientId()
        Include the client id in the accept connection response
        Returns:
        true if client id is included
      • setAcceptConnectionSendClientId

        void setAcceptConnectionSendClientId​(boolean acceptConnectionSendClientId)
        Include the client id in the connection response
        Parameters:
        acceptConnectionSendClientId - true if client id is included
      • getVHost

        IVHost getVHost()
        Get parent vHost
        Returns:
        vHost object
      • call

        void call​(String handlerName,
                  IModuleCallResult resultObj,
                  Object... params)
        Call client method/handler. You can call any method/handler attached to NetConnection object. Such as netConnection.myFunc

        Call Client Handler Method With Result Object

        IClient 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
      • call

        void call​(String handlerName)
        Simplified call client method/handler call. No resultObj. No parameters
        Parameters:
        handlerName - handler name
      • ping

        int 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 Stopped

        class 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
      • getIp

        String getIp()
        Client ip address
        Returns:
        client ip address
      • getForwardedIP

        String getForwardedIP()
        Get the forwarded IP of the connected client, if available. Default retrurns null
        Returns:
      • setForwardedIP

        void setForwardedIP​(String IP)
        Set the forwarded IP of the connected client.
        Parameters:
        IP -
      • getFastPlaySettings

        com.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
      • setFastPlaySettings

        void setFastPlaySettings​(com.wowza.wms.stream.FastPlaySettings fastPlaySettings)
        Set fastPlay settings
        Parameters:
        fastPlaySettings - fastPlay settings
      • clearFastPlaySettings

        void clearFastPlaySettings()
        Force clear the fastPlay settings
      • getRespFunctions

        ResponseFunctions 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 Client

        
        ResponseFunctions 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
      • getConnectTime

        long 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)
      • getPingRoundTripTime

        long getPingRoundTripTime()
        Get turn around time (milliseconds) of last ping request
        Returns:
        time (milliseconds)
      • getDateStarted

        String getDateStarted()
        Get date and time of client connection
        Returns:
        date and time of connection
      • getTimeRunning

        String getTimeRunning()
        Get elapsed time of connection
        Returns:
        elapsed time of connection
      • getTimeRunningSeconds

        double getTimeRunningSeconds()
        Get time running in seconds
        Returns:
        time running in seconds
      • getStreamFile

        java.io.File getStreamFile​(String streamName)
        Get File object for stream with given name. Assumes file extension is .flv.
        Parameters:
        streamName - stream name
        Returns:
        file
      • getStreamFile

        java.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 Descriptor

        
        IClient 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
      • getStreamFile

        java.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
      • getBufferTime

        int getBufferTime()
        Get default buffer time for newly created mediaStream objects
        Returns:
        default buffer time (millseconds)
      • setBufferTime

        void setBufferTime​(int bufferTime)
        Set default buffer time for newly created mediaStream objects
        Parameters:
        bufferTime - bufer time (milliseconds)
      • getResponseAMFObj

        AMFObj getResponseAMFObj​(int index)
        Get the response channel AMFObj for channel index.
        Parameters:
        index - channel index
        Returns:
        AMFObj
      • getRespAMFAudioObj

        AMFObj getRespAMFAudioObj​(IMediaStream stream)
        Get the audio response AMFObj for a given mediaStream
        Parameters:
        stream - mediaStream
        Returns:
        response channel AMFObj
      • getRespAMFVideoObj

        AMFObj getRespAMFVideoObj​(IMediaStream stream)
        Get the video response AMFObj for a given mediaStream
        Parameters:
        stream - mediaStream
        Returns:
        response channel AMFObj
      • getRespAMFDataObj

        AMFObj getRespAMFDataObj​(IMediaStream stream)
        Get the data response AMFObj for a given mediaStream
        Parameters:
        stream - mediaStream
        Returns:
        response channel AMFObj
      • getQueryStr

        String 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 be data1=myData1&data2=myData2
        Returns:
        query string
      • getReferrer

        String 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 server

        
        public 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
      • getPageUrl

        String getPageUrl()
        Get the pageUrl for this connection.
        Returns:
        pageUrl for this connection
      • getUri

        String getUri()
        Get the full URI of the connection string
        Returns:
        URI of connection string
      • getProtocol

        int getProtocol()
        Get connection protocol (1 = RTMP, 3 = RTMPT)
        Returns:
        connection protocol (1 = RTMP, 3 = RTMPT)
      • getServerHostPort

        HostPort getServerHostPort()
        Get the hostPort object for the connection that is servicing this client
        Returns:
        vHost hostPort servicing request
      • isSecure

        boolean 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)
      • isSSL

        boolean isSSL()
        Is this connection SSL (RTMPS)
        Returns:
        is connection (RTMPS)
      • isEncrypted

        boolean isEncrypted()
        Is this connection encrypted (RTMPE or RTMPTE)
        Returns:
        is connection encrypted (RTMPE or RTMPTE)
      • getIdleFrequency

        int getIdleFrequency()
        Get client idle frequency (milliseconds)
        Returns:
        client idle frequency (milliseconds)
      • setIdleFrequency

        void setIdleFrequency​(int idleFrequency)
        Set client idle frequency (milliseconds)
        Parameters:
        idleFrequency - client idle frequency (milliseconds)
      • getSharedObjectReadAccess

        String getSharedObjectReadAccess()
        Get the shared object read access value. see setSharedObjectReadAccess for more information.
        Returns:
        shared object read access value
      • setSharedObjectReadAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        sharedObjectReadAccess - shared object read access value
      • getSharedObjectWriteAccess

        String getSharedObjectWriteAccess()
        Get the shared object write access value. see setSharedObjectWriteAccess for more information.
        Returns:
        shared object write access value
      • setSharedObjectWriteAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        sharedObjectWriteAccess -
      • getStreamVideoSampleAccess

        String getStreamVideoSampleAccess()
        Get the video sample access value. see setVideoStreamAccess for more information.
        Returns:
        video sample access
      • setStreamVideoSampleAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        videoSampleAccess -
      • getStreamAudioSampleAccess

        String getStreamAudioSampleAccess()
        Get the audio sample access value. see setVideoStreamAccess for more information.
        Returns:
        audio sample access
      • setStreamAudioSampleAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        audioSampleAccess -
      • getStreamReadAccess

        String getStreamReadAccess()
        Get the stream read access value. see setStreamReadAccess for more information.
        Returns:
        stream read access value
      • setStreamReadAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        streamReadAccess - shared object read access value
      • getStreamWriteAccess

        String getStreamWriteAccess()
        Get the stream write access value. see setStreamWriteAccess for more information.
        Returns:
        stream write access value
      • setStreamWriteAccess

        void 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)
        Values in this list are always case sensitive.
        Parameters:
        streamWriteAccess - shared object read access value
      • getWriteListener

        com.wowza.wms.client.ClientWriteListener getWriteListener()
        Object that tracks write operations
        Returns:
        Object that tracks write operations
      • addAcceptConnectionAttribute

        void 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
      • addAcceptConnectionAttribute

        void 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
      • getRepeaterOriginUrl

        String getRepeaterOriginUrl()
        Get the origin URL used by the Live Stream Repeater
        Returns:
        URL used by the Live Stream Repeater
      • setRepeaterOriginUrl

        void setRepeaterOriginUrl​(String repeaterOriginUrl)
        Set the origin URL used by the Live Stream Repeater
        Parameters:
        repeaterOriginUrl - URL used by the Live Stream Repeater
      • getLastValidateTime

        long getLastValidateTime()
        Get last time (millisecond) the connection was validated with a ping
        Returns:
        last time (millisecond) the connection was validated with a ping
      • setLastValidateTime

        void 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
      • getPingTimeout

        int getPingTimeout()
        Get the ping timeout (milliseconds)
        Returns:
        ping timeout (milliseconds)
      • isLiveRepeater

        boolean isLiveRepeater()
        Returns true if this connection is from the live stream repeater
        Returns:
        true if this connection is from the live stream repeater
      • isFlashVersionH264Capable

        boolean 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)
      • isFlashVersion90115

        boolean 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
      • isFlashVersion10

        boolean 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
      • isFlashMediaLiveEncoder

        boolean isFlashMediaLiveEncoder()
        Returns true if this connection is the Flash Media Live Encoder
        Returns:
        true if this connection is the Flash Media Live Encoder
      • testFlashVersion

        int 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
      • isObjectEncodingAMF3

        boolean isObjectEncodingAMF3()
        Is the object encoding for this client AMF3
        Returns:
        true of the object encoding for this client is AMF3
      • isObjectEncodingAMF0

        boolean isObjectEncodingAMF0()
        Is the object encoding for this client AMF0
        Returns:
        true of the object encoding for this client is AMF0
      • setObjectEncoding

        void setObjectEncoding​(int objectEncoding)
        Set the object encoding level
        Parameters:
        objectEncoding - object encoding level
      • getObjectEncoding

        int getObjectEncoding()
        Get the object encoding level
        Returns:
        object encoding level
      • setAcceptConnectionObj

        void 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
      • setAcceptConnectionDescription

        void setAcceptConnectionDescription​(String description)
        Call this method from onConnect to set the info.description property returned in NetConnection onStatus handler
        Parameters:
        description - description
      • setAcceptConnectionExObj

        void 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
      • getRTPStream

        RTPStream getRTPStream()
        If this client was created due to an RTP connection to the server return the underlying RTPStream object
        Returns:
        underlying RTPStream object
      • setAcceptConnection

        void setAcceptConnection​(boolean acceptConnection)
        Set the default for accept connection
        Parameters:
        acceptConnection - default for accept connection
      • setShutdownClient

        void setShutdownClient​(boolean shutdownClient)
        Gracefully and forcefully shutdown a client.
        Parameters:
        shutdownClient - set to true to gracefully and forcefully shutdown a client
      • reparentClient

        void 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
      • getMaximumSetBufferTime

        int 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
      • getMaximumPendingWriteBytes

        int 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
      • getLiveStreamPacketizerList

        String 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
      • setLiveStreamPacketizerList

        void 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
      • getLiveStreamTranscoderList

        String 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
      • setLiveStreamTranscoderList

        void 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
      • getElapsedTime

        ElapsedTimer getElapsedTime()
        Get elapsed time client has been connected.
        Returns:
        elapsed time client has been connected.
      • getLiveRepeaterCapabilities

        int getLiveRepeaterCapabilities()
        Get the live repeater capabilities of this connection
        Returns:
        live repeater capabilities of this connection
      • setLiveRepeaterCapabilities

        void setLiveRepeaterCapabilities​(int liveRepeaterCapabilities)
        Set the live repeater capabilities of this connection
        Parameters:
        liveRepeaterCapabilities - live repeater capabilities of this connection
      • fcSubscribe

        void fcSubscribe​(String streamName)
        Subscribe to a live stream (for live stream repeater to start start from edge to origin)
        Parameters:
        streamName - stream name
      • fcSubscribe

        void fcSubscribe​(String streamName,
                         String mediaCasterType)
        Subscribe to a live stream (use a particular mediaCasterType)
        Parameters:
        streamName - stream name
        mediaCasterType - media caster type name
      • fcUnSubscribeAll

        void fcUnSubscribeAll()
        UnSubscribe to all streams that this client is current subscribed to
      • fcUnSubscribe

        void fcUnSubscribe​(String streamName)
        UnSubscribe from a stream
        Parameters:
        streamName - stream name
      • isValidateFMLEConnections

        boolean isValidateFMLEConnections()
        Returns true if validating FMLE connection (default is false)
        Returns:
        true if validating FMLE connection
      • setValidateFMLEConnections

        void setValidateFMLEConnections​(boolean validateFMLEConnections)
        Returns true if validating FMLE connection (default is false)
        Parameters:
        validateFMLEConnections - true if validating FMLE connection
      • setThreadContext

        void setThreadContext()
        Set the thread logging context to this client
      • getWowzSession

        com.wowza.wms.protocol.wowz.WOWZSession getWowzSession()
      • setWowzSession

        void setWowzSession​(com.wowza.wms.protocol.wowz.WOWZSession wowzSession)
      • isSendCloseOnRejectConnection

        boolean isSendCloseOnRejectConnection()
      • setSendCloseOnRejectConnection

        void setSendCloseOnRejectConnection​(boolean sendCloseOnRejectConnection)