jain.protocol.ip.sip.message
Class AckMessage

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--jain.protocol.ip.sip.message.Message
              |
              +--jain.protocol.ip.sip.message.RequestMessage
                    |
                    +--jain.protocol.ip.sip.message.AckMessage

public final class AckMessage
extends RequestMessage

This class represents an ACK request message. An AckMessage confirms that the client has received a final ResponseMessage to an InviteMessage. (AckMessage is used only with InviteMessages.) Success ResponseMessages are acknowledged by client user agents, all other final ResponseMessages by the first proxy or client user agent to receive the ResponseMessage. The ViaHeader is always initialized to the host that originates the AckMessage, i.e., the client user agent after a Success ResponseMessage or the first proxy to receive a non-Success final ResponseMessage. The AckMessage is forwarded as the corresponding InviteMessaget, based on its Request-URI.

The AckMessage may contain a message body with the final session description to be used by the callee. If the AckMessage body is empty, the callee uses the session description in the InviteMessage.

A proxy server receiving an AckMessage after having sent a Redirection, Client-Error, Server-Error, or Clobal-Failure ResponseMessage must make a determination about whether the AckMessage is for it, or for some user agent or proxy server further downstream. This determination is made by examining the tag of the ToHeader. If the tag of the AckMessage ToHeader matches the tag in the To ToHeader of the ResponseMessage, and the FromHeader, CSeqHeader and CallIdHeaders in the ResponseMessage match those in the AckMessage, the AckMessage is meant for the proxy server. Otherwise, the AckMessage should be proxied downstream as any other RequestMessage.

It is possible for a user agent client or proxy server to receive multiple Redirection, Client-Error, Server-Error, and Clobal-Failure ResponseMessages to a RequestMessage along a single branch. This can happen under various error conditions, typically when a forking proxy transitions from stateful to stateless before receiving all ResponseMessages. The various ResponseMessages will all be identical, except for the tag in the ToHeader, which is different for each one. It can therefore be used as a means to disambiguate them.

AckMessages must be supported by SIP proxy, redirect and user agent servers as well as clients.

Version:
0.6
See Also:
RequestMessage, ResponseMessage, InviteMessage, ToHeader, FromHeader, CallIdHeader, CSeqHeader, Serialized Form

Field Summary
static java.lang.String method
          AckMessage's method
 
Constructor Summary
AckMessage(java.lang.Object source, ResponseMessage response)
          Constructor of AckMessage without body based on received ResponseMessage
AckMessage(java.lang.Object source, ResponseMessage response, java.lang.Object body, ContentTypeHeader contentTypeHeader)
          Constructor of AckMessage with body based on received ResponseMessage
AckMessage(java.lang.Object source, URI requestURI, CallIdHeader callIdHeader, CSeqHeader cSeqHeader, FromHeader fromHeader, ToHeader toHeader, ViaHeader[] viaHeaders)
          Constructor of AckMessage without body
AckMessage(java.lang.Object source, URI requestURI, CallIdHeader callIdHeader, CSeqHeader cSeqHeader, FromHeader fromHeader, ToHeader toHeader, ViaHeader[] viaHeaders, java.lang.Object body, ContentTypeHeader contentTypeHeader)
          Constructor of AckMessage with body
 
Methods inherited from class jain.protocol.ip.sip.message.RequestMessage
addViaHeader, getAuthorizationHeader, getHideHeader, getMaxForwardsHeader, getMethod, getProxyAuthorizationHeader, getProxyRequireHeaders, getRequestURI, getRequireHeaders, getResponseKeyHeader, getRouteHeaders, getStartLine, hasAuthorizationHeader, hasHideHeader, hasMaxForwardsHeader, hasProxyAuthorizationHeader, hasProxyRequireHeaders, hasRequireHeaders, hasResponseKeyHeader, hasRouteHeaders, removeAuthorizationHeader, removeHideHeader, removeMaxForwardsHeader, removeProxyAuthorizationHeader, removeProxyRequireHeaders, removeRequireHeaders, removeResponseKeyHeader, removeRouteHeaders, setAuthorizationHeader, setHideHeader, setMaxForwardsHeader, setProxyAuthorizationHeader, setProxyRequireHeaders, setRequestURI, setRequireHeaders, setResponseKeyHeader, setRouteHeaders
 
