Java Doc for SdpFactory.java in  » 6.0-JDK-Modules » j2me » gov » nist » javax » sdp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » gov.nist.javax.sdp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   gov.nist.javax.sdp.SdpFactory

SdpFactory
public class SdpFactory extends Object (Code)
The SdpFactory enables applications to encode and decode SDP messages. The SdpFactory can be used to construct a SessionDescription object programmatically. The SdpFactory can also be used to construct a SessionDescription based on the contents of a String. Please refer to IETF RFC 2327 for a description of SDP. This code is in the public domain.
version:
   1.0


Field Summary
protected static  VectorsessionDescriptionsList
     Session description.

Constructor Summary
public  SdpFactory()
    

Method Summary
public  AttributeFieldcreateAttribute(String name, String value)
     Returns Attribute object with the specified values.
public  BandwidthFieldcreateBandwidth(String modifier, int value)
     Returns Bandwidth object with the specified values.
public  ConnectionFieldcreateConnection(String netType, String addrType, String addr, int ttl, int numAddrs)
    
public  ConnectionFieldcreateConnection(String netType, String addrType, String addr)
     Returns a Connection object with the specified properties and no TTL and a default number of addresses (1).
public  ConnectionFieldcreateConnection(String addr, int ttl, int numAddrs)
     Returns a Connection object with the specified properties and a network and address type of "IN" and "IP4" respectively.
public  ConnectionFieldcreateConnection(String addr)
     Returns a Connection object with the specified address.
public  EmailFieldcreateEMail(String value)
     Returns EMail object with the specified value.
Parameters:
  value - the string containing the description.
public  InformationFieldcreateInfo(String value)
     Returns Info object with the specified value.
Parameters:
  value - the string containing the description.
public  KeyFieldcreateKey(String method, String key)
     Returns Key object with the specified value.
public  MediaFieldcreateMedia(String media, int port, int numPorts, String transport, Vector staticRtpAvpTypes)
     Returns Media object with the specified properties.
public  MediaDescriptionImplcreateMediaDescription(String media, int port, int numPorts, String transport, int[] staticRtpAvpTypes)
     Returns MediaDescription object with the specified properties.
public  MediaDescriptionImplcreateMediaDescription(String media, int port, int numPorts, String transport, String[] formats)
     Returns MediaDescription object with the specified properties.
public  OriginFieldcreateOrigin(String userName, String address)
     Returns Origin object with the specified properties.
public  OriginFieldcreateOrigin(String userName, long sessionId, long sessionVersion, String networkType, String addrType, String address)
     Returns Origin object with the specified properties.
public  PhoneFieldcreatePhone(String value)
     Returns Phone object with the specified value.
Parameters:
  value - the string containing the description.
public  RepeatFieldcreateRepeatTime(int repeatInterval, int activeDuration, int[] offsets)
     Returns a RepeatTime object with the specified interval, duration, and time offsets.
public  SessionDescriptionImplcreateSessionDescription()
     Creates a new, empty SessionDescription.
public  SessionDescriptionImplcreateSessionDescription(String s)
     Creates a SessionDescription populated with the information contained within the string parameter.

Note: unknown field types should not cause exceptions.
Parameters:
  s - s - the sdp message that is to be parsed.
throws:
  SdpParseException - if there is aproblem parsing the String.

public  SessionNameFieldcreateSessionName(String name)
     Returns SessionName object with the specified name.
Parameters:
  name - the string containing the name of the session.
public  TimeFieldcreateTime(Date start, Date stop)
     Returns a Time specification with the specified start and stop times.
public  TimeFieldcreateTime()
     Returns an unbounded Time specification (i.e., "t=0 0").
public  TimeDescriptionImplcreateTimeDescription(TimeField t)
     Returns TimeDescription object with the specified properties.
Parameters:
  t - the Time that the time description applies to.
