Class Server
java.lang.Object
|
+----Server
- public class Server
- extends Object
-
ChkPause(String)
- ChkPause - Tests if the pause message that was received is valid
-
ChkPlay(String, String)
- ChkPlay - Tests if the play message that was received is valid
-
ChkSetup(String, String, int)
- ChkSetup - Tests if the setup message that was received is valid
-
ChkTearDown(String)
- ChkTearDown - Tests if the teardown message that was received is valid
-
GetPauseVector()
- GetPauseVector - fills vector with valid pause tags
-
GetPlayVector()
- GetPlayVector - fills vector with valid play tags
-
GetSetupVector()
- GetSetupVector - fills vector with valid setup tags
-
GetTeardownVector()
- GetTeardownVector - fills vector with valid teardown tags
-
HandleSeqNbr(String)
- HandleSeqNbr - Return a valid sequence number if it exits
-
has(String)
- has - Return the string is in the current vector of valid tags
-
initStreamTokenizer()
- initStreamTokenizer - Initializes the stream tokenizer with valid white space
and word characters
-
IsOK(String)
- Name: IsOk
Purpose: Checks to make sure that the status is OK and the sequence number
is correct.
-
MakeConnection()
- Name: MakeConnection
Purpose: Connects the client to a good socket.
-
NextLine()
- NextLine - Returns the next valid tag
-
ParseRTPInfo(String)
- ParseRTPInfo - Returns the result of whether the RTPInfo line is valid
-
ParseSequence()
- ParseSequence - Returns the result of whether the Sequence line is valid
-
ParseSession(boolean)
- ParseSession - Returns the result of whether the Session line is valid
-
ParseSetup(String)
- Name: ParseSetup
Purpose: Parses the received message.
-
ParseStatus()
- ParseStatus - Returns the result of whether the Status line is valid
-
ParseTransport(String, int)
- ParseTransport - Returns the result of whether the Transport line is valid
-
SendInitRTSPMsg(int, String, String)
- Name: SendInitRTSPMsg
Purpose: Send the initial message to the RTSP server
Input: v_port is the media's port#
Vaddress is the media's address
Output: Returns the status of this operation.
-
SendPauseMsg()
- Name: SendPauseMsg
Purpose: Send the Pause message to the RTSP server
Output: Return the status of this operation.
-
SendPlayMsg()
- Name: SendPlayMsg
Purpose: Send the Play message to the RTSP server
Output: Return the status of this operation.
-
SendRecMsg()
- Name: SendRecMsg
Purpose: Send the Record message to the RTSP server
Output: Return the status of this operation.
-
SendTeardownMsg()
- Name: SendTeardownMsg
Purpose: Send the Teardown message to the RTSP server
Output: Return the status of this operation.
-
toInt(String)
- toInt - Converts an String to int
-
toString(int)
- toString - Converts an int to String
-
ValidNumber(String)
- ValidNumber - Return whether the portnumber is valid
MakeConnection
public void MakeConnection()
- Name: MakeConnection
Purpose: Connects the client to a good socket. If the socket is bad
it tries another one with a port# of 2 more.
GetTeardownVector
public void GetTeardownVector()
- GetTeardownVector - fills vector with valid teardown tags
GetPauseVector
public void GetPauseVector()
- GetPauseVector - fills vector with valid pause tags
GetSetupVector
public void GetSetupVector()
- GetSetupVector - fills vector with valid setup tags
GetPlayVector
public void GetPlayVector()
- GetPlayVector - fills vector with valid play tags
SendInitRTSPMsg
public int SendInitRTSPMsg(int v_port,
String Vaddress,
String transportPort)
- Name: SendInitRTSPMsg
Purpose: Send the initial message to the RTSP server
Input: v_port is the media's port#
Vaddress is the media's address
Output: Returns the status of this operation. 0 is fail, 1 is pass.
ParseSetup
public int ParseSetup(String received)
- Name: ParseSetup
Purpose: Parses the received message.
Input: received is the message received from the RTSP server.
Output: Return the status of this operation. 0 means failed, 1 means passed
SendPlayMsg
public int SendPlayMsg()
- Name: SendPlayMsg
Purpose: Send the Play message to the RTSP server
Output: Return the status of this operation. 0 means failed, 1 means passed
SendRecMsg
public int SendRecMsg()
- Name: SendRecMsg
Purpose: Send the Record message to the RTSP server
Output: Return the status of this operation. 0 means failed, 1 means passed
SendTeardownMsg
public int SendTeardownMsg()
- Name: SendTeardownMsg
Purpose: Send the Teardown message to the RTSP server
Output: Return the status of this operation. 0 means failed, 1 means passed
SendPauseMsg
public int SendPauseMsg()
- Name: SendPauseMsg
Purpose: Send the Pause message to the RTSP server
Output: Return the status of this operation. 0 means failed, 1 means passed
ChkPlay
public int ChkPlay(String received,
String rtspAddress)
- ChkPlay - Tests if the play message that was received is valid
ChkSetup
public int ChkSetup(String received,
String transportPort,
int v_port)
- ChkSetup - Tests if the setup message that was received is valid
ChkPause
public int ChkPause(String received)
- ChkPause - Tests if the pause message that was received is valid
ChkTearDown
public int ChkTearDown(String received)
- ChkTearDown - Tests if the teardown message that was received is valid
ParseRTPInfo
public boolean ParseRTPInfo(String rtspAddress)
- ParseRTPInfo - Returns the result of whether the RTPInfo line is valid
ParseTransport
public boolean ParseTransport(String transportPort,
int v_port)
- ParseTransport - Returns the result of whether the Transport line is valid
ParseSession
public boolean ParseSession(boolean init)
- ParseSession - Returns the result of whether the Session line is valid
ParseSequence
public boolean ParseSequence()
- ParseSequence - Returns the result of whether the Sequence line is valid
ParseStatus
public boolean ParseStatus()
- ParseStatus - Returns the result of whether the Status line is valid
NextLine
public String NextLine()
- NextLine - Returns the next valid tag
HandleSeqNbr
public String HandleSeqNbr(String string)
- HandleSeqNbr - Return a valid sequence number if it exits
has
public boolean has(String string)
- has - Return the string is in the current vector of valid tags
ValidNumber
public boolean ValidNumber(String serverPort)
- ValidNumber - Return whether the portnumber is valid
toString
public String toString(int i)
- toString - Converts an int to String
toInt
public int toInt(String str)
- toInt - Converts an String to int
initStreamTokenizer
public void initStreamTokenizer()
- initStreamTokenizer - Initializes the stream tokenizer with valid white space
and word characters
IsOK
public int IsOK(String received)
- Name: IsOk
Purpose: Checks to make sure that the status is OK and the sequence number
is correct.
Input: received is the message received from the RTSP server
Output: Return the status of this operation. 0 means failed, 1 means passed