Examples of SipcRequest


Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws InterruptedException
     * @throws RequestTimeoutException
     */
    private void subscribeNotify() throws TransferException, IllegalResponseException, RequestTimeoutException, InterruptedException
    {
      SipcRequest request = this.getMessageFactory().createSubscribeGroupNotifyRequest(this.group.getUri());
      this.helper.set(request);
      ResponseFuture future = ResponseFuture.wrap(request);
      this.process(request);
      SipcResponse response = future.waitResponse();
      assertStatus(response.getStatusCode(), SipcStatus.ACTION_OK);
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws RequestTimeoutException
     * @throws IllegalResponseException
     */
    private void bye() throws TransferException, RequestTimeoutException, InterruptedException, IllegalResponseException
    {
      SipcRequest request = this.getMessageFactory().createLogoutRequest(this.group.getUri());
      this.helper.set(request);
      ResponseFuture future = ResponseFuture.wrap(request);
      this.process(request);
      SipcResponse response = future.waitResponse();
      assertStatus(response.getStatusCode(), SipcStatus.ACTION_OK);
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws TransferException
     */
    public void sendChatMessage(Message message, ActionEventListener listener)
    {
      this.ensureOpened();
      SipcRequest request = this.getMessageFactory().createSendGroupChatMessageRequest(this.group.getUri(), message.toString());
      request = this.helper.set(request);
      request.setResponseHandler(new DefaultResponseHandler(listener));
      this.process(request);
    }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   */
  @Override
  public void sendChatMessage(Message message, ActionEventListener listener)
  {
    this.ensureOpened();
    SipcRequest req = this.getMessageFactory().createSendChatMessageRequest(this.mainBuddy.getUri(), message);
    callHelper.set(req);
    req.setResponseHandler(new SendChatMessageResponseHandler(context, this, listener));
    this.process(req);
    this.updateActiveTime();
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @throws IllegalResponseException
   */
  private void invite() throws TransferException, RequestTimeoutException,
          InterruptedException, IllegalResponseException
  {
    SipcRequest request = this.getMessageFactory()
            .createInviteRequest(
                    this.mainBuddy.getUri(),
                    this.context.getTransferFactory()
                            .getDefaultTransferLocalPort());
    this.callHelper.set(request);
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @throws TransferException
   */
  private void ack() throws TransferException
  {
    // 这个请求不需要回复
    SipcRequest request = this.getMessageFactory().createAckRequest(
            this.mainBuddy.getUri());
    this.callHelper.set(request);
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   *
   * @throws TransferException
   */
  private void bye() throws TransferException
  {
    SipcRequest request = this.getMessageFactory().createLogoutRequest(
            this.mainBuddy.getUri());
    this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

        BeanHelper.setValue(from, "relation", Relation.STRANGER);
        //添加至列表中
        this.context.getFetionStore().addBuddy(from);
       
        //如果是飞信好友,还需要获取这个陌生人的信息
        SipcRequest request = this.dialog.getMessageFactory().createGetContactInfoRequest(notify.getFrom());
        request.setResponseHandler(new GetContactInfoResponseHandler(context, dialog, from ,null));
        this.dialog.process(request);
      }
    
      //查找这个好友的聊天代理对话
      ChatDialogProxy chatDialogProxy = this.context.getChatDialogProxyFactoy().create(from);
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

          this.processorChain.getFirst().processOutcoming(out);
        } catch (FetionException e) {
          this.handleException(e);
          //如果是传输异常,就将其抛出,让调用者处理传输错误
          if(out instanceof SipcRequest) {
            SipcRequest request = (SipcRequest) out;
            if(request.getResponseHandler()!=null)
              request.getResponseHandler().ioerror(request);
          }
        }
    }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * @param presence    登录状态
   * @param listener
   */
  public void register(int presence, ActionEventListener listener)
  {
    SipcRequest request = this.getMessageFactory().createServerRegisterRequest(presence,
          this.context.getTransferFactory().isMutiConnectionSupported());
    request.setResponseHandler(new ServerRegisterResponseHandler(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.