gov.nist.javax.sip.stack
クラス SIPClientTransaction

java.lang.Object
  上位を拡張 gov.nist.javax.sip.stack.MessageChannel
      上位を拡張 gov.nist.javax.sip.stack.SIPTransaction
          上位を拡張 gov.nist.javax.sip.stack.SIPClientTransaction
すべての実装されたインタフェース:
PendingRecord, ServerResponseInterface, java.io.Serializable, javax.sip.ClientTransaction, javax.sip.Transaction

public class SIPClientTransaction
extends SIPTransaction
implements ServerResponseInterface, javax.sip.ClientTransaction, PendingRecord

Represents a client transaction. Implements the following state machines. (From RFC 3261)

 
 
 
                                |INVITE from TU
              Timer A fires     |INVITE sent
              Reset A,          V                      Timer B fires
              INVITE sent +-----------+                or Transport Err.
                +---------|           |---------------+inform TU
                |         |  Calling  |               |
                +-------->|           |-------------->|
                          +-----------+ 2xx           |
                             |  |       2xx to TU     |
                             |  |1xx                  |
     300-699 +---------------+  |1xx to TU            |
    ACK sent |                  |                     |
 resp. to TU |  1xx             V                     |
             |  1xx to TU  -----------+               |
             |  +---------|           |               |
             |  |         |Proceeding |-------------->|
             |  +-------->|           | 2xx           |
             |            +-----------+ 2xx to TU     |
             |       300-699    |                     |
             |       ACK sent,  |                     |
             |       resp. to TU|                     |
             |                  |                     |      NOTE:
             |  300-699         V                     |
             |  ACK sent  +-----------+Transport Err. |  transitions
             |  +---------|           |Inform TU      |  labeled with
             |  |         | Completed |-------------->|  the event
             |  +-------->|           |               |  over the action
             |            +-----------+               |  to take
             |              ˆ   |                     |
             |              |   | Timer D fires       |
             +--------------+   | -                   |
                                |                     |
                                V                     |
                          +-----------+               |
                          |           |               |
                          | Terminated|<--------------+
                          |           |
                          +-----------+
 
                  Figure 5: INVITE client transaction
 
 
                                    |Request from TU
                                    |send request
                Timer E             V
                send request  +-----------+
                    +---------|           |-------------------+
                    |         |  Trying   |  Timer F          |
                    +-------->|           |  or Transport Err.|
                              +-----------+  inform TU        |
                 200-699         |  |                         |
                 resp. to TU     |  |1xx                      |
                 +---------------+  |resp. to TU              |
                 |                  |                         |
                 |   Timer E        V       Timer F           |
                 |   send req +-----------+ or Transport Err. |
                 |  +---------|           | inform TU         |
                 |  |         |Proceeding |------------------>|
                 |  +-------->|           |-----+             |
                 |            +-----------+     |1xx          |
                 |              |      ˆ        |resp to TU   |
                 | 200-699      |      +--------+             |
                 | resp. to TU  |                             |
                 |              |                             |
                 |              V                             |
                 |            +-----------+                   |
                 |            |           |                   |
                 |            | Completed |                   |
                 |            |           |                   |
                 |            +-----------+                   |
                 |              ˆ   |                         |
                 |              |   | Timer K                 |
                 +--------------+   | -                       |
                                    |                         |
                                    V                         |
              NOTE:           +-----------+                   |
                              |           |                   |
          transitions         | Terminated|<------------------+
          labeled with        |           |
          the event           +-----------+
          over the action
          to take
 
                  Figure 6: non-INVITE client transaction
 
 
 
 

バージョン:
JAIN-SIP-1.1 $Revision: 1.40 $ $Date: 2004/10/05 16:22:38 $
作成者:
Jeff Keyser, M. Ranganathan , Bug fixes by Emil Ivov. This code is in the public domain.
関連項目:
直列化された形式