public  TimeDescriptionImplcreateTimeDescription()
     Returns TimeDescription unbounded (i.e.
public  TimeDescriptionImplcreateTimeDescription(Date start, Date stop)
     Returns TimeDescription object with the specified properties.
public  ZoneFieldcreateTimeZoneAdjustment(Date d, int offset)
     Constructs a timezone adjustment record.
Parameters:
  d - the Date at which the adjustment is going to takeplace.
Parameters:
  offset - the adjustment in number of seconds relative tothe start time of the SessionDescription with which thisobject is associated.
public  URIFieldcreateURI(String value)
     Returns URI object with the specified value.
public  ProtoVersionFieldcreateVersion(int value)
     Returns Version object with the specified values.
Parameters:
  value - the version number.
public static  VectorfindSessions(String source)
     Returns a collection of Strings containing session description.
Parameters:
  source - String containing session descriptions.
public  StringformatMulticastAddress(String addr, int ttl, int numAddrs)
     Returns a String containing the computed form for a multi-connection address.
public static  DategetDateFromNtp(long ntpTime)
     Converts a NTP to regular date value.
public static  SdpFactorygetInstance()
     Obtains an instance of an SdpFactory.
public static  longgetNtpTime(Date d)
     Returns a long containing the NTP value for a given Java Date.

Field Detail
sessionDescriptionsList
protected static Vector sessionDescriptionsList(Code)
Session description.




Constructor Detail
SdpFactory
public SdpFactory()(Code)
Creates new SdpFactory




Method Detail
createAttribute
public AttributeField createAttribute(String name, String value)(Code)
Returns Attribute object with the specified values.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the Attribute



createBandwidth
public BandwidthField createBandwidth(String modifier, int value)(Code)
Returns Bandwidth object with the specified values.
Parameters:
  modifier - the bandwidth type
Parameters:
  value - the bandwidth value measured in kilobits per second bandwidth



createConnection
public ConnectionField createConnection(String netType, String addrType, String addr, int ttl, int numAddrs) throws SdpException(Code)
Returns a Connection object with the specified properties a
Parameters:
  netType - network type, eg "IN" for "Internet"
Parameters:
  addrType - address type, eg "IP4" for IPv4 type addresses
Parameters:
  addr - connection address
Parameters:
  ttl - time to live (TTL) for multicast addresses
Parameters:
  numAddrs - number of addresses used by the connection Connection



createConnection
public ConnectionField createConnection(String netType, String addrType, String addr) throws SdpException(Code)
Returns a Connection object with the specified properties and no TTL and a default number of addresses (1).
Parameters:
  netType - network type, eg "IN" for "Internet"
Parameters:
  addrType - address type, eg "IP4" for IPv4 type addresses
Parameters:
  addr - connection address
throws:
  SdpException - if the parameters are null Connection



createConnection
public ConnectionField createConnection(String addr, int ttl, int numAddrs) throws SdpException(Code)
Returns a Connection object with the specified properties and a network and address type of "IN" and "IP4" respectively.
Parameters:
  addr - connection address
Parameters:
  ttl - time to live (TTL) for multicast addresses
Parameters:
  numAddrs - number of addresses used by the connection Connection



createConnection
public ConnectionField createConnection(String addr) throws SdpException(Code)
Returns a Connection object with the specified address. This is equivalent to createConnection("IN", "IP4", addr);
Parameters:
  addr - connection address
throws:
  SdpException - if the parameter is null Connection



createEMail
public EmailField createEMail(String value)(Code)
Returns EMail object with the specified value.
Parameters:
  value - the string containing the description. EMail



createInfo
public InformationField createInfo(String value)(Code)
Returns Info object with the specified value.
Parameters:
  value - the string containing the description. Info



createKey
public KeyField createKey(String method, String key)(Code)
Returns Key object with the specified value.
Parameters:
  method - the string containing the method type.
Parameters:
  key - the key to set Key



createMedia
public MediaField createMedia(String media, int port, int numPorts, String transport, Vector staticRtpAvpTypes) throws SdpException(Code)
Returns Media object with the specified properties.
Parameters:
  media - the media type, eg "audio"
Parameters:
  port - port number on which to receive media
Parameters:
  numPorts - number of ports used for this media stream
Parameters:
  transport - transport type, eg "RTP/AVP"
Parameters:
  staticRtpAvpTypes - vector to set
throws:
  SdpException - Media



createMediaDescription
public MediaDescriptionImpl createMediaDescription(String media, int port, int numPorts, String transport, int[] staticRtpAvpTypes) throws IllegalArgumentException, SdpException(Code)
Returns MediaDescription object with the specified properties. The returned object will respond to Media.getMediaFormats(boolean) with a Vector of media formats.
Parameters:
  media - media -
Parameters:
  port - port number on which to receive media
Parameters:
  numPorts - number of ports used for this media stream
Parameters:
  transport - transport type, eg "RTP/AVP"
Parameters:
  staticRtpAvpTypes - list of static RTP/AVP media payloadtypes which should be specified by thereturned MediaDescription throws IllegalArgumentException if passedan invalid RTP/AVP payload type
throws:
  IllegalArgumentException -
throws:
  SdpException - MediaDescription



createMediaDescription
public MediaDescriptionImpl createMediaDescription(String media, int port, int numPorts, String transport, String[] formats)(Code)
Returns MediaDescription object with the specified properties. The returned object will respond to Media.getMediaFormats(boolean) with a Vector of String objects specified by the 'formats argument.
Parameters:
  media - the media type, eg "audio"
Parameters:
  port - port number on which to receive media
Parameters:
  numPorts - number of ports used for this media stream
Parameters:
  transport - transport type, eg "RTP/AVP"
Parameters:
  formats - list of formats which should be specified by thereturned MediaDescription MediaDescription



createOrigin
public OriginField createOrigin(String userName, String address) throws SdpException(Code)
Returns Origin object with the specified properties.
Parameters:
  userName - the user name.
Parameters:
  address - the IP4 encoded address.
throws:
  SdpException - if the parameters are null Origin



createOrigin
public OriginField createOrigin(String userName, long sessionId, long sessionVersion, String networkType, String addrType, String address) throws SdpException(Code)
Returns Origin object with the specified properties.
Parameters:
  userName - String containing the user that created thestring.
Parameters:
  sessionId - long containing the session identifier.
Parameters:
  sessionVersion - long containing the session version.
Parameters:
  networkType - String network type for the origin (usually"IN").
Parameters:
  addrType - String address type (usually "IP4").
Parameters:
  address - String IP address usually the address of thehost.
throws:
  SdpException - if the parameters are null Origin object with the specified properties.



createPhone
public PhoneField createPhone(String value)(Code)
Returns Phone object with the specified value.
Parameters:
  value - the string containing the description. Phone



createRepeatTime
public RepeatField createRepeatTime(int repeatInterval, int activeDuration, int[] offsets)(Code)
Returns a RepeatTime object with the specified interval, duration, and time offsets.
Parameters:
  repeatInterval - the "repeat interval" in seconds
Parameters:
  activeDuration - the "active duration" in seconds
Parameters:
  offsets - the list of offsets relative to the start time ofthe Time object with which the returned RepeatTime will beassociated RepeatTime



createSessionDescription
public SessionDescriptionImpl createSessionDescription() throws SdpException(Code)
Creates a new, empty SessionDescription. The session is set as follows:
 v=0
 o=this.createOrigin ("user",
 InetAddress.getLocalHost().toString());
 s=-
 t=0 0
 

throws:
  SdpException - if there is a problemconstructing the SessionDescription. a new, empty SessionDescription.



createSessionDescription
public SessionDescriptionImpl createSessionDescription(String s) throws SdpParseException(Code)
Creates a SessionDescription populated with the information contained within the string parameter.

Note: unknown field types should not cause exceptions.
Parameters:
  s - s - the sdp message that is to be parsed.
throws:
  SdpParseException - if there is aproblem parsing the String. a populated SessionDescription object.




createSessionName
public SessionNameField createSessionName(String name)(Code)
Returns SessionName object with the specified name.
Parameters:
  name - the string containing the name of the session. SessionName



createTime
public TimeField createTime(Date start, Date stop) throws SdpException(Code)
Returns a Time specification with the specified start and stop times.
Parameters:
  start - start time
Parameters:
  stop - stop time
throws:
  SdpException - if the parameters are null a Time specification with the specified start and stoptimes.



createTime
public TimeField createTime() throws SdpException(Code)
Returns an unbounded Time specification (i.e., "t=0 0").
throws:
  SdpException - an unbounded Time specification (i.e., "t=0 0").



createTimeDescription
public TimeDescriptionImpl createTimeDescription(TimeField t) throws SdpException(Code)
Returns TimeDescription object with the specified properties.
Parameters:
  t - the Time that the time description applies to. ReturnsTimeDescription object with the specified properties.
throws:
  SdpException - TimeDescription



createTimeDescription
public TimeDescriptionImpl createTimeDescription() throws SdpException(Code)
Returns TimeDescription unbounded (i.e. "t=0 0");
throws:
  SdpException - TimeDescription unbounded (i.e. "t=0 0");



createTimeDescription
public TimeDescriptionImpl createTimeDescription(Date start, Date stop) throws SdpException(Code)
Returns TimeDescription object with the specified properties.
Parameters:
  start - start time.
Parameters:
  stop - stop time.
throws:
  SdpException - if the parameters are null TimeDescription



createTimeZoneAdjustment
public ZoneField createTimeZoneAdjustment(Date d, int offset)(Code)
Constructs a timezone adjustment record.
Parameters:
  d - the Date at which the adjustment is going to takeplace.
Parameters:
  offset - the adjustment in number of seconds relative tothe start time of the SessionDescription with which thisobject is associated. TimeZoneAdjustment



createURI
public URIField createURI(String value) throws SdpException(Code)
Returns URI object with the specified value.
Parameters:
  value - the URL containing the description.
throws:
  SdpException - URI



createVersion
public ProtoVersionField createVersion(int value)(Code)
Returns Version object with the specified values.
Parameters:
  value - the version number. Version



findSessions
public static Vector findSessions(String source)(Code)
Returns a collection of Strings containing session description.
Parameters:
  source - String containing session descriptions. a collection of Strings containing session descriptions.



formatMulticastAddress
public String formatMulticastAddress(String addr, int ttl, int numAddrs)(Code)
Returns a String containing the computed form for a multi-connection address.
Parameters:
  addr - connection address
Parameters:
  ttl - time to live (TTL) for multicastaddresses
Parameters:
  numAddrs - number of addresses used by theconnection computed form for a multi-connection address.



getDateFromNtp
public static Date getDateFromNtp(long ntpTime)(Code)
Converts a NTP to regular date value.
Parameters:
  ntpTime - long to set Returns a Date object for a given NTP date value.



getInstance
public static SdpFactory getInstance() throws SdpException(Code)
Obtains an instance of an SdpFactory.

This static method returns a factory instance.

Once an application has obtained a reference to an SdpFactory it can use the factory to configure and obtain parser instances and to create SDP objects.
throws:
  SdpException - if a factory can not be accessed a factory instance




getNtpTime
public static long getNtpTime(Date d) throws SdpParseException(Code)
Returns a long containing the NTP value for a given Java Date.
Parameters:
  d - Date to set long



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.