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

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

public class SIPServerTransaction
extends SIPTransaction
implements ServerRequestInterface, javax.sip.ServerTransaction, PendingRecord

Represents a server transaction. Implements the following state machines.

 
                                |INVITE
                                |pass INV to TU
             INVITE             V send 100 if TU won't in 200ms
             send response+-----------+
                 +--------|           |--------+101-199 from TU
                 |        | Proceeding|        |send response
                 +------->|           |<-------+
                          |           |          Transport Err.
                          |           |          Inform TU
                          |           |--------------->+
                          +-----------+                |
             300-699 from TU |     |2xx from TU        |
             send response   |     |send response      |
                             |     +------------------>+
                             |                         |
             INVITE          V          Timer G fires  |
             send response+-----------+ send response  |
                 +--------|           |--------+       |
                 |        | Completed |        |       |
                 +------->|           |<-------+       |
                          +-----------+                |
                             |     |                   |
                         ACK |     |                   |
                         -   |     +------------------>+
                             |        Timer H fires    |
                             V        or Transport Err.|
                          +-----------+  Inform TU     |
                          |           |                |
                          | Confirmed |                |
                          |           |                |
                          +-----------+                |
                                |                      |
                                |Timer I fires         |
                                |-                     |
                                |                      |
                                V                      |
                          +-----------+                |
                          |           |                |
                          | Terminated|<---------------+
                          |           |
                          +-----------+
 
               Figure 7: INVITE server transaction
 
 
                Request received
                                   |pass to TU
 
                                   V
                             +-----------+
                             |           |
                             | Trying    |-------------+
                             |           |             |
                             +-----------+             |200-699 from TU
                                   |                   |send response
                                   |1xx from TU        |
                                   |send response      |
                                   |                   |
                Request            V      1xx from TU  |
                send response+-----------+send response|
                    +--------|           |--------+    |
                    |        | Proceeding|        |    |
                    +------->|           |<-------+    |
             +<--------------|           |             |
             |Trnsprt Err    +-----------+             |
             |Inform TU            |                   |
             |                     |                   |
             |                     |200-699 from TU    |
             |                     |send response      |
             |  Request            V                   |
             |  send response+-----------+             |
             |      +--------|           |             |
             |      |        | Completed |<------------+
             |      +------->|           |
             +<--------------|           |
             |Trnsprt Err    +-----------+
             |Inform TU            |
             |                     |Timer J fires
             |                     |-
             |                     |
             |                     V
             |               +-----------+
             |               |           |
             +-------------->| Terminated|
                             |           |
                             +-----------+
 
 
 
 

バージョン:
JAIN-SIP-1.1 $Revision: 1.48 $ $Date: 2004/10/06 18:56:07 $
作成者:
Jeff Keyser, M. Ranganathan , Bug fixes by Emil Ivov, Antonis Karydas., Performance enhancements contributed by Thomas Froment and Pierre De Rop. This code is in the public domain.
関連項目:
直列化された形式

フィールドの概要
 
クラス 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.
 boolean equals(java.lang.Object other)
           
 SIPResponse getLastResponse()
          Get the last response.
 java.lang.String getProcessingInfo()
          Get processing information.
 MessageChannel getResponseChannel()
          Returns this transaction.
 javax.sip.TransactionState getState()
          Return the current transaction state according to the RFC 3261 transaction state machine.
 java.lang.String getViaHost()
          Get the host to assign for an outgoing Request via header.
 int getViaPort()
          Get the port to assign for the via header of an outgoing message.
 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 isTransactionMapped()
          Return true if the transaction is known to stack.
 boolean passToListener()
          This is a hack to force the listener to process the transaction.
 void processPending()
          Run any pending responses - gets called at the end of the event loop.
 void processRequest(SIPRequest transactionRequest, MessageChannel sourceChannel)
          Process a new request message through this transaction.
 void sendMessage(SIPMessage messageToSend)
          Send a response message through this transactionand onto the client.
 void sendResponse(javax.sip.message.Response response)
          Sends specified Response message to a Request which is identified by the specified server transaction identifier.
 void setOriginalRequest(SIPRequest originalRequest)
          Set the original request.
 void setRequestInterface(ServerRequestInterface newRequestOf)
          Sets the real RequestInterface 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, getMessageChannel, getMessageProcessor, getMethod, getOriginalRequest, getPeerAddress, getPeerPort, getPort, getRequest, getResponse, getRetransmitTimer, getSIPStack, getTransactionId, getTransport, getViaHeader, hashCode, isByeTransaction, isCancelTransaction, isInviteTransaction, isMatch, isReliable, isSecure, isTerminated, removeEventListener, setAckSeen, setApplicationData, setBranch, setDialog, setEventPending, setRetransmitTimer
 
