Package net.solosky.maplefetion.event.action

Examples of net.solosky.maplefetion.event.action.ActionEventListener


      this.updateLoginState(LoginState.SIPC_REGISTER_DOING, null);
    ServerDialog serverDialog = this.context.getDialogFactory().createServerDialog();
        serverDialog.openDialog();
       
        ActionEventFuture future = new ActionEventFuture();
      ActionEventListener listener = new FutureActionEventListener(future);
     
      //注册服务器
      serverDialog.register(presence, listener);
      Dialog.assertActionEvent(future.waitActionEventWithException(), ActionEventType.SUCCESS);
     
View Full Code Here


     * @throws IllegalResponseException
     */
    private void getContactsInfo() throws IllegalResponseException, RequestTimeoutException, TransferException, SystemException, InterruptedException
    {
      ActionEventFuture future = new ActionEventFuture();
      ActionEventListener listener = new FutureActionEventListener(future);
      ServerDialog dialog = this.context.getDialogFactory().getServerDialog();
    this.updateLoginState(LoginState.GET_CONTACTS_INFO_DOING, null);
   
       
        //订阅异步通知
View Full Code Here

     * @throws IllegalResponseException
     */
    private void getGroupsInfo() throws IllegalResponseException, RequestTimeoutException, TransferException, SystemException, InterruptedException
    {
      ActionEventFuture future = new ActionEventFuture();
      ActionEventListener listener = new FutureActionEventListener(future);
      ServerDialog dialog = this.context.getDialogFactory().getServerDialog();
      StoreVersion storeVersion   = this.context.getFetionStore().getStoreVersion();
      StoreVersion userVersion    = this.context.getFetionUser().getStoreVersion();

      this.updateLoginState(LoginState.GET_GROUPS_INFO_DOING, null);
View Full Code Here

      }
     
      public void tel(final String tel, String msg)
      {
        long mobile = Long.parseLong(tel);
        this.client.sendChatMessage(mobile, new Message(StringHelper.qouteHtmlSpecialChars(msg), Message.TYPE_PLAIN), new ActionEventListener() {
        public void fireEevent(ActionEvent event)
        {
          switch(event.getEventType()){
           
            case SUCCESS:
View Full Code Here

       */
      public void sms(String uri, final String message)
      {
        final Buddy buddy = this.client.getFetionStore().getBuddyByUri(uri);
        if(buddy!=null) {
          this.client.sendSMSMessage(buddy, Message.wrap(message), new ActionEventListener(){
          public void fireEevent(ActionEvent event)
          {
            if(event.getEventType()==ActionEventType.SUCCESS){
              println("提示:发送给"+buddy.getDisplayName()+" 的短信发送成功!");
            }else{
View Full Code Here

      /**
       * 给自己发送短信
       */
      public void self(String message)
      {
        this.client.sendSMSMessage(this.client.getFetionUser(), new Message(message, Message.TYPE_PLAIN), new ActionEventListener(){
              public void fireEevent(ActionEvent event)
        {
          if(event.getEventType()==ActionEventType.SUCCESS){
            println("给自己发送短信成功!");
          }else{
View Full Code Here

        if(groupuri==nullreturn;
        final Group group = this.client.getFetionStore().getGroup(groupuri);
        if(group!=null) {
          GroupDialog dialog = this.client.getDialogFactory().findGroupDialog(group);
          if(dialog!=null) {
            dialog.sendChatMessage(Message.wrap(message), new ActionEventListener() {
              public void fireEevent(ActionEvent event)
              {
                if(event.getEventType()==ActionEventType.SUCCESS){
                  println("提示:发送给群 "+group.getName()+" 的消息发送成功!");
              }else{
View Full Code Here

        if(buddy==null) {
          println("找不到好友,请重新输入好友信息");
        }else if(UriHelper.isMobile(buddy.getUri())) {
          printBuddyInfo(buddy);
        }else {
          this.client.retireBuddyInfo(buddy, new ActionEventListener() {
          public void fireEevent(ActionEvent event)
          {
            if(event.getEventType()==ActionEventType.SUCCESS){
              printBuddyInfo(buddy);
            }else{
View Full Code Here

       * 改变自己昵称
       * @throws Exception
       */
      public void nickname(String nickName)
      {
        this.client.setNickName(nickName, new ActionEventListener() {
                public void fireEevent(ActionEvent event)
        {
          if(event.getEventType()==ActionEventType.SUCCESS){
            println("更改昵称成功!");
          }else{
View Full Code Here

       * 改变自己的个性签名
       * @throws Exception
       */
      public void impresa(String impresa) throws Exception
      {
        this.client.setImpresa(impresa, new ActionEventListener() {
                public void fireEevent(ActionEvent event)
        {
          if(event.getEventType()==ActionEventType.SUCCESS){
            println("更改个性签名成功!");
          }else{
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.event.action.ActionEventListener

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.