Class Server

java.lang.Object
   |
   +----Server

public class Server
extends Object

Method Index

 o ChkPause(String)
ChkPause - Tests if the pause message that was received is valid
 o ChkPlay(String, String)
ChkPlay - Tests if the play message that was received is valid
 o ChkSetup(String, String, int)
ChkSetup - Tests if the setup message that was received is valid
 o ChkTearDown(String)
ChkTearDown - Tests if the teardown message that was received is valid
 o GetPauseVector()
GetPauseVector - fills vector with valid pause tags
 o GetPlayVector()
GetPlayVector - fills vector with valid play tags
 o GetSetupVector()
GetSetupVector - fills vector with valid setup tags
 o GetTeardownVector()
GetTeardownVector - fills vector with valid teardown tags
 o HandleSeqNbr(String)
HandleSeqNbr - Return a valid sequence number if it exits
 o has(String)
has - Return the string is in the current vector of valid tags
 o initStreamTokenizer()
initStreamTokenizer - Initializes the stream tokenizer with valid white space and word characters
 o IsOK(String)
Name: IsOk Purpose: Checks to make sure that the status is OK and the sequence number is correct.
 o MakeConnection()
Name: MakeConnection Purpose: Connects the client to a good socket.
 o NextLine()
NextLine - Returns the next valid tag
 o ParseRTPInfo(String)
ParseRTPInfo - Returns the result of whether the RTPInfo line is valid
 o ParseSequence()
ParseSequence - Returns the result of whether the Sequence line is valid
 o ParseSession(boolean)
ParseSession - Returns the result of whether the Session line is valid
 o ParseSetup(String)
Name: ParseSetup Purpose: Parses the received message.
 o ParseStatus()
ParseStatus - Returns the result of whether the Status line is valid
 o ParseTransport(String, int)
ParseTransport - Returns the result of whether the Transport line is valid
 o 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.
 o SendPauseMsg()
Name: SendPauseMsg Purpose: Send the Pause message to the RTSP server Output: Return the status of this operation.
 o SendPlayMsg()
Name: SendPlayMsg Purpose: Send the Play message to the RTSP server Output: Return the status of this operation.
 o SendRecMsg()
Name: SendRecMsg Purpose: Send the Record message to the RTSP server Output: Return the status of this operation.
 o SendTeardownMsg()
Name: SendTeardownMsg Purpose: Send the Teardown message to the RTSP server Output: Return the status of this operation.
 o toInt(String)
toInt - Converts an String to int
 o toString(int)
toString - Converts an int to String
 o ValidNumber(String)
ValidNumber - Return whether the portnumber is valid

Methods

 o 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.

 o GetTeardownVector
 public void GetTeardownVector()
GetTeardownVector - fills vector with valid teardown tags

 o GetPauseVector
 public void GetPauseVector()
GetPauseVector - fills vector with valid pause tags

 o GetSetupVector
 public void GetSetupVector()
GetSetupVector - fills vector with valid setup tags

 o GetPlayVector
 public void GetPlayVector()
GetPlayVector - fills vector with valid play tags

 o 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.

 o 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

 o 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

 o 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

 o 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

 o 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

 o ChkPlay
 public int ChkPlay(String received,
                    String rtspAddress)
ChkPlay - Tests if the play message that was received is valid

 o ChkSetup
 public int ChkSetup(String received,
                     String transportPort,
                     int v_port)
ChkSetup - Tests if the setup message that was received is valid

 o ChkPause
 public int ChkPause(String received)
ChkPause - Tests if the pause message that was received is valid

 o ChkTearDown
 public int ChkTearDown(String received)
ChkTearDown - Tests if the teardown message that was received is valid

 o ParseRTPInfo
 public boolean ParseRTPInfo(String rtspAddress)
ParseRTPInfo - Returns the result of whether the RTPInfo line is valid

 o ParseTransport
 public boolean ParseTransport(String transportPort,
                               int v_port)
ParseTransport - Returns the result of whether the Transport line is valid

 o ParseSession
 public boolean ParseSession(boolean init)
ParseSession - Returns the result of whether the Session line is valid

 o ParseSequence
 public boolean ParseSequence()
ParseSequence - Returns the result of whether the Sequence line is valid

 o ParseStatus
 public boolean ParseStatus()
ParseStatus - Returns the result of whether the Status line is valid

 o NextLine
 public String NextLine()
NextLine - Returns the next valid tag

 o HandleSeqNbr
 public String HandleSeqNbr(String string)
HandleSeqNbr - Return a valid sequence number if it exits

 o has
 public boolean has(String string)
has - Return the string is in the current vector of valid tags

 o ValidNumber
 public boolean ValidNumber(String serverPort)
ValidNumber - Return whether the portnumber is valid

 o toString
 public String toString(int i)
toString - Converts an int to String

 o toInt
 public int toInt(String str)
toInt - Converts an String to int

 o initStreamTokenizer
 public void initStreamTokenizer()
initStreamTokenizer - Initializes the stream tokenizer with valid white space and word characters

 o 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