Package gov.nist.javax.sip

Examples of gov.nist.javax.sip.SipProviderImpl


      if (method.equalsIgnoreCase(Request.INVITE)) {
        this
            .removeFromMergeTable((SIPServerTransaction) sipTransaction);
      }
      // Send a notification to the listener.
      SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
          .getSipProvider();
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ServerTransaction) sipTransaction);

        sipProvider.handleEvent(event, sipTransaction);

      }
    } else {

      String key = sipTransaction.getTransactionId();
      Object removed = clientTransactionTable.remove(key);

      if (stackLogger.isLoggingEnabled()) {
        stackLogger.logDebug("REMOVED client tx " + removed + " KEY = "
            + key);
        if (removed != null) {
          SIPClientTransaction clientTx = (SIPClientTransaction) removed;
          if (clientTx.getMethod().equals(Request.INVITE)
              && this.maxForkTime != 0) {
            RemoveForkedTransactionTimerTask ttask = new RemoveForkedTransactionTimerTask(
                clientTx);
            this.timer.schedule(ttask, this.maxForkTime * 1000);
          }
        }
      }

      // Send a notification to the listener.
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
            .getSipProvider();
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ClientTransaction) sipTransaction);

        sipProvider.handleEvent(event, sipTransaction);
      }

    }
  }
View Full Code Here


        }

        @Override
        public void runTask() {
            SIPClientTransaction ct = SIPClientTransaction.this;
            SipProviderImpl provider = ct.getSipProvider();
    
            if (ct.getState() != TransactionState.TERMINATED ) {
                TimeoutEvent tte = new TimeoutEvent(SIPClientTransaction.this.getSipProvider(),
                        SIPClientTransaction.this, Timeout.TRANSACTION);
                provider.handleEvent(tte, ct);
            } else {
                if ( SIPClientTransaction.this.getSIPStack().getStackLogger().isLoggingEnabled(LogWriter.TRACE_DEBUG) ) {
                    SIPClientTransaction.this.getSIPStack().getStackLogger().logDebug("state = " + ct.getState());
                }
            }
View Full Code Here

                    // Retransmit last response until ack.
                    if (lastResponse.getStatusCode() / 100 > 2 && !this.isAckSeen)
                        super.sendMessage(lastResponse);
                } else {
                    // alert the application to retransmit the last response
                    SipProviderImpl sipProvider = (SipProviderImpl) this.getSipProvider();
                    TimeoutEvent txTimeout = new TimeoutEvent(sipProvider, this,
                            Timeout.RETRANSMIT);
                    sipProvider.handleEvent(txTimeout, this);
                }

            }
        } catch (IOException e) {
            if (sipStack.isLoggingEnabled())
View Full Code Here

      if (method.equalsIgnoreCase(Request.INVITE)) {
        this
            .removeFromMergeTable((SIPServerTransaction) sipTransaction);
      }
      // Send a notification to the listener.
      SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
          .getSipProvider();
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ServerTransaction) sipTransaction);

        sipProvider.handleEvent(event, sipTransaction);

      }
    } else {

      String key = sipTransaction.getTransactionId();
      Object removed = clientTransactionTable.remove(key);

      if (stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
        stackLogger.logDebug("REMOVED client tx " + removed + " KEY = "
            + key);
        if (removed != null) {
          SIPClientTransaction clientTx = (SIPClientTransaction) removed;
          if (clientTx.getMethod().equals(Request.INVITE)
              && this.maxForkTime != 0) {
            RemoveForkedTransactionTimerTask ttask = new RemoveForkedTransactionTimerTask(
                clientTx);
            this.timer.schedule(ttask, this.maxForkTime * 1000);
          }
        }
      }

      // Send a notification to the listener.
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
            .getSipProvider();
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ClientTransaction) sipTransaction);

        sipProvider.handleEvent(event, sipTransaction);
      }
        ((SIPClientTransaction)sipTransaction).stopExpiresTimer();

    }
  }
View Full Code Here

                  if (lastResponseStatusCode / 100 >= 2 && !this.isAckSeen) {
                      resendLastResponseAsBytes(false);
                    }
                } else {
                    // alert the application to retransmit the last response
                    SipProviderImpl sipProvider = (SipProviderImpl) this.getSipProvider();
                    TimeoutEvent txTimeout = new TimeoutEvent(sipProvider, this,
                            Timeout.RETRANSMIT);
                    sipProvider.handleEvent(txTimeout, this);
                }

            }
        } catch (IOException e) {
            if (sipStack.isLoggingEnabled())
View Full Code Here

            if (method.equalsIgnoreCase(Request.INVITE)) {
        this
            .removeFromMergeTable((SIPServerTransaction) sipTransaction);
            }
            // Send a notification to the listener.
      SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
          .getSipProvider();
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ServerTransaction) sipTransaction);

                sipProvider.handleEvent(event, sipTransaction);

            }
        } else {

            String key = sipTransaction.getTransactionId();
            Object removed = clientTransactionTable.remove(key);

            if (stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
        stackLogger.logDebug("REMOVED client tx " + removed + " KEY = "
            + key);
                if ( removed != null ) {
                   SIPClientTransaction clientTx = (SIPClientTransaction)removed;
          if (clientTx.getMethod().equals(Request.INVITE)
              && this.maxForkTime != 0) {
            RemoveForkedTransactionTimerTask ttask = new RemoveForkedTransactionTimerTask(
                clientTx);
                       this.timer.schedule(ttask, this.maxForkTime * 1000);
                       clientTx.stopExpiresTimer();
                   }
                }
            }

            // Send a notification to the listener.
      if (removed != null
          && sipTransaction.testAndSetTransactionTerminatedEvent()) {
        SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
            .getSipProvider();
        TransactionTerminatedEvent event = new TransactionTerminatedEvent(
            sipProvider, (ClientTransaction) sipTransaction);

                sipProvider.handleEvent(event, sipTransaction);
            }

        }
    }
