Package org.jainslee.resources.sip
Interface SipMessage
-
- All Known Subinterfaces:
IncomingSipRequest
,IncomingSipResponse
,OutgoingSipRequest
,OutgoingSipResponse
,SipRequest
,SipResponse
,StatelessSipResponse
public interface SipMessage
-
-
Method Summary
-
-
-
Method Detail
-
getFrom
Address getFrom()
-
getTo
Address getTo()
-
getMethod
String getMethod()
-
getSequenceNumber
long getSequenceNumber()
-
getProtocol
String getProtocol()
-
getHeaders
ListIterator<String> getHeaders(String headerName)
-
removeHeader
void removeHeader(String headerName)
-
getAddressHeader
Address getAddressHeader(String headerName) throws SipParseException
- Throws:
SipParseException
-
getAddressHeaders
ListIterator<Address> getAddressHeaders(String headerName) throws SipParseException
- Throws:
SipParseException
-
getParameterableHeader
Parameterable getParameterableHeader(String headerName) throws SipParseException
- Throws:
SipParseException
-
getParameterableHeaders
ListIterator<Parameterable> getParameterableHeaders(String headerName) throws SipParseException
- Throws:
SipParseException
-
setParameterableHeader
void setParameterableHeader(String headerName, Parameterable header)
-
addParameterableHeader
void addParameterableHeader(String headerName, Parameterable header, boolean first)
-
getHeaderGeneric
Object getHeaderGeneric(String headerName)
Gets the first header value of the named header where we don't know its type in advance.- Parameters:
headerName
- the header name- Returns:
- an instance of the most specific type: either
Address
,Parameterable
orString
in that order. The RA will perform the conversion and the caller can check the return value's type using instanceof.
-
getHeadersGeneric
ListIterator<Object> getHeadersGeneric(String headerName)
-
getCallId
String getCallId()
-
getExpires
int getExpires()
-
setExpires
void setExpires(int i)
-
getCharacterEncoding
String getCharacterEncoding()
-
setCharacterEncoding
void setCharacterEncoding(String encoding) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
getContentLength
int getContentLength()
-
getContentType
String getContentType()
-
getRawContent
byte[] getRawContent() throws IOException
- Throws:
IOException
-
getContent
Object getContent() throws IOException, UnsupportedEncodingException
-
setContent
void setContent(Object content, String contentType) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
setContentType
void setContentType(String contentType)
-
getSession
SipSession getSession()
-
getSession
SipSession getSession(boolean create)
-
getAcceptLanguage
Locale getAcceptLanguage()
-
getAcceptLanguages
Iterator getAcceptLanguages()
-
setAcceptLanguage
void setAcceptLanguage(Locale locale)
-
addAcceptLanguage
void addAcceptLanguage(Locale locale)
-
setContentLanguage
void setContentLanguage(Locale locale)
-
getContentLanguage
Locale getContentLanguage()
-
isSecure
boolean isSecure()
-
isCommitted
boolean isCommitted()
-
getRemoteUser
String getRemoteUser()
-
isUserInRole
boolean isUserInRole(String role)
-
getUserPrincipal
Principal getUserPrincipal()
-
getLocalAddr
String getLocalAddr()
-
getLocalPort
int getLocalPort()
-
getRemoteAddr
String getRemoteAddr()
-
getRemotePort
int getRemotePort()
-
getTransport
String getTransport()
-
isExtensionSupported
boolean isExtensionSupported(String optionTag)
Convenience method to determine if this message contains a Supported header value with the given option tag. Examples of option tags are: "100rel", for RFC3262 reliable provisional responses support; and "timer", for RFC4028 session timer support.- Parameters:
optionTag
- the option tag denoting the extension- Returns:
- true if the message contains a Supported header value with the given option tag; otherwise false.
-
isExtensionRequired
boolean isExtensionRequired(String optionTag)
Convenience method to determine if this message contains a Require header value with the given option tag. Examples of option tags are: "100rel", for RFC3262 reliable provisional responses support; and "timer", for RFC4028 session timer support.- Parameters:
optionTag
- the option tag denoting the extension- Returns:
- true if the message contains a Require header value with the given option tag; otherwise false.
-
-