|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.red5.server.net.rtmpt.RTMPTServlet
public class RTMPTServlet
Servlet that handles all RTMPT requests.
Nested Class Summary | |
---|---|
protected class |
RTMPTServlet.RequestInfo
Used to store request information per thread. |
Field Summary | |
---|---|
protected WebApplicationContext |
appCtx
Web app context |
protected static Logger |
log
Logger |
protected ThreadLocal<RTMPTServlet.RequestInfo> |
requestInfo
Thread local for request info storage |
Constructor Summary | |
---|---|
RTMPTServlet()
|
Method Summary | |
---|---|
protected RTMPTConnection |
createConnection()
Creates an RTMPT connection. |
void |
destroy()
|
protected RTMPTConnection |
getConnection()
Returns a connection based on the current client session id. |
protected void |
handleBadRequest(String message,
javax.servlet.http.HttpServletResponse resp)
Return an error message to the client. |
protected void |
handleClose(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Close a RTMPT session. |
protected void |
handleIdle(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Poll RTMPT session for updates. |
protected void |
handleOpen(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Start a new RTMPT session. |
protected void |
handleSend(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Add data for an established session. |
void |
init()
|
boolean |
isEnforceContentTypeCheck()
|
protected void |
notifyClosed(RTMPTConnection conn)
A connection has been closed that was created by this servlet. |
protected void |
removeConnection(String sessionId)
|
protected void |
returnMessage(byte message,
javax.servlet.http.HttpServletResponse resp)
Return a single byte to the client. |
protected void |
returnMessage(RTMPTConnection client,
IoBuffer buffer,
javax.servlet.http.HttpServletResponse resp)
Return raw data to the client. |
protected void |
returnMessage(String message,
javax.servlet.http.HttpServletResponse resp)
Return a message to the client. |
protected void |
returnPendingMessages(RTMPTConnection client,
javax.servlet.http.HttpServletResponse resp)
Send pending messages to client. |
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Main entry point for the servlet. |
void |
setEnforceContentTypeCheck(boolean enforceContentTypeCheck)
|
void |
setHandler(RTMPTHandler handler)
Set the RTMPTHandler to use in this servlet. |
void |
setIdent2(String ident2)
Set the fcs/ident2 string |
protected void |
setRequestInfo(javax.servlet.http.HttpServletRequest req)
Sets the request info for the current request. |
void |
setRtmpConnManager(IRTMPConnManager rtmpConnManager)
|
void |
setTargetResponseSize(int targetResponseSize)
Sets the target size for responses |
protected void |
skipData(javax.servlet.http.HttpServletRequest req)
Skip data sent by the client. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
protected ThreadLocal<RTMPTServlet.RequestInfo> requestInfo
protected transient WebApplicationContext appCtx
Constructor Detail |
---|
public RTMPTServlet()
Method Detail |
---|
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected void handleBadRequest(String message, javax.servlet.http.HttpServletResponse resp) throws IOException
message
- Messageresp
- Servlet response
IOException
- I/O exceptionprotected void returnMessage(byte message, javax.servlet.http.HttpServletResponse resp) throws IOException
message
- Messageresp
- Servlet response
IOException
- I/O exceptionprotected void returnMessage(String message, javax.servlet.http.HttpServletResponse resp) throws IOException
message
- Messageresp
- Servlet response
IOException
- I/O exceptionprotected void returnMessage(RTMPTConnection client, IoBuffer buffer, javax.servlet.http.HttpServletResponse resp) throws IOException
client
- RTMP connectionbuffer
- Raw data as byte bufferresp
- Servlet response
IOException
- I/O exceptionprotected void setRequestInfo(javax.servlet.http.HttpServletRequest req)
req
- Servlet requestprotected void skipData(javax.servlet.http.HttpServletRequest req) throws IOException
req
- Servlet request
IOException
- I/O exceptionprotected void returnPendingMessages(RTMPTConnection client, javax.servlet.http.HttpServletResponse resp)
client
- RTMP connectionresp
- Servlet responseprotected void handleOpen(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
req
- Servlet requestresp
- Servlet response
IOException
- I/O exceptionprotected void handleClose(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
req
- Servlet requestresp
- Servlet response
IOException
- I/O exceptionprotected void handleSend(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
req
- Servlet requestresp
- Servlet response
IOException
- I/O exceptionprotected void handleIdle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
req
- Servlet requestresp
- Servlet response
IOException
- I/O exceptionprotected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
service
in class javax.servlet.http.HttpServlet
req
- Request objectresp
- Response object
IOException
- I/O exceptionpublic void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
protected void notifyClosed(RTMPTConnection conn)
conn
- protected RTMPTConnection getConnection()
protected RTMPTConnection createConnection()
protected void removeConnection(String sessionId)
public void setRtmpConnManager(IRTMPConnManager rtmpConnManager)
public void setHandler(RTMPTHandler handler)
handler
- handlerpublic void setIdent2(String ident2)
ident2
- public void setTargetResponseSize(int targetResponseSize)
targetResponseSize
- the targetResponseSize to setpublic boolean isEnforceContentTypeCheck()
public void setEnforceContentTypeCheck(boolean enforceContentTypeCheck)
enforceContentTypeCheck
- the enforceContentTypeCheck to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |