Implementing a Protocol
Creating an AccountID.
Jitsi creates an account id for every ProtocolProviderService. AccountID-s contain account details such as user name and password, server address/port, proxy, and whatever else is necessary to initialize an account. Implementing an account id for the Gibberish protocol is quite simple and it comes down to the following.
import net.java.sip.communicator.service.protocol.*;
import java.util.Map;
/**
* ...
*/
public class GibberishAccountID
extends AccountID
{
/**
* ...
*/
GibberishAccountID(String userID, Map accountProperties)
{
super(userID
, accountProperties
, "Gibberish"
, "gibberish.org");
}
}
The complete implementation of the GibberishAccountID is available here. If you are interested in having a look at other implementations of the Account ID class, then try one of these: JabberAccountID, SipAccountID, IcqAccountID.
That’s all. We can now move to implementing the protocol provider factory.