Package net.sf.jml.impl

Examples of net.sf.jml.impl.MsnFileTransferImpl


  protected void messageReceived(MsnSession session, MsnContact contact)
    {
        MsnslpResponse msnslpResponse = (MsnslpResponse) getSlpMessage();
        String sessionID = msnslpResponse.getBodys().getProperty("SessionID");

        MsnFileTransferImpl ft = (MsnFileTransferImpl)session.getMessenger().
            getFileTransferManager().getFileTransfer(sessionID);
        ft.setContact(contact);
        ft.refuse();
    }
View Full Code Here


        String sessionID = msnslpResponse.getBodys().getProperty("SessionID");

        if(sessionID == null)
            sessionID = String.valueOf(getSessionId());

        MsnFileTransferImpl ft = (MsnFileTransferImpl)session.getMessenger().
            getFileTransferManager().getFileTransfer(sessionID);

        if(ft == null)
            return;

        ft.setContact(contact);
        ft.cancel(false);
  }
View Full Code Here

        String sessionID = msnslpResponse.getBodys().getProperty("SessionID");

        if(sessionID == null)
            return;

        MsnFileTransferImpl ft = (MsnFileTransferImpl)session.getMessenger().
            getFileTransferManager().getFileTransfer(sessionID);

        if(ft == null)
            return;

        ft.setContact(contact);
        ft.start();
    }
View Full Code Here

  }

    @Override
  protected void messageReceived(MsnSession session, MsnContact contact)
    {
        MsnFileTransferImpl ft = (MsnFileTransferImpl)session.getMessenger().
            getFileTransferManager().
                getFileTransfer(String.valueOf(getSessionId()));

        // find file transfer put the data and there fire that
        // file is being processed
        if(ft != null)
            ft.process(
                body, getCurrentLength(), getTotalLength(), getOffset(), this);
        else
            logger.error("Unknown filetransfer!");
    }
View Full Code Here

            {
                logger.error("Cannot extract fileName", ex);
                return;
            }

            MsnFileTransferImpl fileTransfer =
                new MsnFileTransferImpl(sessionId, contact.getEmail(), this, session, false);
            fileTransfer.setContact(contact);

            fileTransfer.setFile(new File(fileName));
            fileTransfer.setFileTotalSize(fileSize);
            FileTransferWorker ftw = new FileTransferWorker(fileTransfer);

            session.getMessenger().getFileTransferManager().
                addFileTransfer(sessionId, ftw);
View Full Code Here

        {
            invite.setCurrentLength(slpMessageLength);
        }

        String sessionId = String.valueOf(lastRandomIdentifier);
        MsnFileTransferImpl fileTransfer =
            new MsnFileTransferImpl(sessionId, email, invite, session, true);

        fileTransfer.setFile(file);
        fileTransfer.setFileTotalSize(file.length());
        FileTransferWorker ftw = new FileTransferWorker(fileTransfer);
        ftw.setSwitchboard(switchboard);

        session.getMessenger().getFileTransferManager().
            addFileTransfer(sessionId, ftw);
View Full Code Here

TOP

Related Classes of net.sf.jml.impl.MsnFileTransferImpl

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.