Class RTMPTClientConnector

java.lang.Object
java.lang.Thread
org.red5.client.net.rtmpt.RTMPTClientConnector
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
RTMPTSClientConnector

public class RTMPTClientConnector extends Thread
Client connector for RTMPT
Author:
Anton Lebedevich (mabrek@gmail.com), Paul Gregoire (mondain@gmail.com)
  • Field Details

    • CONTENT_TYPE

      protected static final String CONTENT_TYPE
      See Also:
    • ZERO_REQUEST_ENTITY

      protected static final org.apache.http.entity.ByteArrayEntity ZERO_REQUEST_ENTITY
    • SEND_TARGET_SIZE

      protected static final int SEND_TARGET_SIZE
      Size to split messages queue by, borrowed from RTMPTServlet.RESPONSE_TARGET_SIZE
      See Also:
    • httpClient

      protected org.apache.http.client.HttpClient httpClient
    • targetHost

      protected org.apache.http.HttpHost targetHost
    • client

      protected RTMPTClient client
    • sessionId

      protected String sessionId
    • messageCount

      protected long messageCount
    • stopRequested

      protected volatile boolean stopRequested
  • Constructor Details

    • RTMPTClientConnector

      protected RTMPTClientConnector()
    • RTMPTClientConnector

      public RTMPTClientConnector(String server, int port, RTMPTClient client)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • getSessionId

      public String getSessionId()
      Returns:
      the sessionId
    • finalizeConnection

      protected void finalizeConnection() throws IOException
      Throws:
      IOException
    • getPost

      protected static org.apache.http.client.methods.HttpPost getPost(String uri)
    • makePost

      protected org.apache.http.client.methods.HttpPost makePost(String command)
    • makeUrl

      protected String makeUrl(String command)
    • setCommonHeaders

      protected static void setCommonHeaders(org.apache.http.client.methods.HttpPost post)
    • checkResponseCode

      protected static void checkResponseCode(org.apache.http.HttpResponse response) throws org.apache.http.ParseException, IOException
      Throws:
      org.apache.http.ParseException
      IOException
    • setStopRequested

      public void setStopRequested(boolean stopRequested)