| javax.microedition.sip.SipClientConnection
All known Subclasses: gov.nist.microedition.sip.SipClientConnectionImpl,
SipClientConnection | public interface SipClientConnection extends SipConnection(Code) | | SipClientConnection represents SIP client transaction.
Application can create a new SipClientConnection with Connector
or SipDialog object.
See Also: JSR180 See Also: spec, v 1.0.1, p 21-33 |
enableRefresh | public int enableRefresh(javax.microedition.sip.SipRefreshListener srl) throws SipException(Code) | | Enables the refresh on for the request to be sent. The method return a
refresh ID, which can be used to update or stop the refresh.
See Also: JSR180 See Also: spec, v 1.0.1, p 29 Parameters: srl - - callback interface for refresh events, if this is null themethod returns 0 and refresh is not enabled. refresh ID. If the request is not refreshable returns 0. throws: SipException - - INVALID_STATE if the refresh can not be enabledin this state. |
initAck | public void initAck() throws SipException(Code) | | Convenience method to initialize SipClientConnection with SIP request
method ACK. ACK can be applied only to INVITE request.
See Also: JSR180 See Also: spec, v 1.0.1, p 27 |
initRequest | public void initRequest(java.lang.String method, javax.microedition.sip.SipConnectionNotifier scn) throws IllegalArgumentException, SipException(Code) | | Initializes SipClientConnection to a specific SIP
request method (REGISTER, INVITE, MESSAGE, ...).
See Also: JSR180 See Also: spec, v 1.0.1, p 25 Parameters: method - - Name of the method Parameters: scn - - SipConnectionNotifier to which the request will beassociated. If SipConnectionNotifier is null the request will not beassociated to a user defined listening point. throws: IllegalArgumentException - - if the method is invalid throws: SipException - - INVALID_STATE if the request can not be set,because of wrong state in SipClientConnection. Furthermore, ACK andCANCEL methods can not be initialized in Created state. |
receive | public boolean receive(long timeout) throws SipException, IOException(Code) | | Receives SIP response message. The receive method will update the
SipClientConnection with the last new received response.
If no message is received the method will block until something is
received or specified amount of time has elapsed.
See Also: JSR180 See Also: spec, v 1.0.1, p 28 Parameters: timeout - - the maximum time to wait in milliseconds.0 = do not wait, just poll Returns true if response was received. Returns false ifthe given timeout elapsed and no response was received. throws: SipException - - INVALID_STATE if the receive can not becalled because of wrong state. throws: IOException - - if the message could not be received orbecause of network failure |
setCredentials | public void setCredentials(java.lang.String username, java.lang.String password, java.lang.String realm) throws SipException(Code) | | Sets credentials for possible digest authentication.
See Also: JSR180 See Also: spec, v 1.0.1, p 29 Parameters: username - - username (for this protection domain) Parameters: password - - user password (for this protection domain) Parameters: realm - - defines the protection domain throws: SipException - - INVALID_STATE if the credentials can notbe set in this state. throws: NullPointerException - - if the username, password or realm is null |
setListener | public void setListener(javax.microedition.sip.SipClientConnectionListener sccl) throws IOException(Code) | | Sets the listener for incoming responses. If a listener is
already set it
will be overwritten. Setting listener to null will remove the current
listener.
See Also: JSR180 See Also: spec, v 1.0.1, p 28 Parameters: sccl - - reference to the listener object. Value null will removethe existing listener. throws: IOException - - if the connection is closed. |
setRequestURI | public void setRequestURI(java.lang.String URI) throws IllegalArgumentException, SipException(Code) | | Sets Request-URI explicitly. Request-URI can be set only in
Initialized state.
See Also: JSR180 See Also: spec, v 1.0.1, p 26 Parameters: URI - - Request-URI throws: IllegalArgumentException - - MAY be thrown if the URI is invalid throws: SipException - - INVALID_STATE if the Request-URI can not be set,because of wrong state.INVALID_OPERATION if the Request-URI is not allowed to be set. |
|
|