public abstract class SipServletMessageImpl extends Object implements MobicentsSipServletMessage, Externalizable
SipServletMessage.HeaderForm| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
attributes |
protected String |
currentApplicationName |
protected javax.sip.Dialog |
dialog |
protected SipServletMessage.HeaderForm |
headerForm |
protected boolean |
isMessageSent |
protected javax.sip.message.Message |
message |
protected String |
method |
static String |
REL100_OPTION_TAG |
protected MobicentsSipSessionKey |
sessionKey |
protected SipFactoryImpl |
sipFactoryImpl |
protected MobicentsSipSession |
sipSession |
protected TransactionApplicationData |
transactionApplicationData |
protected String |
transport |
protected SipPrincipal |
userPrincipal |
| Modifier | Constructor and Description |
|---|---|
|
SipServletMessageImpl() |
protected |
SipServletMessageImpl(javax.sip.message.Message message,
SipFactoryImpl sipFactoryImpl,
javax.sip.Transaction transaction,
MobicentsSipSession sipSession,
javax.sip.Dialog dialog) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitisCommittedpublic static final String REL100_OPTION_TAG
protected javax.sip.message.Message message
protected SipFactoryImpl sipFactoryImpl
protected MobicentsSipSessionKey sessionKey
protected transient MobicentsSipSession sipSession
protected TransactionApplicationData transactionApplicationData
protected SipServletMessage.HeaderForm headerForm
protected transient String transport
protected String currentApplicationName
protected transient SipPrincipal userPrincipal
protected boolean isMessageSent
protected transient javax.sip.Dialog dialog
protected transient String method
public SipServletMessageImpl()
protected SipServletMessageImpl(javax.sip.message.Message message,
SipFactoryImpl sipFactoryImpl,
javax.sip.Transaction transaction,
MobicentsSipSession sipSession,
javax.sip.Dialog dialog)
public void addAcceptLanguage(Locale locale)
addAcceptLanguage in interface SipServletMessagepublic void addAddressHeader(String name, Address addr, boolean first) throws IllegalArgumentException
addAddressHeader in interface SipServletMessageIllegalArgumentExceptionpublic void addHeaderInternal(String name, String value, boolean bypassSystemHeaderCheck)
public void setHeaderInternal(String name, String value, boolean bypassSystemHeaderCheck)
public void addHeader(String name, String value)
addHeader in interface SipServletMessagepublic void addParameterableHeader(String name, Parameterable param, boolean first)
addParameterableHeader in interface SipServletMessagepublic Locale getAcceptLanguage()
getAcceptLanguage in interface SipServletMessagepublic Iterator<Locale> getAcceptLanguages()
getAcceptLanguages in interface SipServletMessagepublic Address getAddressHeader(String name) throws ServletParseException
getAddressHeader in interface SipServletMessageServletParseExceptionpublic ListIterator<Address> getAddressHeaders(String name) throws ServletParseException
getAddressHeaders in interface SipServletMessageServletParseExceptionpublic SipApplicationSession getApplicationSession()
getApplicationSession in interface SipServletMessagepublic SipApplicationSession getApplicationSession(boolean create)
getApplicationSession in interface SipServletMessagepublic MobicentsSipApplicationSession getSipApplicationSession(boolean create)
getSipApplicationSession in interface MobicentsSipServletMessagepublic Object getAttribute(String name)
getAttribute in interface SipServletMessagepublic Enumeration<String> getAttributeNames()
getAttributeNames in interface SipServletMessagepublic String getCallId()
getCallId in interface SipServletMessagepublic String getCharacterEncoding()
getCharacterEncoding in interface SipServletMessagepublic Object getContent() throws IOException, UnsupportedEncodingException
getContent in interface SipServletMessageIOExceptionUnsupportedEncodingExceptionpublic Locale getContentLanguage()
getContentLanguage in interface SipServletMessagepublic int getContentLength()
getContentLength in interface SipServletMessagepublic String getContentType()
getContentType in interface SipServletMessagepublic int getExpires()
getExpires in interface SipServletMessagepublic Address getFrom()
getFrom in interface SipServletMessagepublic String getHeader(String name)
getHeader in interface SipServletMessagepublic SipServletMessage.HeaderForm getHeaderForm()
getHeaderForm in interface SipServletMessagepublic Iterator<String> getHeaderNames()
getHeaderNames in interface SipServletMessagepublic ListIterator<String> getHeaders(String name)
getHeaders in interface SipServletMessagepublic final String getMethod()
getMethod in interface SipServletMessagepublic Parameterable getParameterableHeader(String name) throws ServletParseException
getParameterableHeader in interface SipServletMessageServletParseExceptionpublic ListIterator<Parameterable> getParameterableHeaders(String name) throws ServletParseException
getParameterableHeaders in interface SipServletMessageServletParseExceptionpublic String getProtocol()
getProtocol in interface SipServletMessagepublic byte[] getRawContent()
throws IOException
getRawContent in interface SipServletMessageIOExceptionpublic String getInitialRemoteAddr()
getInitialRemoteAddr in interface SipServletMessagepublic int getInitialRemotePort()
getInitialRemotePort in interface SipServletMessagepublic String getInitialTransport()
getInitialTransport in interface SipServletMessagepublic String getRemoteAddr()
getRemoteAddr in interface SipServletMessagepublic int getRemotePort()
getRemotePort in interface SipServletMessagepublic String getTransport()
getTransport in interface SipServletMessagepublic String getRemoteUser()
getRemoteUser in interface SipServletMessagepublic SipSession getSession()
getSession in interface SipServletMessagepublic SipSession getSession(boolean create)
getSession in interface SipServletMessagepublic final MobicentsSipSession getSipSession()
getSipSession in interface MobicentsSipServletMessagepublic void setSipSession(MobicentsSipSession session)
setSipSession in interface MobicentsSipServletMessagesession - the session to setpublic MobicentsSipSessionKey getSipSessionKey()
session - the session to setpublic void setSipSessionKey(MobicentsSipSessionKey sessionKey)
public Address getTo()
getTo in interface SipServletMessagepublic SipPrincipal getUserPrincipal()
getUserPrincipal in interface SipServletMessagepublic void setUserPrincipal(SipPrincipal principal)
public boolean isSecure()
isSecure in interface SipServletMessagepublic boolean isUserInRole(String role)
isUserInRole in interface SipServletMessagepublic void removeAttribute(String name)
removeAttribute in interface SipServletMessagepublic void removeHeader(String name)
removeHeader in interface SipServletMessagepublic void removeHeaderInternal(String name, boolean bypassSystemHeaderCheck)
public abstract void send()
throws IOException
send in interface SipServletMessageIOExceptionpublic void setAcceptLanguage(Locale locale)
setAcceptLanguage in interface SipServletMessagepublic void setAddressHeader(String name, Address addr)
setAddressHeader in interface SipServletMessagepublic void setAttribute(String name, Object o)
setAttribute in interface SipServletMessagepublic void setCharacterEncoding(String enc) throws UnsupportedEncodingException
setCharacterEncoding in interface SipServletMessageUnsupportedEncodingExceptionpublic void setContent(Object content, String contentType) throws UnsupportedEncodingException
setContent in interface SipServletMessageUnsupportedEncodingExceptionprotected abstract void checkMessageState()
public void setContentLanguage(Locale locale)
setContentLanguage in interface SipServletMessagepublic void setContentLength(int len)
setContentLength in interface SipServletMessagepublic void setContentType(String type)
setContentType in interface SipServletMessagepublic void setExpires(int seconds)
setExpires in interface SipServletMessagepublic void setHeader(String name, String value)
setHeader in interface SipServletMessagepublic void setHeaderForm(SipServletMessage.HeaderForm form)
setHeaderForm in interface SipServletMessagepublic void setParameterableHeader(String name, Parameterable param)
setParameterableHeader in interface SipServletMessagepublic abstract AddressImpl.ModifiableRule getModifiableRule(String headerName)
headerName - -
either long or compact header namepublic static boolean isSystemHeader(AddressImpl.ModifiableRule modifiableRule)
headerName - -
either long or compact header namepublic static boolean isSystemHeaderAndNotGruu(AddressImpl.ModifiableRule modifiableRule, Parameterable parameterable)
public static boolean isSystemHeaderAndNotGruu(AddressImpl.ModifiableRule modifiableRule, String value)
public static boolean isAddressTypeHeader(String headerName)
headerName - -
name of header - either full or compactprotected static String getFullHeaderName(String headerName)
headerName - public static String getCompactName(String headerName)
headerName - protected static String getCorrectHeaderName(String name, SipServletMessage.HeaderForm form)
public javax.sip.Transaction getTransaction()
getTransaction in interface MobicentsSipServletMessagepublic TransactionApplicationData getTransactionApplicationData()
getTransactionApplicationData in interface MobicentsSipServletMessagepublic javax.sip.message.Message getMessage()
getMessage in interface MobicentsSipServletMessagepublic javax.sip.Dialog getDialog()
public void setTransaction(javax.sip.Transaction transaction)
setTransaction in interface MobicentsSipServletMessagetransaction - the transaction to setpublic void setTransport(String transport)
protected static int countChars(String string, char c)
protected static Parameterable createParameterable(javax.sip.header.Header header, String hName, boolean isRequest) throws ServletParseException
ServletParseExceptionpublic static boolean isParameterable(String header)
public String getCurrentApplicationName()
public void setCurrentApplicationName(String currentApplicationName)
currentApplicationName - the currentApplicationName to setpublic String getLocalAddr()
getLocalAddr in interface SipServletMessagepublic int getLocalPort()
getLocalPort in interface SipServletMessageprotected boolean containsRel100(javax.sip.message.Message message)
public abstract void cleanUp()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void setOrphan(boolean orphan)
public boolean isOrphan()
public String getAppSessionId()
public void setAppSessionId(String appSessionId)
public boolean isMessageSent()
isMessageSent in interface MobicentsSipServletMessageCopyright © 2015. All Rights Reserved.