Tabnine Logo
FileTransferNegotiator.getNextStreamID
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • JList (javax.swing)
  • Join (org.hibernate.mapping)
  • Top Vim plugins
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