Package net.sf.jml

Examples of net.sf.jml.Email


        if (disconnectCalled) {
            throw new IMException("Unable to send message cause the IM connection is been " +
                    "disconnected");
        }
        if (loginProcessed && loggedIn) {
            final Email email = Email.parseStr(to);
            final String text = message;
            messageCount ++;
            MsnSwitchboard[] switchboards = messenger.getActiveSwitchboards();
            for (MsnSwitchboard switchboard1 : switchboards) {
                if (switchboard1.containContact(email)
                        && switchboard1.getAllContacts().length == 1) {
                    switchboard1.sendText(text);
                    messageCount--;
                    return;
                }
            }

            final Object attachment = new Object();
            messenger.addSwitchboardListener(new MsnSwitchboardAdapter() {

                public void switchboardStarted(MsnSwitchboard switchboard) {
                    if (switchboard.getAttachment() == attachment) {
                        switchboard.inviteContact(email);
                    }
                }

                public void contactJoinSwitchboard(MsnSwitchboard switchboard,
                                                   MsnContact contact) {
                    if (switchboard.getAttachment() == attachment
                            && email.equals(contact.getEmail())) {
                        switchboard.setAttachment(null);
                        messenger.removeSwitchboardListener(this);
                        switchboard.sendText(text);
                        messageCount --;
                    }
View Full Code Here


     
      int retry=0;
     
      while(!bSuccess && retry < messageSendingRetryCnt){
        String friendLoginName = toEMailAddress;
        Email friendMail=Email.parseStr(friendLoginName);
        messenger.sendText(friendMail, messageContent);               
              
                System.out.println("Success");               
                bSuccess=true;
              
View Full Code Here

  protected void messageReceived(MsnSession session) {
        super.messageReceived(session);

        MsnContactListImpl contactList = (MsnContactListImpl) session
                .getMessenger().getContactList();
        Email email = getEmail();
        MsnList list = getList();

        //    Update contact list
        MsnContactImpl contact = (MsnContactImpl) contactList
                .getContactByEmail(email);
View Full Code Here

     *     MsnMessenger instance
     * @throws IllegalArgumentException if unable to properly parse email address.
     */
    public static MsnMessenger createMsnMessenger(String email, String password)
            throws IllegalArgumentException {
        Email emailAddr = Email.parseStr(email);
        if (emailAddr == null)
            throw new IllegalArgumentException("email is not available");
        return new SimpleMessenger(emailAddr, password);
    }
View Full Code Here

        for (MsnMessageIterator iter = incoming.iterator(); iter.hasPrevious();) {
            MsnMessage message = iter.previous();
            if (message instanceof IncomingBPR)
                continue;
            if (message instanceof IncomingLST) {
                Email email = ((IncomingLST) message).getEmail();
                contact = contactList.getContactByEmail(email);
            } else if (message instanceof IncomingADC) {
                Email email = ((IncomingADC) message).getEmail();
                if (email == null) {
                    contact = contactList
                            .getContactById(((IncomingADC) message).getId());
                } else {
                    contact = contactList.getContactByEmail(email);
                }
            } else if (message instanceof IncomingADD) {
                Email email = ((IncomingADD) message).getEmail();
                contact = contactList.getContactByEmail(email);
            }
            break;
        }
View Full Code Here

TOP

Related Classes of net.sf.jml.Email

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.