| 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 void | addHeader(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.SipDialog | getDialog() Returns the current SIP dialog. | public String | getHeader(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.String | getMethod() Gets the SIP method. | public java.lang.String | getReasonPhrase() Gets SIP response reason phrase. | public java.lang.String | getRequestURI() Gets Request-URI.
See Also: JSR180 See Also: spec, v 1.0.1, p 19 Request-URI of the message. | public int | getStatusCode() Gets SIP response status code. | public java.io.InputStream | openContentInputStream() 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.OutputStream | openContentOutputStream() 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 void | removeHeader(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 void | send() Sends the SIP message. | public void | setHeader(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. |
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 |
|
|