View Full Code Here

        }

        @Override
        public void runTask() {
            SIPClientTransaction ct = SIPClientTransaction.this;
            SipProviderImpl provider = ct.getSipProvider();
    
            if (ct.getState() != TransactionState.TERMINATED ) {
                TimeoutEvent tte = new TimeoutEvent(SIPClientTransaction.this.getSipProvider(),
                        SIPClientTransaction.this, Timeout.TRANSACTION);
                provider.handleEvent(tte, ct);
            } else {
                if ( SIPClientTransaction.this.getSIPStack().getStackLogger().isLoggingEnabled(LogWriter.TRACE_DEBUG) ) {
                    SIPClientTransaction.this.getSIPStack().getStackLogger().logDebug("state = " + ct.getState());
                }
            }
View Full Code Here

                    // Retransmit last response until ack.
                    if (lastResponse.getStatusCode() / 100 > 2 && !this.isAckSeen)
                        super.sendMessage(lastResponse);
                } else {
                    // alert the application to retransmit the last response
                    SipProviderImpl sipProvider = (SipProviderImpl) this.getSipProvider();
                    TimeoutEvent txTimeout = new TimeoutEvent(sipProvider, this,
                            Timeout.RETRANSMIT);
                    sipProvider.handleEvent(txTimeout, this);
                }

            }
        } catch (IOException e) {
            if (sipStack.isLoggingEnabled())
View Full Code Here

        }

        @Override
        public void runTask() {
            SIPClientTransaction ct = SIPClientTransaction.this;
            SipProviderImpl provider = ct.getSipProvider();
    
            if (ct.getState() != TransactionState.TERMINATED ) {
                TimeoutEvent tte = new TimeoutEvent(SIPClientTransaction.this.getSipProvider(),
                        SIPClientTransaction.this, Timeout.TRANSACTION);
                provider.handleEvent(tte, ct);
            } else {
                if ( SIPClientTransaction.this.getSIPStack().getStackLogger().isLoggingEnabled(LogWriter.TRACE_DEBUG) ) {
                    SIPClientTransaction.this.getSIPStack().getStackLogger().logDebug("state = " + ct.getState());
                }
            }
View Full Code Here

            if (method.equalsIgnoreCase(Request.INVITE)) {
                this
                        .removeFromMergeTable((SIPServerTransaction) sipTransaction);
            }
            // Send a notification to the listener.
            SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
                    .getSipProvider();
            if (removed != null
                    && sipTransaction.testAndSetTransactionTerminatedEvent()) {
                TransactionTerminatedEvent event = new TransactionTerminatedEvent(
                        sipProvider, (ServerTransaction) sipTransaction);

                sipProvider.handleEvent(event, sipTransaction);

            }
        } else {

            String key = sipTransaction.getTransactionId();
            Object removed = clientTransactionTable.remove(key);

            if (stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) {
                stackLogger.logDebug("REMOVED client tx " + removed + " KEY = "
                        + key);
            }
            if ( removed != null ) {
                SIPClientTransaction clientTx = (SIPClientTransaction)removed;
                final String forkId = clientTx.getForkId();
                if (forkId != null && clientTx.isInviteTransaction()
                        && this.maxForkTime != 0) {
                    this.timer.schedule(new RemoveForkedTransactionTimerTask(
                            forkId), this.maxForkTime * 1000);
                    clientTx.stopExpiresTimer();
                }
            }

            // Send a notification to the listener.
            if (removed != null
                    && sipTransaction.testAndSetTransactionTerminatedEvent()) {
                SipProviderImpl sipProvider = (SipProviderImpl) sipTransaction
                        .getSipProvider();
                TransactionTerminatedEvent event = new TransactionTerminatedEvent(
                        sipProvider, (ClientTransaction) sipTransaction);

                sipProvider.handleEvent(event, sipTransaction);
            }

        }
    }
View Full Code Here

TOP

Related Classes of gov.nist.javax.sip.SipProviderImpl

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.