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

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

Best Java code snippets using org.jivesoftware.smack.ConnectionConfiguration.getPort (Showing top 6 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: org.littleshoot/smack-xmpp-3-2-2

/**
 * Returns the port number of the XMPP server for this connection. The default port
 * for normal connections is 5222. The default port for SSL connections is 5223.
 * 
 * @return the port number of the XMPP server.
 */
public int getPort() {
  return config.getPort();
}
origin: org.igniterealtime.smack/smack

/**
 * Returns the port number of the XMPP server for this connection. The default port
 * for normal connections is 5222. The default port for SSL connections is 5223.
 * 
 * @return the port number of the XMPP server.
 */
public int getPort() {
  return config.getPort();
}
origin: tiandawu/IotXmpp

/**
 * Returns the port number of the XMPP server for this connection. The default port
 * for normal connections is 5222. The default port for SSL connections is 5223.
 * 
 * @return the port number of the XMPP server.
 */
public int getPort() {
  return config.getPort();
}
origin: org.igniterealtime.smack/smack

private void connectUsingConfiguration(ConnectionConfiguration config) throws XMPPException {
  String host = config.getHost();
  int port = config.getPort();
  try {
    if (config.getSocketFactory() == null) {
      this.socket = new Socket(host, port);
    }
    else {
      this.socket = config.getSocketFactory().createSocket(host, port);
    }
  }
  catch (UnknownHostException uhe) {
    String errorMessage = "Could not connect to " + host + ":" + port + ".";
    throw new XMPPException(errorMessage, new XMPPError(
        XMPPError.Condition.remote_server_timeout, errorMessage),
        uhe);
  }
  catch (IOException ioe) {
    String errorMessage = "XMPPError connecting to " + host + ":"
        + port + ".";
    throw new XMPPException(errorMessage, new XMPPError(
        XMPPError.Condition.remote_server_error, errorMessage), ioe);
  }
  initConnection();
}
origin: org.littleshoot/smack-xmpp-3-2-2

private void connectUsingConfiguration(ConnectionConfiguration config) throws XMPPException {
  String host = config.getHost();
  int port = config.getPort();
  try {
    if (config.getSocketFactory() == null) {
      this.socket = new Socket(host, port);
    }
    else {
      this.socket = config.getSocketFactory().createSocket(host, port);
    }
  }
  catch (UnknownHostException uhe) {
    String errorMessage = "Could not connect to " + host + ":" + port + ".";
    throw new XMPPException(errorMessage, new XMPPError(
        XMPPError.Condition.remote_server_timeout, errorMessage),
        uhe);
  }
  catch (IOException ioe) {
    String errorMessage = "XMPPError connecting to " + host + ":"
        + port + ".";
    throw new XMPPException(errorMessage, new XMPPError(
        XMPPError.Condition.remote_server_error, errorMessage), ioe);
  }
  initConnection();
}
origin: org.mobicents.resources/mobicents-slee-ra-xmpp-library

private void connectUsingConfiguration(ConnectionConfiguration config,
    SocketFactory socketFactory) throws XMPPException {
  this.host = config.getHost();
  this.port = config.getPort();
  try {
    if (socketFactory == null) {
org.jivesoftware.smackConnectionConfigurationgetPort

Javadoc

Returns the port to use when establishing the connection. The host and port to use might have been resolved by a DNS lookup as specified by the XMPP spec.

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
  • setRosterLoadedAtLogin
    Sets if the roster will be loaded from the server when logging in. This is the common behaviour for
  • 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
  • setSendPresence,
  • setSocketFactory,
  • getCallbackHandler,
  • getPassword,
  • getSecurityMode,
  • isSendPresence,
  • setCallbackHandler,
  • getHost,
  • getServiceName

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • putExtra (Intent)
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Reference (javax.naming)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
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