Package hamsam.api

Examples of hamsam.api.Message


      nfe.printStackTrace();
      System.exit(1);
    }
    catch(IOException ioe)
    {
      Message msg = new Message();
      msg.addComponent(new TextComponent("Unable to initiate an IM session: " + ioe.getMessage()));
      processor.protocolMessageReceived(msg);
    }
    catch(IllegalStateException ise)
    {
      Message msg = new Message();
      msg.addComponent(new TextComponent("Unable to initiate an IM session: " + ise.getMessage()));
      processor.protocolMessageReceived(msg);
    }
  }
View Full Code Here


      sb.join(authString, sessionID);
    }
    catch(IOException e)
    {
      Message msg = new Message();
      msg.addComponent(new TextComponent("Unable to initiate an IM session: " + e.getMessage()));
      processor.protocolMessageReceived(msg);
    }
    catch(IllegalStateException e)
    {
      Message msg = new Message();
      msg.addComponent(new TextComponent("Unable to initiate an IM session: " + e.getMessage()));
      processor.protocolMessageReceived(msg);
    }
  }
View Full Code Here

    //    2. SmileyComponent

    MessageComponent[] comp = parseForURLs(new TextComponent(message));
    comp = parseForSmileys(comp);

    Message ret = new Message();
    for(int i = 0; i < comp.length; i++)
    {
      if(comp[i] instanceof TextComponent)
      {
        TextComponent txt = (TextComponent) comp[i];
        txt.setFont(font);
        txt.setColor(color);
      }
      ret.addComponent(comp[i]);
    }

    return ret;
  }
View Full Code Here

    MessageComponent[] comp = parseForURLs(new TextComponent(message));
    comp = parseForSmileys(comp);
    comp = parseForText(comp);

    Message ret = new Message();
    for(int i = 0; i < comp.length; i++)
      ret.addComponent(comp[i]);

    return ret;
  }
View Full Code Here

  private void sendMessage()
  {
    try
    {
      Message msg = new Message();
      String text = this.owner.getMessageFieldText();
      msg.addComponent(new TextComponent(text));
      this.buddy.sendInstantMessage(msg);
      this.owner.messageSent(text);
      this.owner.setMessageFieldText("");
    }
    catch(IllegalStateException e)
View Full Code Here

      }

      String body = msg.getBody();
      if(body != null)
      {
        Message apiMessage = Util.parseMSNMessage(body, font, color);
        String passport = msg.getParam(0);
        String alias = msg.getParam(1);
        Buddy buddy = new Buddy(protocol, passport);
        buddy.setAlias(alias);
        processor.conferenceMessageReceived(this.conf, buddy, apiMessage);
View Full Code Here

TOP

Related Classes of hamsam.api.Message

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.