- Common ways to obtain ConnectionConfiguration
private void myMethod () {ConnectionConfiguration c =
String host;String serviceName;new ConnectionConfiguration(host, port, serviceName)
String host;new ConnectionConfiguration(host, port)
String serviceName;new ConnectionConfiguration(serviceName)
- Smart code suggestions by Codota
}
/** * Same as {@link #login(CharSequence, String, Resourcepart)}, but takes the resource from the connection * configuration. * * @param username * @param password * @throws XMPPException * @throws SmackException * @throws IOException * @throws InterruptedException * @see #login */ public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException, IOException, InterruptedException { login(username, password, config.getResource()); }
private EntityFullJid getUserJid() { try { return JidCreate.entityFullFrom(config.getUsername() + "@" + config.getXMPPServiceDomain() + "/" + (config.getResource() != null ? config.getResource() : "Test")); } catch (XmppStringprepException e) { throw new IllegalStateException(e); } }
Resourcepart resource = usedResource != null ? usedResource : config.getResource(); login(username, password, resource);
/** * Same as {@link #login(CharSequence, String, Resourcepart)}, but takes the resource from the connection * configuration. * * @param username * @param password * @throws XMPPException * @throws SmackException * @throws IOException * @throws InterruptedException * @see #login */ public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException, IOException, InterruptedException { login(username, password, config.getResource()); }
Resourcepart resource = usedResource != null ? usedResource : config.getResource(); login(username, password, resource);
config.getResource());