Package org.eclipse.ecf.filetransfer

Examples of org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter


        canAdaptTo(source, receive, new Class[] {
            IRetrieveFileTransfer.class,
            IIncomingFileTransfer.class, IFileTransfer.class });
        return receive;
      }
      ISendFileTransferContainerAdapter send = (ISendFileTransferContainerAdapter) source
          .getAdapter(ISendFileTransferContainerAdapter.class);
      if (send != null) {
        canAdaptTo(source, send, new Class[] {
            IIncomingFileTransfer.class, IFileTransfer.class });
        return send;
View Full Code Here


    }
    final IRosterEntry entry = (IRosterEntry) selection;
    final IContainer container = getContainerForRosterEntry(entry);
    if (container instanceof XMPPContainer) {
      final IContributionItem[] contributions = new IContributionItem[1];
      final ISendFileTransferContainerAdapter ioftca = (ISendFileTransferContainerAdapter) container.getAdapter(ISendFileTransferContainerAdapter.class);
      if (!(ioftca != null && isAvailable(entry)))
        return EMPTY_ARRAY;
      final IAction fileSendAction = new Action() {
        public void run() {
          sendFileToTarget(ioftca, entry.getUser().getID());
View Full Code Here

      } catch (final MalformedURLException e1) {
        throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
      }
    }

    ISendFileTransferContainerAdapter fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);

    // If no handler setup for this protocol then throw
    if (fileTransfer == null) {
      if (protocol.equalsIgnoreCase("file")) { //$NON-NLS-1$
        fileTransfer = new LocalFileOutgoingFileTransfer();
      }
    }

    if (fileTransfer == null) {
      throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
    }

    fileTransfer.setConnectContextForAuthentication(connectContext);
    fileTransfer.setProxy(proxy);
    fileTransfer.sendOutgoingRequest(targetID, outgoingFile, transferListener, options);
  }
View Full Code Here

      } catch (final MalformedURLException e1) {
        throw new SendFileTransferException(Messages.AbstractRetrieveFileTransfer_MalformedURLException);
      }
    }

    ISendFileTransferContainerAdapter fileTransfer = Activator.getDefault().getSendFileTransfer(protocol);

    // If no handler setup for this protocol then throw
    if (fileTransfer == null) {
      throw new SendFileTransferException(NLS.bind(Messages.MultiProtocolOutgoingAdapter_EXCEPTION_NO_PROTOCOL_HANDER, targetID));
    }

    fileTransfer.setConnectContextForAuthentication(connectContext);
    fileTransfer.setProxy(proxy);
    fileTransfer.sendOutgoingRequest(targetID, localFileToSend, transferListener, options);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.filetransfer.ISendFileTransferContainerAdapter

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.