Interface IHTTPStreamerSession

All Known Implementing Classes:
com.wowza.wms.httpstreamer.model.HTTPStreamerSessionBase, HTTPStreamerSessionCupertino, HTTPStreamerSessionDirect, HTTPStreamerSessionMPEGDash, HTTPStreamerSessionTS, HTTPStreamerSessionWebM

public interface IHTTPStreamerSession

IHTTPStreamerSession: HTTP streaming session interface

  • Field Details

  • Method Details

    • getSessionId

      String getSessionId()
      Get session id
      Returns:
      session id
    • setSessionId

      void setSessionId(String sessionId)
      Set session id
      Parameters:
      sessionId - session id
    • getVHost

      IVHost getVHost()
      Get vhost
      Returns:
      vhost
    • setVHost

      void setVHost(IVHost vhost)
      Set vhost
      Parameters:
      vhost - vhost
    • touch

      void touch(long timecode)
      Touch this session to keep it active.
      Parameters:
      timecode - timecode of touch - System.currentTimeMillis();
    • isTimeout

      boolean isTimeout(long timecode)
      Return true if this session is timed out.
      Parameters:
      timecode - last touch - System.currentTimeMillis();
      Returns:
      true, if timed out
    • isDelete

      boolean isDelete()
      Return true if this session is flagged for deletion.
      Returns:
      true, if flagged for deletion
    • getLock

      Object getLock()
      Get the synchronization lock for this HTTP session
      Returns:
      synchronization lock
    • shutdown

      void shutdown()
      Called then the HTTP session is shutting down
    • isActive

      boolean isActive()
      Is this session active, false after shutdown
      Returns:
      true if session is active
    • setActive

      void setActive(boolean isActive)
      Set session active
      Parameters:
      isActive - session active
    • getStream

      IMediaStream getStream()
      Get the IMediaStream associated with this HTTP session
      Returns:
      IMediaStream associated with this HTTP session
    • setStream

      void setStream(IMediaStream stream)
      Set the IMediaStream associated with this HTTP session
      Parameters:
      stream - IMediaStream associated with this HTTP session
    • isTimeoutSession

      boolean isTimeoutSession()
      Get is session timeout.
      Returns:
      true if this session is timed out
    • setTimeoutSession

      void setTimeoutSession(boolean timeoutSession)
      Set is session timeout.
      Parameters:
      timeoutSession - true if this session is timed out
    • isDeleteSession

      boolean isDeleteSession()
      Get is session to be deleted.
      Returns:
      true if this session is flagged for deletion
    • setDeleteSession

      void setDeleteSession()
      Set session to be deleted.
    • getSessionTimeout

      int getSessionTimeout()
      Get the session timeout for this session (milliseconds)
      Returns:
      session timeout for this session (milliseconds)
    • setSessionTimeout

      void setSessionTimeout(int sessionTimeout)
      Set the session timeout for this session (milliseconds)
      Parameters:
      sessionTimeout - session timeout for this session (milliseconds)
    • isValidated

      boolean isValidated()
      Has this session been validated
      Returns:
      true, if validated
    • checkAndSetPlayLogged

      boolean checkAndSetPlayLogged()
      If play has not been logged return false, else returns true, sets play has been logged
      Returns:
      true, if play has been logged
    • isPlayLogged

      boolean isPlayLogged()
      true, if play has been logged
      Returns:
      true, if play has been logged
    • setPlayLogged

      void setPlayLogged(boolean isPlayLogged)
      true, if play has been logged
      Parameters:
      isPlayLogged - true, if play has been logged
    • addIOPerformance

      void addIOPerformance(IOPerformanceCounter totalIOPerformanceResult)
      Internal user, keep track of IO performance
      Parameters:
      totalIOPerformanceResult - IO performance
    • addIOPerformance2

      void addIOPerformance2(IOPerformanceCounter totalIOPerformanceResult)
      Internal user, keep track of IO performance
      Parameters:
      totalIOPerformanceResult - IO performance
    • getConnectionHolder

      com.wowza.wms.client.ConnectionHolder getConnectionHolder()
      Connection holder for this session
      Returns:
      connection holder
    • getHTTPStreamerAdapter

      IHTTPStreamerAdapter getHTTPStreamerAdapter()
      Get the HTTP streaming adapter associated with this HTTP session
      Returns:
      HTTP streaming adapter
    • setHTTPStreamerAdapter

      void setHTTPStreamerAdapter(IHTTPStreamerAdapter httpStreamerAdapter)
      Set the HTTP streaming adapter associated with this HTTP session
      Parameters:
      httpStreamerAdapter - HTTP streaming adapter
    • getAppInstance

      IApplicationInstance getAppInstance()
      Get the application instance associated with this HTTP session
      Returns:
      application instance associated with this HTTP session
    • setAppInstance

      void setAppInstance(IApplicationInstance appInstance)
      Set the application instance associated with this HTTP session
      Parameters:
      appInstance - application instance associated with this HTTP session
    • getSessionType

      int getSessionType()
      Get session type: see SESSIONTYPE_*
      Returns:
      session type: see SESSIONTYPE_*
    • setSessionType

      void setSessionType(int sessionType)
      Set session type: see SESSIONTYPE_*
      Parameters:
      sessionType - session type: see SESSIONTYPE_*
    • getLiveStreamingPacketizer

      String getLiveStreamingPacketizer()
      Get the live stream packetizer name
      Returns:
      live stream packetizer name
    • setLiveStreamingPacketizer

      void setLiveStreamingPacketizer(String liveStreamingPacketizer)
      Set the live stream packetizer name
      Parameters:
      liveStreamingPacketizer - live stream packetizer name
    • getIpAddress

      String getIpAddress()
      Get the IP address
      Returns:
      IP address
    • setIpAddress

      void setIpAddress(String ipAddress)
      Set the IP address
      Parameters:
      ipAddress - IP address
    • getForwardedIP

      String getForwardedIP()
      Get the x-[real|forwarded] IP address
      Returns:
      IP address
    • setForwardedIP

      void setForwardedIP(String ipAddress)
      Set the x-[real|forwarded] IP address
      Parameters:
      ipAddress - IP address
    • updateLoggingValues

      void updateLoggingValues()
      Internal user, update logging values
    • clearLoggingValues

      void clearLoggingValues()
      Internal user, clear logging values
    • getSessionProtocol

      int getSessionProtocol()
      Get protocol, see SESSIONPROTOCOL_*
      Returns:
      protocol, see SESSIONPROTOCOL_*
    • setSessionProtocol

      void setSessionProtocol(int sessionProtocol)
      Set protocol, see SESSIONPROTOCOL_*
      Parameters:
      sessionProtocol - protocol, see SESSIONPROTOCOL_*
    • getSessionFormat

      int getSessionFormat()
      Get format, see SESSIONFORMAT_*
      Returns:
      format, see SESSIONFORMAT_*
    • setSessionFormat

      void setSessionFormat(int sessionFormat)
      Set format, see SESSIONFORMAT_*
      Parameters:
      sessionFormat - format, see SESSIONFORMAT_*
    • getServerIp

      String getServerIp()
      Get server IP address
      Returns:
      server IP address
    • setServerIp

      void setServerIp(String serverIp)
      Set server IP address
      Parameters:
      serverIp - server IP address
    • getServerPort

      int getServerPort()
      Get server port
      Returns:
      server port
    • setServerPort

      void setServerPort(int serverPort)
      Set server port
      Parameters:
      serverPort - server port
    • getUserAgent

      String getUserAgent()
      Get user agent
      Returns:
      user agent
    • setUserAgent

      void setUserAgent(String userAgent)
      Set user agent
      Parameters:
      userAgent - user agent
    • getUri

      String getUri()
      Get the URI associated with initial request
      Returns:
      URI associated with initial request
    • setUri

      void setUri(String uri)
      Set the URI associated with initial request
      Parameters:
      uri - URI associated with initial request
    • getReferrer

      String getReferrer()
      Get referrer
      Returns:
      referrer
    • setReferrer

      void setReferrer(String referrer)
      Set referrer
      Parameters:
      referrer - referrer
    • getQueryStr

      String getQueryStr()
      Get query string
      Returns:
      query string
    • setQueryStr

      void setQueryStr(String queryStr)
      Set query string
      Parameters:
      queryStr - query string
    • lockRepeaterStreams

      void lockRepeaterStreams(List<String> streamNames, String liveStreamPacketizer, String liveStreamRepeater, String streamTypeStr)
      Internal user, lock in reapter streams
      Parameters:
      streamNames - list of stream names
      liveStreamPacketizer - live stream packetizer name
      liveStreamRepeater - live repeater name
      streamTypeStr - stream type
    • rejectSession

      void rejectSession()
      Reject this HTTP session. No further processing should occur
    • acceptSession

      void acceptSession()
      Accept the HTTP session.
    • isAcceptSession

      boolean isAcceptSession()
      Return true if this session has not been rejected
      Returns:
      true if this session has not been rejected
    • setAcceptSession

      void setAcceptSession(boolean acceptSession)
      Set to false to reject session
      Parameters:
      acceptSession - false to reject session
    • getCookieStr

      String getCookieStr()
      Get cookie string
      Returns:
      cookie string
    • setCookieStr

      void setCookieStr(String cookieStr)
      Set cookie string
      Parameters:
      cookieStr - cookie string
    • getStreamName

      String getStreamName()
      Get stream name
      Returns:
      stream name
    • setStreamName

      void setStreamName(String streamName)
      Set stream name
      Parameters:
      streamName - stream name
    • getStreamExt

      String getStreamExt()
      Get stream extension
      Returns:
      stream extension
    • setStreamExt

      void setStreamExt(String streamExt)
      Set stream extension
      Parameters:
      streamExt - stream extension
    • getStreamNameParts

      com.wowza.wms.httpstreamer.model.HTTPStreamerStreamNameParts getStreamNameParts(String streamName)
      Break the stream name into parts
      Parameters:
      streamName - stream name
      Returns:
      stream name parts
    • containsStreamNameParts

      boolean containsStreamNameParts(String streamName)
      Return true if stream name in stream name parts
      Parameters:
      streamName - stream name
      Returns:
      true if stream name in stream name parts
    • putStreamNameParts

      void putStreamNameParts(String streamName, com.wowza.wms.httpstreamer.model.HTTPStreamerStreamNameParts streamNameParts)
      Add stream name to stream name parts
      Parameters:
      streamName - stream name
      streamNameParts - stream name parts
    • getStreamPosition

      long getStreamPosition()
      Get stream position
      Returns:
      stream position
    • setStreamPosition

      void setStreamPosition(long streamPosition)
      Set stream position (will not cause seek)
      Parameters:
      streamPosition - stream position
    • getIOPerformanceCounter

      IOPerformanceCounter getIOPerformanceCounter()
      Get IO performance counter
      Returns:
      IO performance counter
    • getFileInfo

      com.wowza.wms.httpstreamer.model.HTTPStreamerFileInfo getFileInfo(String streamName)
      Get the file information if video on demand streaming
      Parameters:
      streamName - stream name
      Returns:
      file information
    • putFileInfo

      void putFileInfo(String streamName, com.wowza.wms.httpstreamer.model.HTTPStreamerFileInfo fileInfo)
      Set the file information
      Parameters:
      streamName - stream name
      fileInfo - file information
    • isFileInfo

      boolean isFileInfo(String streamName)
      Return true if the is file information for a given stream name
      Parameters:
      streamName - stream name
      Returns:
      true if the is file information for a given stream name
    • isValidStreamDomainStr

      boolean isValidStreamDomainStr(String streamDomainStr)
      Internal user, is stream name valid for HTTP session
      Parameters:
      streamDomainStr - stream name
      Returns:
      true if valid
    • validStreamDomainToString

      String validStreamDomainToString()
      Return the valid domain strings as a string
      Returns:
      valid domain strings as a string
    • containsStreamDomainStr

      boolean containsStreamDomainStr(String streamDomainStr)
      Internal user, test stream name
      Parameters:
      streamDomainStr - stream name
      Returns:
      true if valid
    • removeStreamDomainStr

      void removeStreamDomainStr(String streamDomainStr)
      Internal user, remove stream name
      Parameters:
      streamDomainStr - stream name
    • addStreamDomainStr

      void addStreamDomainStr(String streamDomainStr)
      Internal user, add stream name
      Parameters:
      streamDomainStr - stream name
    • addStreamDomainStrs

      void addStreamDomainStrs(List<String> streamNames)
      Internal user, add stream names
      Parameters:
      streamNames - stream names
    • getElapsedTime

      ElapsedTimer getElapsedTime()
      Get the elapsed timer to see how long this session has been running
      Returns:
      elapsed timer (milliseconds)
    • getTimeRunning

      String getTimeRunning()
      Get the time this session has been running (milliseconds)
      Returns:
      time this session has been running (milliseconds)
    • getTimeRunningSeconds

      double getTimeRunningSeconds()
      Get the time this session has been running (seconds)
      Returns:
      time this session has been running (seconds)
    • getProperties

      WMSProperties getProperties()
      Get the properties associated with this session
      Returns:
      properties
    • getUserQueryStr

      String getUserQueryStr()
      This query string will be added to URLs used in HTTP streaming
      Returns:
      user query string
    • setUserQueryStr

      void setUserQueryStr(String userQueryStr)
      This query string will be added to URLs used in HTTP streaming
      Parameters:
      userQueryStr - user query string
    • setDvrSessionInfo

      void setDvrSessionInfo(com.wowza.wms.httpstreamer.model.DvrSessionInfo dvr)
      This information is used to manage the connection to the DVR store.
      Parameters:
      dvr - The DVR session info.
    • getDvrSessionInfo

      com.wowza.wms.httpstreamer.model.DvrSessionInfo getDvrSessionInfo()
      This information is used to manage the connection to the DVR store.
      Returns:
      DVR session info.
    • extractHTTPRequestInfo

      void extractHTTPRequestInfo(IHTTPRequest req)
      Extract information from HTTP request
      Parameters:
      req - HTTP request
    • getHTTPHeaderMap

      Map<String,String> getHTTPHeaderMap()
      Get a copy of the HTTP request header map
      Returns:
      copy of the HTTP request header map
    • getHTTPHeader

      String getHTTPHeader(String name)
      Get a HTTP header value such as 'Content-Length'
      Parameters:
      name - header name
      Returns:
      header value
    • getHTTPIntHeader

      int getHTTPIntHeader(String name)
      Get a HTTP header value such as 'Content-Length' and return as int
      Parameters:
      name - header name
      Returns:
      header value
    • getHTTPHeaderNames

      Set<String> getHTTPHeaderNames()
      Get a Set of the header names
      Returns:
      Set of header names
    • getPlayStart

      long getPlayStart()
      Get the play start time offset (milliseconds) for video on demand playback.
      Returns:
      play start time offset (milliseconds)
    • setPlayStart

      void setPlayStart(long playStart)
      Set the play start time offset (milliseconds) for video on demand playback.
      Parameters:
      playStart - play start time offset (milliseconds)
    • getPlayDuration

      long getPlayDuration()
      Get the play duration (milliseconds) for video on demand playback. A values of -1 means play to end.
      Returns:
      play duration (milliseconds)
    • setPlayDuration

      void setPlayDuration(long playDuration)
      Set the play duration (milliseconds) for video on demand playback. A values of -1 means play to end.
      Parameters:
      playDuration - play duration (milliseconds)
    • getPlaySeek

      long getPlaySeek()
      Get the seek location (milliseconds) where playback should start
      Returns:
      seek location (milliseconds)
    • setPlaySeek

      void setPlaySeek(long playSeek)
      Set the seek location (milliseconds) where playback should start
      Parameters:
      playSeek - seek location (milliseconds)
    • setUserHTTPHeader

      void setUserHTTPHeader(String name, String value)
      Set user HTTP header. This header value will be added to all HTTP responses
      Parameters:
      name - name
      value - value
    • getUserHTTPHeaders

      Map<String,String> getUserHTTPHeaders()
      Get user HTTP header. This header value will be added to all HTTP responses
      Returns:
      header map
    • addUserHTTPHeaders

      void addUserHTTPHeaders(IHTTPResponse resp)
      Internal
      Parameters:
      resp - response
    • getCORSHeaders

      com.wowza.wms.httpstreamer.model.HTTPCORSHeaders getCORSHeaders()
      Returns:
      HTTPCORSHeaders object
    • doSessionRedirect

      void doSessionRedirect(IHTTPResponse resp)
      Internal
      Parameters:
      resp - response
    • doSessionRedirect

      void doSessionRedirect(IHTTPResponse resp, String redirectSessionURL, String redirectSessionContentType, int redirectSessionCode)
      Internal
      Parameters:
      resp - response
      redirectSessionURL - redirect session URL
      redirectSessionContentType -
      redirectSessionCode - redirect session response code (default 302)
    • isRedirectSession

      boolean isRedirectSession()
      Is session redirect
      Returns:
      session redirect
    • setRedirectSession

      void setRedirectSession(boolean redirectSession)
      Set session redirect
      Parameters:
      redirectSession - session redirect
    • getRedirectSessionCode

      int getRedirectSessionCode()
      Get session redirect HTTP response code (default 302)
      Returns:
      session redirect HTTP response code
    • setRedirectSessionCode

      void setRedirectSessionCode(int redirectSessionCode)
      Set session redirect HTTP response code (default 302)
      Parameters:
      redirectSessionCode - session redirect HTTP response code
    • getRedirectSessionURL

      String getRedirectSessionURL()
      Get redirect session URL
      Returns:
      redirect session URL
    • setRedirectSessionURL

      void setRedirectSessionURL(String redirectSessionURL)
      Set redirect session URL
      Parameters:
      redirectSessionURL - redirect session URL
    • redirectSession

      void redirectSession(String redirectSessionURL)
      Redirect session
      Parameters:
      redirectSessionURL - redirect session URL
    • redirectSession

      void redirectSession(String redirectSessionURL, int redirectSessionCode)
      Redirect session
      Parameters:
      redirectSessionURL - redirect session URL
      redirectSessionCode - redirect session response code (default 302)
    • getRedirectSessionBody

      byte[] getRedirectSessionBody()
      Get redirect session body
      Returns:
      redirect session body
    • setRedirectSessionBody

      void setRedirectSessionBody(byte[] redirectSessionBody)
      Set redirect session body
      Parameters:
      redirectSessionBody - redirect session body
    • getRedirectSessionContentType

      String getRedirectSessionContentType()
      Get redirect session HTTP Content-Type
      Returns:
      redirect session HTTP Content-Type
    • setRedirectSessionContentType

      void setRedirectSessionContentType(String redirectSessionContentType)
      Set redirect session HTTP Content-Type
      Parameters:
      redirectSessionContentType -
    • getLastRequest

      long getLastRequest()
      Get the last timestamp of the last Io request
      Returns:
      last timestamp of the last Io request (milliseconds)
    • isHTTPOrigin

      boolean isHTTPOrigin()
      Return true if session in an HTTP origin session
      Returns:
      true if session in an HTTP origin session
    • setHTTPOrigin

      void setHTTPOrigin(boolean isHTTPOrigin)
      Set to true if HTTP origin session
      Parameters:
      isHTTPOrigin - true if HTTP origin session
    • getAndClearNotifyCreate

      boolean getAndClearNotifyCreate()
    • getTranscoderVODSession

      com.wowza.wms.transcoder.vod.TranscoderVODSession getTranscoderVODSession()
      Get the vod transcoder session associated with this HTTP session
      Returns:
      vod transcoder session
    • setTranscoderVODSession

      void setTranscoderVODSession(com.wowza.wms.transcoder.vod.TranscoderVODSession transcoderVODSession)
      Set the vod transcoder session associated with this HTTP session
      Parameters:
      transcoderVODSession - vod transcoder session
    • getVODTranscodeNGRP

      String getVODTranscodeNGRP()
      Get the VOD Transcoder NGRP name
      Returns:
      VOD Transcoder NGRP name
    • setVODTranscodeNGRP

      void setVODTranscodeNGRP(String vodTranscodeNGRP)
      Set the VOD Transcoder NGRP name
      Parameters:
      vodTranscodeNGRP - VOD Transcoder NGRP name
    • getTranscoderVODIndex

      IHTTPStreamerTranscoderVODIndex getTranscoderVODIndex()
      Get the VOD Transcoder index information
      Returns:
      VOD Transcoder index
    • setTranscoderVODIndex

      void setTranscoderVODIndex(IHTTPStreamerTranscoderVODIndex transcoderVODIndex)
      Set the VOD Transcoder index information
      Parameters:
      transcoderVODIndex - VOD Transcoder index
    • getTranscoderVODIndexDestinationsOrder

      List<String> getTranscoderVODIndexDestinationsOrder()
      Get the list of VOD Transcoder destinations in playlist order
      Returns:
      list of VOD Transcoder destinations
    • getTranscoderVODIndexDestinationsMap

      Map<String,IHTTPStreamerTranscoderVODDestinationIndex> getTranscoderVODIndexDestinationsMap()
      Get the VOD Transcoder destination map
      Returns:
      VOD Transcoder destination map
    • indexTranscoderVOD

      void indexTranscoderVOD(IHTTPStreamerApplicationContext appContext, String vodTranscodeNGRP)
      Index the HTTP session for VOD transcoder streaming
      Parameters:
      appContext - application context
      vodTranscodeNGRP - transcoder name group
    • getTranscoderVODIndex

      IHTTPStreamerTranscoderVODDestinationIndex getTranscoderVODIndex(String bitrateStr)
      Get VOD transcoder index for given bitrate
      Parameters:
      bitrateStr - bitrate string
      Returns:
      VOD transcoder index
    • addHTTPSessionToTCPSession

      void addHTTPSessionToTCPSession(com.wowza.wms.server.RtmpSessionInfo wmsSessionInfo, IHTTPStreamerApplicationContext appContext)
      Add HTTP session to TCP session for tracking
      Parameters:
      wmsSessionInfo - TCP session info
      appContext - app context
    • isSecure

      boolean isSecure()
      Returns true if the stream is being streamed over an SSL port
      Returns:
      true if the stream is being streamed over an SSL port
    • setSecure

      void setSecure(boolean isSecure)
      Set to true if the stream is being streamed over an SSL port
      Parameters:
      isSecure - true if the stream is being streamed over an SSL port
    • addTranscoderVODListener

      void addTranscoderVODListener(IHTTPStreamerTranscoderVODActionNotify listener)
      Add VOD Transcoder action listener
      Parameters:
      listener - VOD Transcoder action listener
    • removeTranscoderVODListener

      boolean removeTranscoderVODListener(IHTTPStreamerTranscoderVODActionNotify listener)
      Remove VOD Transcoder action listener
      Parameters:
      listener - VOD Transcoder action listener
      Returns:
      true/false is successful
    • notifyTranscoderVODFillChunkStart

      void notifyTranscoderVODFillChunkStart(com.wowza.wms.transcoder.vod.TranscoderVODSession transcoderVODSession, com.wowza.wms.transcoder.vod.TranscoderVODDestination transcoderVODDestination, com.wowza.wms.httpstreamer.model.MediaReaderH264Chunk mediaReaderChunk, com.wowza.wms.transcoder.vod.TranscoderVODChunkContext transcoderVODChunkContext)
      Called to notify of VOD Transcoder fill chunk start
      Parameters:
      transcoderVODSession - VOD Transcoder session
      transcoderVODDestination - VOD Transcoder destination
      mediaReaderChunk - media reader for the chunk
      transcoderVODChunkContext - VOD Transcoder context
    • notifyTranscoderVODFillChunkTranscode

      void notifyTranscoderVODFillChunkTranscode(com.wowza.wms.transcoder.vod.TranscoderVODSession transcoderVODSession, com.wowza.wms.transcoder.vod.TranscoderVODChunkContext transcoderVODChunkContext, List<com.wowza.wms.httpstreamer.model.MediaReaderH264Packet> packets)
      Called to notify of VOD Transcoder fill chunk
      Parameters:
      transcoderVODSession - VOD Transcoder session
      transcoderVODChunkContext - VOD Transcoder context
      packets -
    • notifyTranscoderVODFillChunkStop

      void notifyTranscoderVODFillChunkStop(com.wowza.wms.transcoder.vod.TranscoderVODSession transcoderVODSession, com.wowza.wms.transcoder.vod.TranscoderVODChunkContext transcoderVODChunkContext)
      Called to notify of VOD Transcoder fill stop
      Parameters:
      transcoderVODSession - VOD Transcoder session
      transcoderVODChunkContext - VOD Transcoder context