org.cipango.diameter.api
Interface DiameterServletMessage

All Known Subinterfaces:
DiameterServletAnswer, DiameterServletRequest

public interface DiameterServletMessage

Base class for diameter requests and answers.


Method Summary
<T> void
add(Type<T> type, T value)
           
<T> T
get(Type<T> type)
           
 int getApplicationId()
           
 javax.servlet.sip.SipApplicationSession getApplicationSession()
           
 java.lang.Object getAttribute(java.lang.String name)
          Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
 java.util.Enumeration<java.lang.String> getAttributeNames()
          Returns an Enumeration containing the names of the attributes available to this message object.
 AVPList getAVPs()
          Returns a list with all messages AVPs.
 DiameterCommand getCommand()
           
 int getEndToEndId()
           
 int getHopByHopId()
           
 java.lang.String getOriginHost()
           
 java.lang.String getOriginRealm()
           
 DiameterSession getSession()
          Returns the DiameterSession to which this message belongs.
 DiameterSession getSession(boolean create)
          Returns the DiameterSession to which this message belongs.
 java.lang.String getSessionId()
           
 boolean isRequest()
           
 void removeAttribute(java.lang.String name)
          Removes the named attribute from this message.
 void send()
           
 void setAttribute(java.lang.String name, java.lang.Object o)
          Stores an attribute in this message.
 void setAVPList(AVPList avps)
           
 int size()
           
 

Method Detail

get

<T> T get(Type<T> type)

add

<T> void add(Type<T> type,
             T value)

getApplicationId

int getApplicationId()

getHopByHopId

int getHopByHopId()

getEndToEndId

int getEndToEndId()

getCommand

DiameterCommand getCommand()

getOriginHost

java.lang.String getOriginHost()

getOriginRealm

java.lang.String getOriginRealm()

getSessionId

java.lang.String getSessionId()

size

int size()

getAVPs

AVPList getAVPs()
Returns a list with all messages AVPs.

Returns:
a list with all messages AVPs.

setAVPList

void setAVPList(AVPList avps)

getSession

DiameterSession getSession()
Returns the DiameterSession to which this message belongs. If the session didn't already exist it is created. This method is equivalent to calling getSession(true).

Returns:
the DiameterSession to which this message belongs.

getSession

DiameterSession getSession(boolean create)
Returns the DiameterSession to which this message belongs.

Parameters:
create - indicates whether the session is created if it doesn't already exist
Returns:
the DiameterSession to which this message belongs , or null if one hasn't been created and create is false

getApplicationSession

javax.servlet.sip.SipApplicationSession getApplicationSession()

isRequest

boolean isRequest()

send

void send()
          throws java.io.IOException
Throws:
java.io.IOException

getAttribute

java.lang.Object getAttribute(java.lang.String name)
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.

Parameters:
name - a String specifying the name of the attribute
Returns:
an Object containing the value of the attribute, or null if the attribute does not exist

removeAttribute

void removeAttribute(java.lang.String name)
Removes the named attribute from this message. Nothing is done if the message did not already contain the specified attribute.

Parameters:
name - a String specifying the name of the attribute

getAttributeNames

java.util.Enumeration<java.lang.String> getAttributeNames()
Returns an Enumeration containing the names of the attributes available to this message object. This method returns an empty Enumeration if the message has no attributes available to it.

Returns:
an Enumeration of strings containing the names of the message's attributes

setAttribute

void setAttribute(java.lang.String name,
                  java.lang.Object o)
Stores an attribute in this message.

Parameters:
name - a String specifying the name of the attribute
o - the Object to be stored
Throws:
java.lang.NullPointerException - if either of name or o is null.


Copyright © 2010. All Rights Reserved.