入れ子のクラスの概要
 class SIPClientTransaction.TransactionTimer
           
 
フィールドの概要
 
クラス gov.nist.javax.sip.stack.SIPTransaction から継承されたフィールド
CALLING_STATE, COMPLETED_STATE, CONFIRMED_STATE, INITIAL_STATE, PROCEEDING_STATE, TERMINATED_STATE, TRYING_STATE
 
メソッドの概要
 void clearPending()
          Clear the mark that there is a pending event for this transaction.
 void clearState()
          This is called by the stack after a non-invite client transaction goes to completed state.
 javax.sip.message.Request createAck()
          Creates an ACK request for this transaction
 javax.sip.message.Request createCancel()
          Creates a new Cancel message from the Request associated with this client transaction.
 Via getOutgoingViaHeader()
          get the via header for an outgoing request.
 java.lang.String getProcessingInfo()
          Get auxiliary information that is generated while logging for the purpose of writing out the log file.
 MessageChannel getRequestChannel()
          Returns this transaction.
 java.lang.String getViaHost()
          Get the host of the recipient.
 int getViaPort()
          Get the port of the recipient.
 boolean hasPending()
          Return true if this has a pending request
 boolean isMessagePartOfTransaction(SIPMessage messageToTest)
          Deterines if the message is a part of this transaction.
 boolean isSecure()
          Return true if this is a secure channel.
 void processPending()
          Run any pending responses - gets called at the end of the event loop.
 void processResponse(SIPResponse transactionResponse, MessageChannel sourceChannel)
          Process a new response message through this transaction.
 void sendMessage(SIPMessage messageToSend)
          Send a request message through this transaction and onto the client.
 void sendRequest()
          Sends specified Requeston a unique client transaction identifier.
 void setResponseInterface(ServerResponseInterface newRespondTo)
          Sets the real ResponseInterface this transaction encapsulates.
 void setState(javax.sip.TransactionState newState)
          Sets a timeout after which the connection is closed (provided the server does not use the connection for outgoing requests in this time period) and calls the superclass to set state.
 
クラス gov.nist.javax.sip.stack.SIPTransaction から継承されたメソッド
ackSeen, addEventListener, close, doesCancelMatchTransaction, getApplicationData, getBranch, getBranchId, getCSeq, getDialog, getHost, getKey, getLastResponse, getMessageChannel, getMessageProcessor, getMethod, getOriginalRequest, getPeerAddress, getPeerPort, getPort, getRequest, getResponse, getRetransmitTimer, getSIPStack, getState, getTransactionId, getTransport, getViaHeader, hashCode, isByeTransaction, isCancelTransaction, isInviteTransaction, isMatch, isReliable, isTerminated, removeEventListener, setAckSeen, setApplicationData, setBranch, setDialog, setEventPending, setOriginalRequest, setRetransmitTimer
 
クラス gov.nist.javax.sip.stack.MessageChannel から継承されたメソッド
getHostPort, getKey, getKey, getPeerHostPort, getRawIpSourceAddress, getViaHostPort, logResponse, sendMessage
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.sip.Transaction から継承されたメソッド
getBranchId, getDialog, getRequest, getRetransmitTimer, getState, setRetransmitTimer
 
インタフェース gov.nist.javax.sip.stack.PendingRecord から継承されたメソッド
isTerminated
 

メソッドの詳細

setResponseInterface

public void setResponseInterface(ServerResponseInterface newRespondTo)
Sets the real ResponseInterface this transaction encapsulates.

パラメータ:
newRespondTo - ResponseInterface to send messages to.

getProcessingInfo

public java.lang.String getProcessingInfo()
インタフェース ServerResponseInterface の記述:
Get auxiliary information that is generated while logging for the purpose of writing out the log file.

定義:
インタフェース ServerResponseInterface 内の getProcessingInfo

getRequestChannel

public MessageChannel getRequestChannel()
Returns this transaction.


isMessagePartOfTransaction

