Java Doc for SipConnection.java in  » 6.0-JDK-Modules » j2me » javax » microedition » sip » 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 » javax.microedition.sip 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.microedition.sip.SipConnection

SipConnection
public interface SipConnection extends Connection(Code)
SipConnection is the base interface for Sip connections.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 11-20




Method Summary
public  voidaddHeader(String name, String value)
     Adds a header to the SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 17
Parameters:
  name - - name of the header, either in full or compact form.RFC 3261 p.32
Parameters:
  value - - the header value
throws:
  SipException - - INVALID_STATE if header can not be added inthis state.
public  javax.microedition.sip.SipDialoggetDialog()
     Returns the current SIP dialog.
public  StringgetHeader(String name)
     Gets the header field value of specified header type.
Parameters:
  name - - name of the header type, either in full or compact form.RFC 3261 p.32 topmost header field value, or null if thecurrent message does not have such a header or the header is for otherreason not available (e.g.
public  String[]getHeaders(String name)
     Gets the header field value(s) of specified header type
Parameters:
  name - - name of the header, either in full or compact form.RFC 3261 p.32 array of header field values (topmost first), or null if thecurrent message does not have such a header or the header is for otherreason not available (e.g.
public  java.lang.StringgetMethod()
     Gets the SIP method.
public  java.lang.StringgetReasonPhrase()
     Gets SIP response reason phrase.
public  java.lang.StringgetRequestURI()
     Gets Request-URI.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 19 Request-URI of the message.
public  intgetStatusCode()
     Gets SIP response status code.
public  java.io.InputStreamopenContentInputStream()
     Returns InputStream to read SIP message body content. InputStream to read body content
throws:
  java.io.IOException - - if the InputStream can not be opened,because of an I/O error occurred.
throws:
  SipException - - INVALID_STATE the InputStream can not be openedin this state (e.g.
public  java.io.OutputStreamopenContentOutputStream()
     Returns OutputStream to fill the SIP message body content.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 20 OutputStream to write body content
throws:
  IOException - if the OutputStream can not be opened,because of an I/O error occurred.
throws:
  SipException - INVALID_STATE the OutputStream can not be openedin this state (e.g.
public  voidremoveHeader(String name)
     Reomves header from the SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 18
Parameters:
  name - - name of the header to be removed, either intfull or compact form RFC 3261 p.32.
throws:
  SipException - - INVALID_STATE if header can not be removed inthis state.
public  voidsend()
     Sends the SIP message.
public  voidsetHeader(String name, String value)
     Sets header value in SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 17
Parameters:
  value - - the header value
throws:
  SipException - - INVALID_STATE if header can not be set inthis state.



Method Detail
addHeader
public void addHeader(String name, String value) throws SipException, IllegalArgumentException(Code)
Adds a header to the SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 17
Parameters:
  name - - name of the header, either in full or compact form.RFC 3261 p.32
Parameters:
  value - - the header value
throws:
  SipException - - INVALID_STATE if header can not be added inthis state.
INVALID_OPERATION if the system does not allow to addthis header.
throws:
  IllegalArgumentException - - MAY be thrown if the header orvalue is invalid



getDialog
public javax.microedition.sip.SipDialog getDialog()(Code)
Returns the current SIP dialog. This is available when the SipConnection belongs to a created SipDialog and the system has received (or sent) provisional (101-199) or final response (200). SipDialog object if this connection belongs to a dialog,otherwise returns null.



getHeader
public String getHeader(String name)(Code)
Gets the header field value of specified header type.
Parameters:
  name - - name of the header type, either in full or compact form.RFC 3261 p.32 topmost header field value, or null if thecurrent message does not have such a header or the header is for otherreason not available (e.g. message not initialized).



getHeaders
public String[] getHeaders(String name)(Code)
Gets the header field value(s) of specified header type
Parameters:
  name - - name of the header, either in full or compact form.RFC 3261 p.32 array of header field values (topmost first), or null if thecurrent message does not have such a header or the header is for otherreason not available (e.g. message not initialized).



getMethod
public java.lang.String getMethod()(Code)
Gets the SIP method. Applicable when a message has been initialized or received. SIP method name REGISTER, INVITE, NOTIFY, etc. Returns null ifthe method is not available.



getReasonPhrase
public java.lang.String getReasonPhrase()(Code)
Gets SIP response reason phrase. Available when SipClientConnection is in Proceeding or Completed state or when SipServerConnection is in Initialized state. reason phrase. Returns null if the reason phrase isnot available.



getRequestURI
public java.lang.String getRequestURI()(Code)
Gets Request-URI.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 19 Request-URI of the message. Returns null if the Request-URIis not available.



getStatusCode
public int getStatusCode()(Code)
Gets SIP response status code. Available when SipClientConnection is in Proceeding or Completed state or when SipServerConnection is in Initialized state. status code 1xx, 2xx, 3xx, 4xx, ... Returns 0 if the status codeis not available.



openContentInputStream
public java.io.InputStream openContentInputStream() throws IOException, SipException(Code)
Returns InputStream to read SIP message body content. InputStream to read body content
throws:
  java.io.IOException - - if the InputStream can not be opened,because of an I/O error occurred.
throws:
  SipException - - INVALID_STATE the InputStream can not be openedin this state (e.g. no message received).



openContentOutputStream
public java.io.OutputStream openContentOutputStream() throws IOException, SipException(Code)
Returns OutputStream to fill the SIP message body content.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 20 OutputStream to write body content
throws:
  IOException - if the OutputStream can not be opened,because of an I/O error occurred.
throws:
  SipException - INVALID_STATE the OutputStream can not be openedin this state (e.g. no message initialized).UNKNOWN_LENGTH Content-Length header not set.UNKNOWN_TYPE Content-Type header not set.



removeHeader
public void removeHeader(String name) throws SipException(Code)
Reomves header from the SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 18
Parameters:
  name - - name of the header to be removed, either intfull or compact form RFC 3261 p.32.
throws:
  SipException - - INVALID_STATE if header can not be removed inthis state.
INVALID_OPERATION if the system does not allow to removethis header.



send
public void send() throws IOException, SipException(Code)
Sends the SIP message. Send must also close the OutputStream if it was opened
throws:
  IOException - - if the message could not be sent or becauseof network failure
throws:
  InterruptedIOException - - if a timeout occurs whileeither tryingto send the message or if this Connection object is closedduring this send operation
throws:
  SipException - - INVALID_STATE if the message cannot be sentin this state.
INVALID_MESSAGE there was an errorin message format



setHeader
public void setHeader(String name, String value) throws SipException, IllegalArgumentException(Code)
Sets header value in SIP message.
See Also:   JSR180
See Also:    spec, v 1.0.1, p 17
Parameters:
  value - - the header value
throws:
  SipException - - INVALID_STATE if header can not be set inthis state.
INVALID_OPERATION if the system does not allow to setthis header.
throws:
  IllegalArgumentException - - MAY be thrown if the header orvalue is invalid



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