クラス gov.nist.javax.sip.stack.MessageChannel から継承されたメソッド
getHostPort, getKey, getKey, getPeerHostPort, getRawIpSourceAddress, getViaHostPort, logResponse, sendMessage
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, toString, wait, wait, wait
 
インタフェース javax.sip.Transaction から継承されたメソッド
getBranchId, getDialog, getRequest, getRetransmitTimer, setRetransmitTimer
 
インタフェース gov.nist.javax.sip.stack.PendingRecord から継承されたメソッド
isTerminated
 

メソッドの詳細

setRequestInterface

public void setRequestInterface(ServerRequestInterface newRequestOf)
Sets the real RequestInterface this transaction encapsulates.

パラメータ:
newRequestOf - RequestInterface to send messages to.

getProcessingInfo

public java.lang.String getProcessingInfo()
インタフェース ServerRequestInterface の記述:
Get processing information. The stack queries processing information to add to the message log. by calling this interface. Return null if no processing information of interes thas been generated.

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

getResponseChannel

public MessageChannel getResponseChannel()
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.

isTransactionMapped

public boolean isTransactionMapped()
Return true if the transaction is known to stack.


processRequest

public void processRequest(SIPRequest transactionRequest,
                           MessageChannel sourceChannel)
Process a new request message through this transaction. If necessary, this message will also be passed onto the TU.

定義:
インタフェース ServerRequestInterface 内の processRequest
パラメータ:
transactionRequest - Request to process.
sourceChannel - Channel that received this message.

sendMessage

public void sendMessage(SIPMessage messageToSend)
                 throws java.io.IOException
Send a response message through this transactionand onto the client. The response drives the state machine.

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

getViaHost

public java.lang.String getViaHost()
クラス SIPTransaction の記述:
Get the host to assign for an outgoing Request via header.

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

getViaPort

public int getViaPort()
クラス SIPTransaction の記述:
Get the port to assign for the via header of an outgoing message.

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

getLastResponse

public SIPResponse getLastResponse()
Get the last response.

オーバーライド:
クラス SIPTransaction 内の getLastResponse
戻り値:
the last response received (for client transactions) or sent (for server transactions).

setOriginalRequest

public void setOriginalRequest(SIPRequest originalRequest)
Set the original request.

オーバーライド:
クラス SIPTransaction 内の setOriginalRequest
パラメータ:
originalRequest - Request being handled.

sendResponse

public void sendResponse(javax.sip.message.Response response)
                  throws javax.sip.SipException
Sends specified Response message to a Request which is identified by the specified server transaction identifier. The semantics for various application behaviour on sending Responses to Requests is outlined at SipListener.processRequest(RequestEvent).

Note that when a UAS core sends a 2xx response to an INVITE, the server transaction is destroyed, by the underlying JAIN SIP implementation. This means that when the ACK sent by the corresponding UAC arrives at the UAS, there will be no matching server transaction for the ACK, and based on this rule, the ACK is passed to the UAS application core, where it is processed. This ensures that the three way handsake of an INVITE that is managed by the UAS application and not JAIN SIP.

定義:
インタフェース javax.sip.ServerTransaction 内の sendResponse
パラメータ:
response - - the Response to send to the Request
例外:
javax.sip.SipException - if implementation cannot send response for any other reason
関連項目:
Response

getState

public javax.sip.TransactionState getState()
Return the current transaction state according to the RFC 3261 transaction state machine. Invite transactions do not have a trying state. We just use this as a pseudo state for processing requests.

定義:
インタフェース javax.sip.Transaction 内の getState
オーバーライド:
クラス SIPTransaction 内の getState
戻り値:
the state of the transaction.

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.

passToListener

public boolean passToListener()
This is a hack to force the listener to process the transaction. This hack is necessary to get around a potential race condition when the dialog creating request arrives (see check in EventScanner).


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

equals

public boolean equals(java.lang.Object other)
オーバーライド:
クラス java.lang.Object 内の equals