NIST SIP Parser and Stack (v1.2) API

gov.nist.javax.sip.stack
Class SIPServerTransaction

java.lang.Object
  |
  +--gov.nist.javax.sip.stack.MessageChannel
        |
        +--gov.nist.javax.sip.stack.SIPTransaction
              |
              +--gov.nist.javax.sip.stack.SIPServerTransaction
All Implemented Interfaces:
ServerTransaction, SIPServerRequestInterface, Transaction

public class SIPServerTransaction
extends SIPTransaction
implements SIPServerRequestInterface, ServerTransaction

Represents a server transaction.

Author:
Jeff Keyser
M. Ranganathan

Field Summary
 
Fields inherited from class gov.nist.javax.sip.stack.SIPTransaction
CALLING_STATE, COMPLETED_STATE, CONFIRMED_STATE, INITIAL_STATE, PROCEEDING_STATE, TERMINATED_STATE, TRYING_STATE
 
Method Summary
 gov.nist.javax.sip.message.SIPResponse getLastResponse()
          Get the last response.
 String getProcessingInfo()
          Get processing information.
 MessageChannel getResponseChannel()
          Returns this transaction.
 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 isMessagePartOfTransaction(gov.nist.javax.sip.message.SIPMessage messageToTest)
          Deterines if the message is a part of this transaction.
 void processRequest(gov.nist.javax.sip.message.SIPRequest transactionRequest, MessageChannel sourceChannel)
          Process a new request message through this transaction.
 void sendMessage(gov.nist.javax.sip.message.SIPMessage messageToSend)
          Send a response message through this transactionand onto the client.
 void setOriginalRequest(gov.nist.javax.sip.message.SIPRequest originalRequest)
          Set the original request.
 void setRequestInterface(SIPServerRequestInterface newRequestOf)
          Sets the real RequestInterface this transaction encapsulates.
 
Methods inherited from class gov.nist.javax.sip.stack.SIPTransaction
addEventListener, close, doesCancelMatchTransaction, getBranch, getBranchId, getDialog, getHost, getKey, getMessageChannel, getOriginalRequest, getPeerAddress, getPeerName, getPeerPort, getPort, getRequest, getResponse, getRetransmitTimer, getSIPStack, getState, getTransactionId, getTransport, getUser, getViaHeader, getWrapper, handleException, isReliable, isSecure, removeEventListener, setBranch, setDialog, setRetransmitTimer, setState, setWrapper
 
Methods inherited from class gov.nist.javax.sip.stack.MessageChannel
getHostPort, getKey, getMessageProcessor, getPeerHostPort, getRawIpSourceAddress, getViaHostPort, logResponse, sendMessage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.sip.Transaction
getBranchId, getDialog, getRequest, getRetransmitTimer, getState, setRetransmitTimer
 

Method Detail

setRequestInterface

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

Parameters:
newRequestOf - RequestInterface to send messages to.

getProcessingInfo

public String getProcessingInfo()
Description copied from interface: SIPServerRequestInterface
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.

Specified by:
getProcessingInfo in interface SIPServerRequestInterface

getResponseChannel

public MessageChannel getResponseChannel()
Returns this transaction.

Specified by:
getResponseChannel in interface SIPServerRequestInterface

isMessagePartOfTransaction

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

Specified by:
isMessagePartOfTransaction in class SIPTransaction
Parameters:
messageToTest - Message to check if it is part of this transaction.
Returns:
True if the message is part of this transaction, false if not.

processRequest

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

Specified by:
processRequest in interface SIPServerRequestInterface
Parameters:
transactionRequest - Request to process.
sourceChannel - Channel that received this message.
Throws:
SIPServerException - Exception that gets thrown by this processor when an exception is encountered in the message processing.

sendMessage

public void sendMessage(gov.nist.javax.sip.message.SIPMessage messageToSend)
                 throws IOException
Send a response message through this transactionand onto the client.

Specified by:
sendMessage in class SIPTransaction
Parameters:
messageToSend - Response to process and send.
IOException

getViaHost

public String getViaHost()
Description copied from class: SIPTransaction
Get the host to assign for an outgoing Request via header.

Overrides:
getViaHost in class SIPTransaction

getViaPort

public int getViaPort()
Description copied from class: SIPTransaction
Get the port to assign for the via header of an outgoing message.

Overrides:
getViaPort in class SIPTransaction

getLastResponse

public gov.nist.javax.sip.message.SIPResponse getLastResponse()
Get the last response.

Overrides:
getLastResponse in class SIPTransaction

setOriginalRequest

public void setOriginalRequest(gov.nist.javax.sip.message.SIPRequest originalRequest)
Set the original request.

Overrides:
setOriginalRequest in class SIPTransaction
Parameters:
originalRequest - Request being handled.

NIST SIP Parser and Stack (v1.2) API

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Get the latest distribution.
Submit a bug report or feature request.