public static class SipProfile.Builder
extends Object
| java.lang.Object | |
| android.net.sip.SipProfile.Builder | |
助手类创建 SipProfile 。
Public constructors |
|
|---|---|
SipProfile.Builder(SipProfile profile) 根据给定的配置文件创建一个构建器。 |
|
SipProfile.Builder(String uriString) 构造函数。 |
|
SipProfile.Builder(String username, String serverDomain) 构造函数。 |
|
公共方法(Public methods) |
|
|---|---|
SipProfile |
build() 构建并返回SIP配置文件对象。 |
SipProfile.Builder |
setAuthUserName(String name) 设置用于认证的用户名。 |
SipProfile.Builder |
setAutoRegistration(boolean flag) 设置自动。 |
SipProfile.Builder |
setDisplayName(String displayName) 设置用户的显示名称。 |
SipProfile.Builder |
setOutboundProxy(String outboundProxy) 设置SIP服务器的出站代理。 |
SipProfile.Builder |
setPassword(String password) 设置SIP帐户的密码 |
SipProfile.Builder |
setPort(int port) 设置服务器的端口号。 |
SipProfile.Builder |
setProfileName(String name) 设置配置文件的名称。 |
SipProfile.Builder |
setProtocol(String protocol) 设置用于连接到SIP服务器的协议。 |
SipProfile.Builder |
setSendKeepAlive(boolean flag) 设置发送保持活动标志。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
SipProfile.Builder (SipProfile profile)
根据给定的配置文件创建一个构建器。
| 参数(Parameters) | |
|---|---|
profile |
SipProfile
|
SipProfile.Builder (String uriString)
构造函数。
| 参数(Parameters) | |
|---|---|
uriString |
String: the URI string as "sip:
|
| 抛出异常(Throws) | |
|---|---|
ParseException |
if the string is not a valid URI |
SipProfile.Builder (String username, String serverDomain)
构造函数。
| 参数(Parameters) | |
|---|---|
username |
String: username of the SIP account |
serverDomain |
String: the SIP server domain; if the network address is different from the domain, use setOutboundProxy(String) to set server address |
| 抛出异常(Throws) | |
|---|---|
ParseException |
if the parameters are not valid |
SipProfile build ()
构建并返回SIP配置文件对象。
| 返回(Returns) | |
|---|---|
SipProfile |
the profile object created |
SipProfile.Builder setAuthUserName (String name)
设置用于认证的用户名。
| 参数(Parameters) | |
|---|---|
name |
String: authentication username of the profile |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setAutoRegistration (boolean flag)
设置自动。 注册标志。
| 参数(Parameters) | |
|---|---|
flag |
boolean: true if the profile will be registered automatically, false otherwise |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setDisplayName (String displayName)
设置用户的显示名称。
| 参数(Parameters) | |
|---|---|
displayName |
String: display name of the user |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setOutboundProxy (String outboundProxy)
设置SIP服务器的出站代理。
| 参数(Parameters) | |
|---|---|
outboundProxy |
String: the network address of the outbound proxy |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setPassword (String password)
设置SIP帐户的密码
| 参数(Parameters) | |
|---|---|
password |
String: password of the SIP account |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setPort (int port)
设置服务器的端口号。 默认情况下,它是5060。
| 参数(Parameters) | |
|---|---|
port |
int: port number of the server |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
| 抛出异常(Throws) | |
|---|---|
IllegalArgumentException |
if the port number is out of range |
SipProfile.Builder setProfileName (String name)
设置配置文件的名称。 这个名字是由用户给出的。
| 参数(Parameters) | |
|---|---|
name |
String: name of the profile |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
SipProfile.Builder setProtocol (String protocol)
设置用于连接到SIP服务器的协议。 目前只支持“UDP”和“TCP”。
| 参数(Parameters) | |
|---|---|
protocol |
String: the protocol string |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |
| 抛出异常(Throws) | |
|---|---|
IllegalArgumentException |
if the protocol is not recognized |
SipProfile.Builder setSendKeepAlive (boolean flag)
设置发送保持活动标志。
| 参数(Parameters) | |
|---|---|
flag |
boolean: true if sending keep-alive message is required, false otherwise |
| 返回(Returns) | |
|---|---|
SipProfile.Builder |
this builder object |