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

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

Best Java code snippets using org.jivesoftware.smack.ConnectionConfiguration.getHost (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: tiandawu/IotXmpp

/**
 * Returns the host name of the server where the XMPP server is running. This would be the
 * IP address of the server or a name that may be resolved by a DNS server.
 * 
 * @return the host name of the server where the XMPP server is running.
 */
public String getHost() {
  return config.getHost();
}
origin: org.igniterealtime.smack/smack

/**
 * Returns the host name of the server where the XMPP server is running. This would be the
 * IP address of the server or a name that may be resolved by a DNS server.
 * 
 * @return the host name of the server where the XMPP server is running.
 */
public String getHost() {
  return config.getHost();
}
origin: org.littleshoot/smack-xmpp-3-2-2

/**
 * Returns the host name of the server where the XMPP server is running. This would be the
 * IP address of the server or a name that may be resolved by a DNS server.
 * 
 * @return the host name of the server where the XMPP server is running.
 */
public String getHost() {
  return config.getHost();
}
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 {
org.jivesoftware.smackConnectionConfigurationgetHost

Javadoc

Returns the host 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 (and therefore may not match the #getServiceName.

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,
  • getPort,
  • getServiceName

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • setContentView (Activity)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
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