Tabnine Logo
StanzaError$Builder.addExtension
Code IndexAdd Tabnine to your IDE (free)

How to use
addExtension
method
in
org.jivesoftware.smack.packet.StanzaError$Builder

Best Java code snippets using org.jivesoftware.smack.packet.StanzaError$Builder.addExtension (Showing top 6 results out of 315)

origin: igniterealtime/Smack

/**
 * Complete and send an error. Complete all the null fields in an IQ error
 * response, using the session information we have or some info from the
 * incoming packet.
 *
 * @param iq
 *            The Jingle stanza we are responding to
 * @param jingleError
 *            the IQ stanza we want to complete and send
 */
public IQ createJingleError(IQ iq, JingleError jingleError) {
  IQ errorPacket = null;
  if (jingleError != null) {
    // TODO This is wrong according to XEP-166 § 10, but this jingle implementation is deprecated anyways
    StanzaError.Builder builder = StanzaError.getBuilder(StanzaError.Condition.undefined_condition);
    builder.addExtension(jingleError);
    errorPacket = IQ.createErrorResponse(iq, builder);
    //            errorPacket.addExtension(jingleError);
    // NO! Let the normal state machinery do all of the sending.
    // getConnection().sendStanza(perror);
    LOGGER.severe("Error sent: " + errorPacket.toXML(null));
  }
  return errorPacket;
}
origin: igniterealtime/Smack

/**
 * Responds an error with an specific condition.
 *
 * @param response the response to send.
 * @param condition the condition of the error.
 * @param specificCondition the adhoc command error condition.
 * @throws NotConnectedException
 */
private static IQ respondError(AdHocCommandData response, StanzaError.Condition condition,
    AdHocCommand.SpecificErrorCondition specificCondition) {
  StanzaError.Builder error = StanzaError.getBuilder(condition).addExtension(new AdHocCommandData.SpecificError(specificCondition));
  return respondError(response, error);
}
origin: igniterealtime/Smack

public IQ createErrorUnknownSession(Jingle request) {
  StanzaError.Builder error = StanzaError.getBuilder();
  error.setCondition(StanzaError.Condition.item_not_found)
      .addExtension(JingleError.UNKNOWN_SESSION);
  return IQ.createErrorResponse(request, error);
}
origin: igniterealtime/Smack

public IQ createErrorOutOfOrder(Jingle request) {
  StanzaError.Builder error = StanzaError.getBuilder();
  error.setCondition(StanzaError.Condition.unexpected_request)
      .addExtension(JingleError.OUT_OF_ORDER);
  return IQ.createErrorResponse(request, error);
}
origin: igniterealtime/Smack

public IQ createErrorUnsupportedInfo(Jingle request) {
  StanzaError.Builder error = StanzaError.getBuilder();
  error.setCondition(StanzaError.Condition.feature_not_implemented)
      .addExtension(JingleError.UNSUPPORTED_INFO);
  return IQ.createErrorResponse(request, error);
}
origin: igniterealtime/Smack

public IQ createErrorTieBreak(Jingle request) {
  StanzaError.Builder error = StanzaError.getBuilder();
  error.setCondition(StanzaError.Condition.conflict)
      .addExtension(JingleError.TIE_BREAK);
  return IQ.createErrorResponse(request, error);
}
org.jivesoftware.smack.packetStanzaError$BuilderaddExtension

Popular methods of StanzaError$Builder

  • build
  • setCondition
  • setDescriptiveTexts
  • <init>
  • copyFrom
  • setConditionText
  • setErrorGenerator
  • setExtensions
  • setStanza
  • setTextNamespace
  • setType
  • setDescriptiveEnText
  • setType,
  • setDescriptiveEnText

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JFileChooser (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now