public static class SipProfile.Builder extends Object
SipProfile
.Constructor and Description |
---|
Builder(SipProfile profile)
Creates a builder based on the given profile.
|
Builder(String uriString)
Constructor.
|
Builder(String username,
String serverDomain)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SipProfile |
build()
Builds and returns the SIP profile object.
|
SipProfile.Builder |
setAuthUserName(String name)
Sets the username used for authentication.
|
SipProfile.Builder |
setAutoRegistration(boolean flag)
Sets the auto. registration flag.
|
SipProfile.Builder |
setDisplayName(String displayName)
Sets the display name of the user.
|
SipProfile.Builder |
setOutboundProxy(String outboundProxy)
Sets the outbound proxy of the SIP server.
|
SipProfile.Builder |
setPassword(String password)
Sets the password of the SIP account
|
SipProfile.Builder |
setPort(int port)
Sets the port number of the server.
|
SipProfile.Builder |
setProfileName(String name)
Sets the name of the profile.
|
SipProfile.Builder |
setProtocol(String protocol)
Sets the protocol used to connect to the SIP server.
|
SipProfile.Builder |
setSendKeepAlive(boolean flag)
Sets the send keep-alive flag.
|
public Builder(SipProfile profile)
public Builder(String uriString) throws ParseException
uriString
- the URI string as "sip:ParseException
- if the string is not a valid URIpublic Builder(String username, String serverDomain) throws ParseException
username
- username of the SIP accountserverDomain
- the SIP server domain; if the network address
is different from the domain, use setOutboundProxy(java.lang.String)
to
set server addressParseException
- if the parameters are not validpublic SipProfile.Builder setAuthUserName(String name)
name
- authentication username of the profilepublic SipProfile.Builder setProfileName(String name)
name
- name of the profilepublic SipProfile.Builder setPassword(String password)
password
- password of the SIP accountpublic SipProfile.Builder setPort(int port) throws IllegalArgumentException
port
- port number of the serverIllegalArgumentException
- if the port number is out of rangepublic SipProfile.Builder setProtocol(String protocol) throws IllegalArgumentException
protocol
- the protocol stringIllegalArgumentException
- if the protocol is not recognizedpublic SipProfile.Builder setOutboundProxy(String outboundProxy)
outboundProxy
- the network address of the outbound proxypublic SipProfile.Builder setDisplayName(String displayName)
displayName
- display name of the userpublic SipProfile.Builder setSendKeepAlive(boolean flag)
flag
- true if sending keep-alive message is required,
false otherwisepublic SipProfile.Builder setAutoRegistration(boolean flag)
flag
- true if the profile will be registered automatically,
false otherwisepublic SipProfile build()