org.mitre.jsip
Clase SdpMessage

public class SdpMessage
Detalle del constructor

SdpMessage

public SdpMessage()
Construct a blank SDP message object.

SdpMessage

public SdpMessage(String parseinput)
Parse the given SDP message.
Parameters:
parseinput -

Detalle del método

isValid

public boolean isValid()
Returns true if the parsed SDP message is valid.
Returns:
bool

isOnHold

public boolean isOnHold()
Returns true if this SDP implies the call is on hold.
Returns:
bool

getName

public String getName()
Returns the unique session name. This is the s= line of SDP.
Returns:
String

getIpAddress

public String getIpAddress()
Returns the IP address of the session described.
Returns:
String

getPort

public int getPort()
Returns the port on which media is being received.
Returns:
int

getMediaPort

public int getMediaPort(int mediaType)
Returns the port on which the media type specified is being received.
Parameters:
mediaType - Type of media which port is to be returned
Returns:
int

setIpAddress

public void setIpAddress(String newaddr)
Sets the IP address to which media should be directed.
Parameters:
newaddr -

setPort

public void setPort(int newport)
Sets the port on which media is to be received.
Parameters:
newport -

setName

public void setName(String newname)
Sets the name of the session (the SDP s= line).
Parameters:
newname -

setUsername

public void setUsername(String username)
Sets the username (for the SDP o= line).
Parameters:
username -

setSessionTimes

public void setSessionTimes(Date startTime,
                            Date stopTime)
Sets the times the session is active

addMedia

public void addMedia(int media,
                     String type,
                     String protocol,
                     int port)
Allows the addition of a standard protocol

parseInput

private void parseInput(String parseinput)
Parses the given input as an SDP message.
Parameters:
parseinput -

message

public String message()
Builds and returns an SDP message given the contents.
Returns:
String

main

public static void main(String[] args)
test out SdpMessage