Codota Logo
FileTransferNegotiator.getNextStreamID
Code IndexAdd Codota to your IDE (free)

How to use
getNextStreamID
method
in
org.jivesoftware.smackx.filetransfer.FileTransferNegotiator

Best Java code snippets using org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.getNextStreamID (Showing top 5 results out of 315)

  • Common ways to obtain FileTransferNegotiator
private void myMethod () {
FileTransferNegotiator f =
  • Codota IconXMPPConnection connection;FileTransferNegotiator.getInstanceFor(connection)
  • Codota IconConnection connection;new FileTransferNegotiator(connection)
  • Codota IconConnection connection;FileTransferNegotiator.getInstanceFor(connection)
  • Smart code suggestions by Codota
}
origin: igniterealtime/Smack

/**
 * Creates an OutgoingFileTransfer to send a file to another user.
 *
 * @param userID
 *            The fully qualified jabber ID (i.e. full JID) with resource of the user to
 *            send the file to.
 * @return The send file object on which the negotiated transfer can be run.
 * @exception IllegalArgumentException if userID is null or not a full JID
 */
public OutgoingFileTransfer createOutgoingFileTransfer(EntityFullJid userID) {
  // We need to create outgoing file transfers with a full JID since this method will later
  // use XEP-0095 to negotiate the stream. This is done with IQ stanzas that need to be addressed to a full JID
  // in order to reach an client entity.
  if (userID == null) {
    throw new IllegalArgumentException("userID was null");
  }
  return new OutgoingFileTransfer(connection().getUser(), userID,
      FileTransferNegotiator.getNextStreamID(),
      fileTransferNegotiator);
}
origin: tiandawu/IotXmpp

  /**
   * Creates an OutgoingFileTransfer to send a file to another user.
   * 
   * @param userID
   *            The fully qualified jabber ID with resource of the user to
   *            send the file to.
   * @return The send file object on which the negotiated transfer can be run.
   */
  public OutgoingFileTransfer createOutgoingFileTransfer(String userID) {
//        Why is this only accepting fully qualified JID?
//        if (userID == null || StringUtils.parseName(userID).length() <= 0
//                || StringUtils.parseServer(userID).length() <= 0
//                || StringUtils.parseResource(userID).length() <= 0) {
//            throw new IllegalArgumentException(
//                    "The provided user id was not fully qualified");
//        }

    return new OutgoingFileTransfer(connection.getUser(), userID,
        fileTransferNegotiator.getNextStreamID(),
        fileTransferNegotiator);
  }

origin: org.igniterealtime.smack/smackx

  /**
   * Creates an OutgoingFileTransfer to send a file to another user.
   * 
   * @param userID
   *            The fully qualified jabber ID with resource of the user to
   *            send the file to.
   * @return The send file object on which the negotiated transfer can be run.
   */
  public OutgoingFileTransfer createOutgoingFileTransfer(String userID) {
//        Why is this only accepting fully qualified JID?
//        if (userID == null || StringUtils.parseName(userID).length() <= 0
//                || StringUtils.parseServer(userID).length() <= 0
//                || StringUtils.parseResource(userID).length() <= 0) {
//            throw new IllegalArgumentException(
//                    "The provided user id was not fully qualified");
//        }

    return new OutgoingFileTransfer(connection.getUser(), userID,
        fileTransferNegotiator.getNextStreamID(),
        fileTransferNegotiator);
  }
 
origin: org.littleshoot/smack-xmpp-3-2-2

  /**
   * Creates an OutgoingFileTransfer to send a file to another user.
   * 
   * @param userID
   *            The fully qualified jabber ID with resource of the user to
   *            send the file to.
   * @return The send file object on which the negotiated transfer can be run.
   */
  public OutgoingFileTransfer createOutgoingFileTransfer(String userID) {
//        Why is this only accepting fully qualified JID?
//        if (userID == null || StringUtils.parseName(userID).length() <= 0
//                || StringUtils.parseServer(userID).length() <= 0
//                || StringUtils.parseResource(userID).length() <= 0) {
//            throw new IllegalArgumentException(
//                    "The provided user id was not fully qualified");
//        }

    return new OutgoingFileTransfer(connection.getUser(), userID,
        fileTransferNegotiator.getNextStreamID(),
        fileTransferNegotiator);
  }
 
origin: org.mobicents.resources/mobicents-slee-ra-xmpp-library

/**
 * Creates an OutgoingFileTransfer to send a file to another user.
 * 
 * @param userID
 *            The fully qualified jabber ID with resource of the user to
 *            send the file to.
 * @return The send file object on which the negotiated transfer can be run.
 */
public OutgoingFileTransfer createOutgoingFileTransfer(String userID) {
  if (userID == null || StringUtils.parseName(userID).length() <= 0
      || StringUtils.parseServer(userID).length() <= 0
      || StringUtils.parseResource(userID).length() <= 0) {
    throw new IllegalArgumentException(
        "The provided user id was not fully qualified");
  }
  return new OutgoingFileTransfer(connection.getUser(), userID,
      fileTransferNegotiator.getNextStreamID(),
      fileTransferNegotiator);
}
org.jivesoftware.smackx.filetransferFileTransferNegotiatorgetNextStreamID

Javadoc

Returns a new, unique, stream ID to identify a file transfer.

Popular methods of FileTransferNegotiator

  • getInstanceFor
    Returns the file transfer negotiator related to a particular connection. When this class is requeste
  • negotiateOutgoingTransfer
    Send a request to another user to send them a file. The other user has the option of, accepting, rej
  • <init>
  • createDefaultInitiationForm
  • getNegotiator
  • getOutgoingNegotiator
  • getStreamMethodField
  • selectStreamNegotiator
    Selects an appropriate stream negotiator after examining the incoming file transfer request.
  • setServiceEnabled
    Enable the Jabber services related to file transfer on the particular connection.
  • configureConnection
  • createIQ
    A convience method to create an IQ packet.
  • connection
  • createIQ,
  • connection

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Kernel (java.awt.image)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
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