Codota Logo
ConnectionConfiguration.setRosterLoadedAtLogin
Code IndexAdd Codota to your IDE (free)

How to use
setRosterLoadedAtLogin
method
in
org.jivesoftware.smack.ConnectionConfiguration

Best Java code snippets using org.jivesoftware.smack.ConnectionConfiguration.setRosterLoadedAtLogin (Showing top 20 results out of 315)

  • Common ways to obtain ConnectionConfiguration
private void myMethod () {
ConnectionConfiguration c =
  • Codota IconString host;String serviceName;new ConnectionConfiguration(host, port, serviceName)
  • Codota IconString host;new ConnectionConfiguration(host, port)
  • Codota IconString serviceName;new ConnectionConfiguration(serviceName)
  • Smart code suggestions by Codota
}
origin: stackoverflow.com

 public void login(String userName, String password) throws XMPPException
{       
  SASLAuthentication.registerSASLMechanism("DIGEST-MD5",MySASLDigestMD5Mechanism. class);
  ConnectionConfiguration config = new ConnectionConfiguration("chat.facebook.com",5222);

  config.setSASLAuthenticationEnabled(true);
  config.setRosterLoadedAtLogin (true);

  connection = new XMPPConnection(config);
  connection.connect();
  connection.login(userName, password);
}
origin: stackoverflow.com

SmackConfiguration.setPacketReplyTimeout(15000);
 ConnectionConfiguration connectionConfig = new ConnectionConfiguration(host, port);
 connectionConfig.setRosterLoadedAtLogin(true);
 connectionConfig.setSendPresence(true);
 connectionConfig.setSASLAuthenticationEnabled(false);
 connectionConfig.setReconnectionAllowed(true);
 connection = new XMPPConnection(connectionConfig);
origin: stackoverflow.com

ConnectionConfiguration config = new ConnectionConfiguration(HOST1,
     5222);
 SmackConfiguration.DEBUG_ENABLED = true;
 SASLAuthentication.supportSASLMechanism("MD5", 0);
 System.setProperty("smack.debugEnabled", "true");
 config.setCompressionEnabled(false);
 config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
 config.setReconnectionAllowed(true);
 config.setSendPresence(true);
 config.setRosterLoadedAtLogin(true);
origin: org.mule.transports/mule-transport-xmpp

protected void createXmppConnection() throws XMPPException
{
  if (logger.isDebugEnabled())
  {
    logger.debug("Connecting to " + host + ":" + port);
  }
  ConnectionConfiguration connectionConfig = null;
  if (serviceName != null)
  {
    connectionConfig = new ConnectionConfiguration(host, port, serviceName);
  }
  else
  {
    connectionConfig = new ConnectionConfiguration(host, port);
  }
  // no need to load the roster (this is not an interactive app)
  connectionConfig.setRosterLoadedAtLogin(false);
  
  connection = new XMPPConnection(connectionConfig);
}
origin: stackoverflow.com

configuration.setSecurityMode(SecurityMode.enabled);
configuration.setReconnectionAllowed(true);
configuration.setRosterLoadedAtLogin(false);
configuration.setSendPresence(false);
configuration.setSocketFactory(SSLSocketFactory.getDefault());
origin: stackoverflow.com

ConnectionConfiguration cc = new ConnectionConfiguration(domain,
       port, service);
   // SASLAuthentication.supportSASLMechanism("PLAIN", 0);
   cc.setSASLAuthenticationEnabled(false);
   cc.setRosterLoadedAtLogin(true);
   cc.setCompressionEnabled(false);
   cc.setReconnectionAllowed(true);
   if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
     cc.setTruststoreType("AndroidCAStore");
     cc.setTruststorePassword(null);
     cc.setTruststorePath(null);
   } else {
     cc.setTruststoreType("BKS");
     String path = System.getProperty("javax.net.ssl.trustStore");
     if (path == null) {
       path = System.getProperty("java.home") + File.separator
           + "etc" + File.separator + "security"
           + File.separator + "cacerts.bks";
     }
     cc.setTruststorePath(path);
   }
 XMPPConnection connection = new XMPPConnection(cc);
 connection.login(username, password);
origin: stackoverflow.com

config.setRosterLoadedAtLogin(true);
config.setSendPresence(true);
config.setSASLAuthenticationEnabled(true);
origin: stackoverflow.com

SmackConfiguration.setPacketReplyTimeout(Constants.PACKET_TIME_OUT);
System.out.println(SmackConfiguration.getVersion());
config.setRosterLoadedAtLogin(false);
origin: stackoverflow.com

config.setSecurityMode(SecurityMode.enabled);
config.setReconnectionAllowed(true);
config.setRosterLoadedAtLogin(false);
config.setSendPresence(false);
config.setSocketFactory(SSLSocketFactory.getDefault());
origin: stackoverflow.com

connectionConfig.setSASLAuthenticationEnabled(true);
connectionConfig.setSecurityMode(true);
connectionConfig.setRosterLoadedAtLogin(true);
connectionConfig.setReconnectionAllowed(true);
connectionConfig.setSendPresence(false);
origin: stackoverflow.com

config.setReconnectionAllowed(true);
config.setSendPresence(true);
config.setRosterLoadedAtLogin(true);
origin: stackoverflow.com

