public abstract class ProxyConnection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected SipAccountIDImpl |
account |
protected java.net.InetSocketAddress |
socketAddress |
protected java.lang.String |
transport |
Modifier | Constructor and Description |
---|---|
protected |
ProxyConnection(SipAccountIDImpl account)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
static ProxyConnection |
create(ProtocolProviderServiceSipImpl pps)
Factory method to create a proxy connection based on the account settings
of the protocol provider.
|
java.net.InetSocketAddress |
getAddress()
Gets the address to use for the next connection attempt.
|
boolean |
getNextAddress()
Retrieves the next address to use from DNS.
|
protected abstract boolean |
getNextAddressFromDns()
Implementations must use this method to get the next address, but do not
have to care about duplicate addresses.
|
java.lang.String |
getOutboundProxyString()
In case we are using an outbound proxy this method returns
a suitable string for use with Router.
|
java.lang.String |
getTransport()
Gets the transport to use for the next connection attempt.
|
boolean |
isSameInetAddress(java.net.InetAddress addressToTest)
Compares an InetAddress against the active outbound proxy.
|
void |
reset()
Resets the lookup to it's initial state.
|
protected java.lang.String transport
protected java.net.InetSocketAddress socketAddress
protected final SipAccountIDImpl account
protected ProxyConnection(SipAccountIDImpl account)
account
- the account of this SIP protocol instancepublic final java.net.InetSocketAddress getAddress()
public final java.lang.String getTransport()
public final java.lang.String getOutboundProxyString()
public final boolean isSameInetAddress(java.net.InetAddress addressToTest)
addressToTest
- The addres to test.public final boolean getNextAddress() throws DnssecException
getAddress()
,
false if the last address was reached. A new lookup from scratch
can be started by calling reset()
.DnssecException
- if there is a problem related to DNSSECprotected abstract boolean getNextAddressFromDns() throws DnssecException
DnssecException
- when a DNSSEC validation failure occured.public void reset()
public static ProxyConnection create(ProtocolProviderServiceSipImpl pps)
pps
- the protocol provider that needs a SIP server connection.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.