Package org.red5.client.net.rtmpt
Class RTMPTClientConnector
java.lang.Object
java.lang.Thread
org.red5.client.net.rtmpt.RTMPTClientConnector
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
RTMPTSClientConnector
Client connector for RTMPT
- Author:
- Anton Lebedevich (mabrek@gmail.com), Paul Gregoire (mondain@gmail.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RTMPTClientprotected static final Stringprotected org.apache.http.client.HttpClientprotected longprotected static final intSize to split messages queue by, borrowed from RTMPTServlet.RESPONSE_TARGET_SIZEprotected Stringprotected booleanprotected org.apache.http.HttpHostprotected static final org.apache.http.entity.ByteArrayEntityFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRTMPTClientConnector(String server, int port, RTMPTClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcheckResponseCode(org.apache.http.HttpResponse response) protected voidprotected static org.apache.http.client.methods.HttpPostprotected org.apache.http.client.methods.HttpPostprotected Stringvoidrun()protected static voidsetCommonHeaders(org.apache.http.client.methods.HttpPost post) voidsetStopRequested(boolean stopRequested) Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
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_SIZESize 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
-
sessionId
-
messageCount
protected long messageCount -
stopRequested
protected volatile boolean stopRequested
-
-
Constructor Details
-
RTMPTClientConnector
protected RTMPTClientConnector() -
RTMPTClientConnector
-
-
Method Details
-
run
public void run() -
getSessionId
- Returns:
- the sessionId
-
finalizeConnection
- Throws:
IOException
-
getPost
-
makePost
-
makeUrl
-
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.ParseExceptionIOException
-
setStopRequested
public void setStopRequested(boolean stopRequested)
-