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

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

Best Java code snippets using org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.getInstanceFor (Showing top 8 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 a file transfer manager to initiate and receive file transfers.
 *
 * @param connection
 *            The XMPPConnection that the file transfers will use.
 */
private FileTransferManager(XMPPConnection connection) {
  super(connection);
  this.fileTransferNegotiator = FileTransferNegotiator
      .getInstanceFor(connection);
  connection.registerIQRequestHandler(new AbstractIqRequestHandler(StreamInitiation.ELEMENT,
          StreamInitiation.NAMESPACE, IQ.Type.set, Mode.async) {
    @Override
    public IQ handleIQRequest(IQ packet) {
      StreamInitiation si = (StreamInitiation) packet;
      final FileTransferRequest request = new FileTransferRequest(FileTransferManager.this, si);
      for (final FileTransferListener listener : listeners) {
            listener.fileTransferRequest(request);
      }
      return null;
    }
  });
}
origin: igniterealtime/Smack

  @Test
  public void verifyForm() throws Exception {
    FileTransferNegotiator fileNeg = FileTransferNegotiator.getInstanceFor(connection);
    try {
      fileNeg.negotiateOutgoingTransfer(JidTestUtil.DUMMY_AT_EXAMPLE_ORG, "streamid", "file", 1024, null, 10);
    } catch (NoResponseException e) {
      // We do not expect an answer. This unit test only checks the request sent.
    }
    Stanza packet = connection.getSentPacket();
    String xml = packet.toXML(null).toString();
    assertTrue(xml.indexOf("var='stream-method' type='list-single'") != -1);
  }
}
origin: org.mobicents.resources/mobicents-slee-ra-xmpp-library

/**
 * Creates a file transfer manager to initiate and receive file transfers.
 * 
 * @param connection
 *            The XMPPConnection that the file transfers will use.
 */
public FileTransferManager(XMPPConnection connection) {
  this.connection = connection;
  this.fileTransferNegotiator = FileTransferNegotiator
      .getInstanceFor(connection);
}
origin: tiandawu/IotXmpp

/**
 * Creates a file transfer manager to initiate and receive file transfers.
 * 
 * @param connection
 *            The Connection that the file transfers will use.
 */
public FileTransferManager(Connection connection) {
  this.connection = connection;
  this.fileTransferNegotiator = FileTransferNegotiator
      .getInstanceFor(connection);
}
origin: org.igniterealtime.smack/smackx

/**
 * Creates a file transfer manager to initiate and receive file transfers.
 * 
 * @param connection
 *            The Connection that the file transfers will use.
 */
public FileTransferManager(Connection connection) {
  this.connection = connection;
  this.fileTransferNegotiator = FileTransferNegotiator
      .getInstanceFor(connection);
}
origin: org.littleshoot/smack-xmpp-3-2-2

/**
 * Creates a file transfer manager to initiate and receive file transfers.
 * 
 * @param connection
 *            The Connection that the file transfers will use.
 */
public FileTransferManager(Connection connection) {
  this.connection = connection;
  this.fileTransferNegotiator = FileTransferNegotiator
      .getInstanceFor(connection);
}
origin: igniterealtime/Spark

BareJid bareJID = requestor.asBareJid();
FileTransferNegotiator.getInstanceFor(SparkManager.getConnection());
FileTransferNegotiator.IBB_ONLY = SettingsManager.getLocalPreferences().isFileTransferIbbOnly();
origin: igniterealtime/Spark

public void sendFile(final OutgoingFileTransfer transfer, FileTransferManager transferManager, final EntityFullJid jid, final String nickname) {
  this.transferManager = transferManager;
  FileTransferNegotiator.getInstanceFor(SparkManager.getConnection());
  FileTransferNegotiator.IBB_ONLY = SettingsManager.getLocalPreferences().isFileTransferIbbOnly();
org.jivesoftware.smackx.filetransferFileTransferNegotiatorgetInstanceFor

Javadoc

Returns the file transfer negotiator related to a particular connection. When this class is requested on a particular connection the file transfer service is automatically enabled.

Popular methods of FileTransferNegotiator

  • negotiateOutgoingTransfer
    Send a request to another user to send them a file. The other user has the option of, accepting, rej
  • <init>
  • createDefaultInitiationForm
  • getNegotiator
  • getNextStreamID
    Returns a new, unique, stream ID to identify a file transfer.
  • 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

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • putExtra (Intent)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
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