Class 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 Detail

      • 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:
        Constant Field Values
      • httpClient

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

        protected org.apache.http.HttpHost targetHost
      • sessionId

        protected String sessionId
      • messageCount

        protected long messageCount
      • stopRequested

        protected volatile boolean stopRequested
    • Constructor Detail

      • RTMPTClientConnector

        protected RTMPTClientConnector()
      • RTMPTClientConnector

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

      • run

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

        public String getSessionId()
        Returns:
        the sessionId
      • getPost

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

        protected org.apache.http.client.methods.HttpPost makePost​(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)