config.setSASLAuthenticationEnabled(true);
config.setSecurityMode(SecurityMode.required);
config.setRosterLoadedAtLogin(true);
config.setTruststorePath("/system/etc/security/cacerts.bks");
config.setTruststorePassword("changeit");
origin: stackoverflow.com

config.setSASLAuthenticationEnabled(true);
config.setSecurityMode(SecurityMode.required);
config.setRosterLoadedAtLogin(true);
config.setTruststorePath("/system/etc/security/cacerts.bks");
config.setTruststorePassword("changeit");
origin: stackoverflow.com

config.setSecurityMode(SecurityMode.enabled);
config.setReconnectionAllowed(true);
config.setRosterLoadedAtLogin(false);
config.setSendPresence(false);
config.setSocketFactory(SSLSocketFactory.getDefault());
origin: stackoverflow.com

connConfig.setSASLAuthenticationEnabled(true);
connConfig.setSecurityMode(SecurityMode.required);
connConfig.setRosterLoadedAtLogin(true);
connConfig.setSendPresence(false);
connection = new XMPPConnection(connConfig);
origin: org.renci/xmpp-pubsub

SASLAuthentication.supportSASLMechanism("EXTERNAL");
config.setReconnectionAllowed(true);
config.setRosterLoadedAtLogin(true);
origin: signalapp/PushServer

private XMPPTCPConnection connect(long senderId, String apiKey)
  throws XMPPException, IOException, SmackException
{
 ConnectionConfiguration config = new ConnectionConfiguration(GCM_SERVER, GCM_PORT);
 config.setSecurityMode(ConnectionConfiguration.SecurityMode.enabled);
 config.setReconnectionAllowed(true);
 config.setRosterLoadedAtLogin(false);
 config.setSendPresence(false);
 config.setSocketFactory(SSLSocketFactory.getDefault());
 XMPPTCPConnection connection = new XMPPTCPConnection(config);
 connection.connect();
 connection.addConnectionListener(new LoggingConnectionListener());
 connection.addPacketListener(this, new PacketTypeFilter(Message.class));
 connection.login(senderId + "@gcm.googleapis.com", apiKey);
 return connection;
}
origin: tiandawu/IotXmpp

  /**
   * 初始化XmppConnection
   *
   * @param host 服务器ip
   * @param port 服务器端口
   */
  public XMPPConnection initConnection(String host, int port) {
    ConnectionConfiguration configuration = new ConnectionConfiguration(host, port);
    // 开启debug
    configuration.setDebuggerEnabled(true);
//        // 关闭安全验证登录方式
//        configuration.setSASLAuthenticationEnabled(false);
//        // 数据是否使用安全模式
//        configuration.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
//        // 设置数据是否压缩
//        configuration.setCompressionEnabled(false);
//        // 是否给服务器发送在线状态
    configuration.setSendPresence(true);
//        // 设置是否重新自动连接服务器
    configuration.setReconnectionAllowed(true);
//        // asmack bug
    configure(ProviderManager.getInstance());
    configuration.setRosterLoadedAtLogin(false);
    xmppConnection = new XMPPConnection(configuration);
    return xmppConnection;
  }

origin: carlosCharz/fcmxmppserver

config.setSecurityMode(SecurityMode.enabled);
config.setReconnectionAllowed(true);
config.setRosterLoadedAtLogin(false);
config.setSendPresence(false);
config.setSocketFactory(SSLSocketFactory.getDefault());
origin: Blazemeter/jmeter-bzm-plugins

} else {
  ConnectionConfiguration conf = new ConnectionConfiguration(address, port, serv_name);
  conf.setRosterLoadedAtLogin(true);
  conf.setSendPresence(false);
org.jivesoftware.smackConnectionConfigurationsetRosterLoadedAtLogin

Javadoc

Sets if the roster will be loaded from the server when logging in. This is the common behaviour for clients but sometimes clients may want to differ this or just never do it if not interested in rosters.

Popular methods of ConnectionConfiguration

  • <init>
  • setSecurityMode
    Sets the TLS security mode used when making the connection. By default, the mode is SecurityMode#ena
  • setCompressionEnabled
    Sets if the connection is going to use stream compression. Stream compression will be requested afte
  • setDebuggerEnabled
    Sets if the new connection about to be establish is going to be debugged. By default the value of Co
  • setReconnectionAllowed
    Sets if the reconnection mechanism is allowed to be used. By default reconnection is allowed.
  • setSASLAuthenticationEnabled
    Sets whether the client will use SASL authentication when logging into the server. If SASL authentic
  • getResource
    Returns the resource to use when trying to reconnect to the server.
  • getUsername
    Returns the username to use when trying to reconnect to the server.
  • isCompressionEnabled
    Returns true if the connection is going to use stream compression. Stream compression will be reques
  • setSendPresence
    Sets if an initial available presence will be sent to the server. By default an available presence w
  • setSocketFactory
    Sets the socket factory used to create new xmppConnection sockets. This is useful when connecting th
  • getCallbackHandler
    Returns a CallbackHandler to obtain information, such as the password or principal information durin
  • setSocketFactory,
  • getCallbackHandler,
  • getPassword,
  • getSecurityMode,
  • isSendPresence,
  • setCallbackHandler,
  • getHost,
  • getPort,
  • getServiceName

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • ImageIO (javax.imageio)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now