Package org.eclipse.ecf.provider.xmpp.identity

Examples of org.eclipse.ecf.provider.xmpp.identity.XMPPFileID


      throw new SendFileTransferException("not connected");

    if (!(targetReceiver instanceof XMPPFileID))
      throw new SendFileTransferException("target receiver not XMPPFileID type.");

    final XMPPFileID fileID = (XMPPFileID) targetReceiver;

    int requestTimeout = -1;
    if (options != null) {
      final Object option = options.get(OUTGOING_REQUEST_TIMEOUT);
      if (option != null) {
        if (option instanceof String) {
          try {
            requestTimeout = Integer.valueOf((String) option).intValue();
          } catch (final NumberFormatException e) {
            // Ignore
          }
        } else if (option instanceof Integer) {
          requestTimeout = ((Integer) option).intValue();
        }
      }
    }

    final XMPPOutgoingFileTransfer fileTransfer = new XMPPOutgoingFileTransfer(manager, fileID.getXMPPID(), localFileToSend, progressListener, requestTimeout);

    try {
      fileTransfer.startSend(localFileToSend.getFile(), localFileToSend.getDescription());
    } catch (final XMPPException e) {
      throw new SendFileTransferException("Exception sending outgoing file transfer request", e);
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.provider.xmpp.identity.XMPPFileID

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.