SipProfile.Builder
public
static
class
SipProfile.Builder
extends Object
Helper class for creating a SipProfile
.
Summary
Inherited methods |
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeoutMillis, int nanos)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait(long timeoutMillis)
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted, or until a
certain amount of real time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until it is awakened, typically
by being notified or interrupted.
|
|
Public constructors
Builder
public Builder (SipProfile profile)
Creates a builder based on the given profile.
Parameters |
profile |
SipProfile |
Builder
public Builder (String uriString)
Constructor.
Parameters |
uriString |
String : the URI string as "sip:@" |
Builder
public Builder (String username,
String serverDomain)
Constructor.
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 |
Public methods
build
public SipProfile build ()
Builds and returns the SIP profile object.
setAuthUserName
public SipProfile.Builder setAuthUserName (String name)
Sets the username used for authentication.
Parameters |
name |
String : authentication username of the profile |
setAutoRegistration
public SipProfile.Builder setAutoRegistration (boolean flag)
Sets the auto. registration flag.
Parameters |
flag |
boolean : true if the profile will be registered automatically,
false otherwise |
setDisplayName
public SipProfile.Builder setDisplayName (String displayName)
Sets the display name of the user.
Parameters |
displayName |
String : display name of the user |
setOutboundProxy
public SipProfile.Builder setOutboundProxy (String outboundProxy)
Sets the outbound proxy of the SIP server.
Parameters |
outboundProxy |
String : the network address of the outbound proxy |
setPassword
public SipProfile.Builder setPassword (String password)
Sets the password of the SIP account
Parameters |
password |
String : password of the SIP account |
setPort
public SipProfile.Builder setPort (int port)
Sets the port number of the server. By default, it is 5060.
Parameters |
port |
int : port number of the server |
setProfileName
public SipProfile.Builder setProfileName (String name)
Sets the name of the profile. This name is given by user.
Parameters |
name |
String : name of the profile |
setProtocol
public SipProfile.Builder setProtocol (String protocol)
Sets the protocol used to connect to the SIP server. Currently,
only "UDP" and "TCP" are supported.
Parameters |
protocol |
String : the protocol string |
setSendKeepAlive
public SipProfile.Builder setSendKeepAlive (boolean flag)
Sets the send keep-alive flag.
Parameters |
flag |
boolean : true if sending keep-alive message is required,
false otherwise |