Methods inherited from class jain.protocol.ip.sip.message.Message
addHeader, addHeaders, clone, equals, getAcceptEncodingHeaders, getAcceptHeaders, getAcceptLanguageHeaders, getAllHeaders, getBody, getCallIdHeader, getContactHeaders, getContentEncodingHeaders, getContentLengthHeader, getContentTypeHeader, getCSeqHeader, getDateHeader, getEncryptionHeader, getExpiresHeader, getFromHeader, getHeader, getHeaders, getOrganizationHeader, getRecordRouteHeaders, getRetryAfterHeader, getTimestampHeader, getToHeader, getUserAgentHeaders, getVersionMajor, getVersionMinor, getViaHeaders, hasAcceptEncodingHeaders, hasAcceptHeaders, hasAcceptLanguageHeaders, hasBody, hasContactHeaders, hasContentEncodingHeaders, hasContentLengthHeader, hasContentTypeHeader, hasDateHeader, hasEncryptionHeader, hasExpiresHeader, hasHeaders, hasOrganizationHeader, hasRecordRouteHeaders, hasRetryAfterHeader, hasTimestampHeader, hasUserAgentHeaders, isRequest, removeAcceptEncodingHeaders, removeAcceptHeaders, removeAcceptLanguageHeaders, removeBody, removeContactHeaders, removeContentEncodingHeaders, removeContentLengthHeader, removeDateHeader, removeEncryptionHeader, removeExpiresHeader, removeHeader, removeHeaders, removeOrganizationHeader, removeRecordRouteHeaders, removeRetryAfterHeader, removeTimestampHeader, removeUserAgentHeaders, setAcceptEncodingHeaders, setAcceptHeaders, setAcceptLanguageHeaders, setBody, setCallIdHeader, setContactHeaders, setContentEncodingHeaders, setContentLengthHeader, setContentTypeHeader, setCSeqHeader, setDateHeader, setEncryptionHeader, setExpiresHeader, setFromHeader, setHeader, setHeaders, setOrganizationHeader, setRecordRouteHeaders, setRetryAfterHeader, setTimestampHeader, setToHeader, setUserAgentHeaders, setVersion, setViaHeaders, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

method

public static final java.lang.String method
AckMessage's method
Constructor Detail

AckMessage

public AckMessage(java.lang.Object source,
                  ResponseMessage response)
           throws java.lang.IllegalArgumentException,
                  HeaderNotSetException
Constructor of AckMessage without body based on received ResponseMessage
Parameters:
source - source of the InviteMessage
response - received ResponseMessage
Throws:
java.lang.IllegalArgumentException - if response is null, or does not correspond to an InviteMessage
java.lang.IllegalArgumentException - if any mandatory Headers in response are missing

AckMessage

public AckMessage(java.lang.Object source,
                  ResponseMessage response,
                  java.lang.Object body,
                  ContentTypeHeader contentTypeHeader)
           throws java.lang.IllegalArgumentException,
                  HeaderNotSetException
Constructor of AckMessage with body based on received ResponseMessage
Parameters:
source - source of the InviteMessage
response - received ResponseMessage
body - body
contentTypeHeader - ContentTypeHeader
Throws:
java.lang.IllegalArgumentException - if response is null, or does not correspond to an InviteMessage, or if body is empty, or if contentTypeHeader is null
java.lang.IllegalArgumentException - if any mandatory Headers in response are missing

AckMessage

public AckMessage(java.lang.Object source,
                  URI requestURI,
                  CallIdHeader callIdHeader,
                  CSeqHeader cSeqHeader,
                  FromHeader fromHeader,
                  ToHeader toHeader,
                  ViaHeader[] viaHeaders)
           throws java.lang.IllegalArgumentException
Constructor of AckMessage without body
Parameters:
source - source of the InviteMessage
requestURI - Request URI
callIdHeader - CallIdHeader
cSeqHeader - CSeqHeader
fromHeader - FromHeader
toHeader - ToHeader
viaHeaders - ViaHeaders
Throws:
java.lang.IllegalArgumentException - if any arguments are invalid

AckMessage

public AckMessage(java.lang.Object source,
                  URI requestURI,
                  CallIdHeader callIdHeader,
                  CSeqHeader cSeqHeader,
                  FromHeader fromHeader,
                  ToHeader toHeader,
                  ViaHeader[] viaHeaders,
                  java.lang.Object body,
                  ContentTypeHeader contentTypeHeader)
           throws java.lang.IllegalArgumentException
Constructor of AckMessage with body
Parameters:
source - source of the InviteMessage
requestURI - Request URI
callIdHeader - CallIdHeader
cSeqHeader - CSeqHeader
fromHeader - FromHeader
toHeader - ToHeader
viaHeaders - ViaHeaders
body - body
contentTypeHeader - ContentTypeHeader
Throws:
java.lang.IllegalArgumentException - if any arguments are invalid


If you have any comments or queries, please mail them to JAIN-SIP-interest@sun.com


Copyright - 2000 Sun Microsystems