Examples of SipcRequest


Examples of net.solosky.maplefetion.sipc.SipcRequest

      try {
          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

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

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws TransferException
     */
    private void register(String credential) throws RequestTimeoutException, InterruptedException, IllegalResponseException, TransferException
    {
      //发送注册信息
    SipcRequest request = this.messageFactory.createRegisterChatRequest(credential);
    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
     */
    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

     * @see net.solosky.maplefetion.client.dialog.MutipartyDialog#inviteBuddy(net.solosky.maplefetion.bean.FetionBuddy, net.solosky.maplefetion.client.dialog.ActionEventListener)
     */
    @Override
    public void inviteBuddy(Buddy buddy, ActionEventListener listener)
    {
     SipcRequest request = this.messageFactory.createInvateBuddyRequest(this.mainBuddy.getUri());
     request.setResponseHandler(new DefaultResponseHandler(listener));
        this.process(request);
    }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * 发送一个震屏信息给对方
   * @param listener
   */
  public void sendNudgeState(ActionEventListener listener){
     this.ensureOpened();
     SipcRequest request = this.messageFactory.createSendChatStateRequest("nudge");
     request.setResponseHandler(new DefaultResponseHandler(listener));
        this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

   * 发送用户正在输入状态
   * @param listener
   */
  public void sendInputState(ActionEventListener listener){
    this.ensureOpened();
    SipcRequest request = this.messageFactory.createSendChatStateRequest("input");
     request.setResponseHandler(new DefaultResponseHandler(listener));
        this.process(request);
  }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws RequestTimeoutException
     * @throws IllegalResponseException
     */
    private void invite() throws TransferException, IllegalResponseException, RequestTimeoutException, InterruptedException
    {
      SipcRequest request = this.getMessageFactory().createInviteRequest(
          this.group.getUri(),this.context.getTransferFactory().getDefaultTransferLocalPort());
      this.helper.set(request);
      ResponseFuture future = ResponseFuture.wrap(request);
      this.process(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.group.getUri());
      this.helper.set(request);
      this.process(request);
    }
View Full Code Here

Examples of net.solosky.maplefetion.sipc.SipcRequest

     * @throws InterruptedException
     * @throws IllegalResponseException
     */
    private void setPresence() throws TransferException, RequestTimeoutException, InterruptedException, IllegalResponseException
    {
      SipcRequest request = this.getMessageFactory().createSetGroupPresenceRequest(group.getUri(), Presence.ONLINE);
      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
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.