|
Oracle Communications Service Broker SAL API Reference Reference Release 6.0 E26227-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SalMessage
Defines common aspects of SIP requests and responses.
The SalMessage interface defines a number of methods which are common to SalRequest and SalResponse, for example setters and getters for message headers and content.
| Method Summary | |
|---|---|
void |
addAddressHeader(java.lang.String name, Address value, boolean first)Adds the specified Address as a new value of the named header field. |
void |
addHeader(java.lang.String name, java.lang.String value)Adds a header with the given name and value. |
Address |
getAddressHeader(java.lang.String name)Returns the value of the specified header as a Address object. |
java.util.ListIterator<Address> |
getAddressHeaders(java.lang.String name)Returns a ListIterator over all Address header field values for the specified header. |
SalApplicationSession |
getApplicationSession()Returns the application session to which this message belongs. |
SalApplicationSession |
getApplicationSession(boolean create)Returns the application session to which this message belongs. |
java.lang.Object |
getContent()Returns the content as a Java object. |
java.lang.String |
getContentType()Returns the value of the Content-Type header field. |
Address |
getFrom()Returns the value of the From header. |
java.lang.String |
getHeader(java.lang.String name)Returns the value of the specified header as a String. |
java.util.Iterator<java.lang.String> |
getHeaderNames()Returns an Iterator over all the header names this message contains. |
java.util.ListIterator<java.lang.String> |
getHeaders(java.lang.String name)Returns all the values of the specified header as a ListIterator over a number of String objects. |
java.lang.String |
getMethod()Returns the SAL method of this message. |
SalSession |
getSession()Returns the SalSession to which this message belongs. |
SalSession |
getSession(boolean create)Returns the SalSession to which this message belongs. |
Address |
getTo()Returns the value of the To header. |
void |
removeHeader(java.lang.String name)Removes the specified header. |
void |
setAddressHeader(java.lang.String name, Address value)Sets the header with the specified name to have the value specified by the address argument. |
void |
setContent(java.lang.Object content, java.lang.String contentType)Sets the content of this message to the specified Object. |
void |
setContentType(java.lang.String _type)Sets the content type of the message |
void |
setHeader(java.lang.String name, java.lang.String value)Sets a header with the given name and value. |
| Method Detail |
|---|
Address getFrom()
Address getTo()
java.lang.String getMethod()
java.lang.String getHeader(java.lang.String name)
name - a String specifying the header name, either the long or compact formjava.util.ListIterator<java.lang.String> getHeaders(java.lang.String name)
name - a String specifying the header name, either the long or compact formjava.util.Iterator<java.lang.String> getHeaderNames()
void setHeader(java.lang.String name,
java.lang.String value)
name - a String specifying the header name, either the long or compact formvalue - the header value
void addHeader(java.lang.String name,
java.lang.String value)
name - a String specifying the header name, either the long or compact formvalue - the additional header valuevoid removeHeader(java.lang.String name)
name - a String specifying the header name, either the long or compact form
Address getAddressHeader(java.lang.String name)
throws SalApplicationParseException
name - a case insensitive String specifying the name of the header, either the long or compact formSalApplicationParseException
java.util.ListIterator<Address> getAddressHeaders(java.lang.String name)
throws SalApplicationParseException
name - a case insensitive String specifying the name of the header field, either the long or compact formSalApplicationParseException
void setAddressHeader(java.lang.String name,
Address value)
name - the long or compact name of the header to setvalue - the assigned address value
void addAddressHeader(java.lang.String name,
Address value,
boolean first)
name - the long or compact name of the header to setvalue - the additional address valuefirst - if true, the address is added as the first value of the specified header field, otherwise it will be the lastjava.lang.String getContentType()
void setContentType(java.lang.String _type)
_type - the content type of the message
java.lang.Object getContent()
throws java.io.IOException,
java.io.UnsupportedEncodingException
The object returned for "multipart" MIME content is a MessageContent.
For other objects, they are returned as they were set.
java.io.IOExceptionjava.io.UnsupportedEncodingException
void setContent(java.lang.Object content,
java.lang.String contentType)
throws java.io.UnsupportedEncodingException
content - an object representing the message contentcontentType - MIME type of the objectjava.io.UnsupportedEncodingExceptionSalSession getSession()
SalSession getSession(boolean create)
create - indicates whether the session is created if it doesn't already existSalApplicationSession getApplicationSession()
SalApplicationSession getApplicationSession(boolean create)
|
Oracle Communications Service Broker SAL API Reference Reference Release 6.0 E26227-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||