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

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

Best Java code snippets using org.jivesoftware.smack.ConnectionConfiguration.getSecurityMode (Showing top 10 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: igniterealtime/Smack

      || config.getSecurityMode() == SecurityMode.disabled) {
tlsHandled.reportSuccess();
saslFeatureReceived.reportSuccess();
origin: igniterealtime/Smack

if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) {
  shutdown();
  throw new SecurityRequiredByClientException();
origin: org.igniterealtime.smack/smack

/**
 * Notification message saying that the server supports TLS so confirm the server that we
 * want to secure the connection.
 *
 * @param required true when the server indicates that TLS is required.
 */
void startTLSReceived(boolean required) {
  if (required && config.getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.disabled) {
    packetReader.notifyConnectionError(new IllegalStateException(
        "TLS required by server but not allowed by connection configuration"));
    return;
  }
  if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) {
    // Do not secure the connection using TLS since TLS was disabled
    return;
  }
  try {
    writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
    writer.flush();
  }
  catch (IOException e) {
    packetReader.notifyConnectionError(e);
  }
}
origin: tiandawu/IotXmpp

/**
 * Notification message saying that the server supports TLS so confirm the server that we
 * want to secure the connection.
 *
 * @param required true when the server indicates that TLS is required.
 */
void startTLSReceived(boolean required) {
  if (required && config.getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.disabled) {
    notifyConnectionError(new IllegalStateException(
        "TLS required by server but not allowed by connection configuration"));
    return;
  }
  if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) {
    // Do not secure the connection using TLS since TLS was disabled
    return;
  }
  try {
    writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
    writer.flush();
  }
  catch (IOException e) {
    notifyConnectionError(e);
  }
}
origin: org.littleshoot/smack-xmpp-3-2-2

/**
 * Notification message saying that the server supports TLS so confirm the server that we
 * want to secure the connection.
 *
 * @param required true when the server indicates that TLS is required.
 */
void startTLSReceived(boolean required) {
  if (required && config.getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.disabled) {
    packetReader.notifyConnectionError(new IllegalStateException(
        "TLS required by server but not allowed by connection configuration"));
    return;
  }
  if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) {
    // Do not secure the connection using TLS since TLS was disabled
    return;
  }
  try {
    writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
    writer.flush();
  }
  catch (IOException e) {
    packetReader.notifyConnectionError(e);
  }
}
origin: tiandawu/IotXmpp

  if (!startTLSReceived && connection.getConfiguration().getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.required) {
    throw new XMPPException("Server does not support security (TLS), " +
if (!startTLSReceived || connection.getConfiguration().getSecurityMode() ==
    ConnectionConfiguration.SecurityMode.disabled) {
  releaseConnectionIDLock();
origin: org.igniterealtime.smack/smack

  if (!startTLSReceived && connection.getConfiguration().getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.required)
if (!startTLSReceived || connection.getConfiguration().getSecurityMode() ==
    ConnectionConfiguration.SecurityMode.disabled)
origin: org.littleshoot/smack-xmpp-3-2-2

  if (!startTLSReceived && connection.getConfiguration().getSecurityMode() ==
      ConnectionConfiguration.SecurityMode.required)
if (!startTLSReceived || connection.getConfiguration().getSecurityMode() ==
    ConnectionConfiguration.SecurityMode.disabled)
origin: org.igniterealtime.smack/smack-core

      || config.getSecurityMode() == SecurityMode.disabled) {
tlsHandled.reportSuccess();
saslFeatureReceived.reportSuccess();
origin: org.igniterealtime.smack/smack-core

if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) {
  shutdown();
  throw new SecurityRequiredByClientException();
org.jivesoftware.smackConnectionConfigurationgetSecurityMode

Javadoc

Returns the TLS security mode used when making the connection. By default, the mode is SecurityMode#enabled.

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,
  • isSendPresence,
  • setCallbackHandler,
  • getHost,
  • 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