Package net.solosky.maplefetion.sipc

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


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

   * @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

   * @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

   */
  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

   * 获取群信息
   */
  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

   * 获取群成员列表
   */
  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

   * @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

   * @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

     * @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

Related Classes of net.solosky.maplefetion.sipc.SipcRequest

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.