public boolean isMessagePartOfTransaction(SIPMessage messageToTest)
Deterines if the message is a part of this transaction.

定義:
クラス SIPTransaction 内の isMessagePartOfTransaction
パラメータ:
messageToTest - Message to check if it is part of this transaction.
戻り値:
True if the message is part of this transaction, false if not.

sendMessage

public void sendMessage(SIPMessage messageToSend)
                 throws java.io.IOException
Send a request message through this transaction and onto the client.

オーバーライド:
クラス SIPTransaction 内の sendMessage
パラメータ:
messageToSend - Request to process and send.
例外:
java.io.IOException

processResponse

public void processResponse(SIPResponse transactionResponse,
                            MessageChannel sourceChannel)
Process a new response message through this transaction. If necessary, this message will also be passed onto the TU.

定義:
インタフェース ServerResponseInterface 内の processResponse
パラメータ:
transactionResponse - Response to process.
sourceChannel - Channel that received this message.

sendRequest

public void sendRequest()
                 throws javax.sip.SipException
Sends specified Requeston a unique client transaction identifier. This method implies that the application is functioning as either a User Agent Client or a Stateful proxy, hence the underlying SipProvider acts statefully.

JAIN SIP defines a retransmission utility specific to user agent behaviour and the default retransmission behaviour for each method.

When an application wishes to send a message, it creates a Request message passes that Request to this method, this method returns the cleintTransactionId generated by the SipProvider. The Request message gets sent via the ListeningPoint that this SipProvider is attached to.

定義:
インタフェース javax.sip.ClientTransaction 内の sendRequest
例外:
javax.sip.SipException - if implementation cannot send request for any reason

createCancel

public javax.sip.message.Request createCancel()
                                       throws javax.sip.SipException
Creates a new Cancel message from the Request associated with this client transaction. The CANCEL request, is used to cancel the previous request sent by this client transaction. Specifically, it asks the UAS to cease processing the request and to generate an error response to that request.

定義:
インタフェース javax.sip.ClientTransaction 内の createCancel
戻り値:
a cancel request generated from the original request.
例外:
javax.sip.SipException

createAck

public javax.sip.message.Request createAck()
                                    throws javax.sip.SipException
Creates an ACK request for this transaction

定義:
インタフェース javax.sip.ClientTransaction 内の createAck
戻り値:
an ack request generated from the original request.
例外:
javax.sip.SipException - if transaction is in the wrong state to be acked.

getViaPort

public int getViaPort()
Get the port of the recipient.

オーバーライド:
クラス SIPTransaction 内の getViaPort

getViaHost

public java.lang.String getViaHost()
Get the host of the recipient.

オーバーライド:
クラス SIPTransaction 内の getViaHost

getOutgoingViaHeader

public Via getOutgoingViaHeader()
get the via header for an outgoing request.


isSecure

public boolean isSecure()
クラス MessageChannel の記述:
Return true if this is a secure channel.

オーバーライド:
クラス SIPTransaction 内の isSecure

clearState

public void clearState()
This is called by the stack after a non-invite client transaction goes to completed state.


setState

public void setState(javax.sip.TransactionState newState)
Sets a timeout after which the connection is closed (provided the server does not use the connection for outgoing requests in this time period) and calls the superclass to set state.

オーバーライド:
クラス SIPTransaction 内の setState
パラメータ:
newState - New state of this transaction.

processPending

public void processPending()
Run any pending responses - gets called at the end of the event loop.

定義:
インタフェース PendingRecord 内の processPending
定義:
クラス SIPTransaction 内の processPending

hasPending

public boolean hasPending()
インタフェース PendingRecord の記述:
Return true if this has a pending request

定義:
インタフェース PendingRecord 内の hasPending

clearPending

public void clearPending()
クラス SIPTransaction の記述:
Clear the mark that there is a pending event for this transaction.

定義:
インタフェース PendingRecord 内の clearPending