Examples of SipcRequest


Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @param listener
   */
  public void userAuth(int presence, ActionEventListener listener)
  {
    SipcHeader wwwHeader = (SipcHeader) this.session.getAttribute(SipcHeader.WWWAUTHENTICATE);
    SipcRequest request = this.getMessageFactory().createUserAuthRequest(wwwHeader, presence,
        this.context.getTransferFactory().isMutiConnectionSupported(),
        this.context.getFetionStore().getStoreVersion());
    request.setResponseHandler(new UserAuthResponseHandler(context, this, listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

  /**
   * 注销登录
   */
  public void logout(ActionEventListener listener)
  {
    SipcRequest request = this.getMessageFactory().createLogoutRequest();
    request.setResponseHandler(new DefaultResponseHandler(listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @param listener 消息监听器
   */
  public void getPersonalInfo(ActionEventListener listener)
  {
    this.ensureOpened();
    SipcRequest request = this.getMessageFactory().createGetPersonalInfoRequest();
    request.setResponseHandler(new GetPersonalInfoResponseHandler(context, this, listener));
    this.process(request);
    }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @throws Exception
   */
  public void subscribeBuddyNotify(ActionEventListener listener)
  {
    this.ensureOpened();
        SipcRequest request = this.getMessageFactory().createSubscribeRequest();
        request.setResponseHandler(new DefaultResponseHandler(listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   */
  public void getGroupList(ActionEventListener listener)
  {
    this.ensureOpened();
    FetionStore store = this.context.getFetionStore();
    SipcRequest request = this.getMessageFactory().createGetGroupListRequest(store.getStoreVersion().getGroupVersion());
    request.setResponseHandler(new GetGroupListResponseHandler(context, this, listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * 获取群信息
   */
  public void getGroupsInfo(Collection<Group> groupList, ActionEventListener listener)
  {
    this.ensureOpened();
    SipcRequest request = this.getMessageFactory().createGetGroupInfoRequest(groupList);
    request.setResponseHandler(new GetGroupsInfoResponseHandler(context, this, listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * 获取群成员列表
   */
  public void getMemberList(Collection<Group> groupList, ActionEventListener listener)
  {
    this.ensureOpened();
    SipcRequest request = this.getMessageFactory().createGetMemberListRequest((groupList));
    request.setResponseHandler(new GetMemberListResponseHandler(context, this, listener));
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @throws IllegalResponseException
   */
  public String startChat() throws TransferException, RequestTimeoutException, InterruptedException, IllegalResponseException
  {
    this.ensureOpened();
    SipcRequest request = this.getMessageFactory().createStartChatRequest();
      ResponseFuture future = ResponseFuture.wrap(request);
      this.process(request);
      SipcResponse response = future.waitResponse();
      assertStatus(response.getStatusCode(), SipcStatus.ACTION_OK);
      return response.getHeader(SipcHeader.AUTHORIZATION).getValue();
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @throws Exception
   */
  public void addBuddy(final String uri,String localName, final Cord cord, final String desc, int promptId, final ActionEventListener listener)
  {
    this.ensureOpened();
    SipcRequest request = this.messageFactory.createAddBuddyRequest(uri, promptId, cord!=null?cord.getId():-1, desc, localName);
    request.setResponseHandler(new AddBuddyResponseHandler(context,this, listener));
     
      this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws TransferException
     */
    public void sendSMSMessage(Buddy buddy, Message message, ActionEventListener listener)
    {
      this.ensureOpened();
      SipcRequest request  = this.getMessageFactory().createSendSMSRequest(buddy.getUri(), message);
      request.setResponseHandler(new SendChatMessageResponseHandler(context, this, listener));
      this.process(request);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.