Interface RedirectServer
-
- All Superinterfaces:
Cloneable
,DiameterAvp
,GroupedAvp
public interface RedirectServer extends GroupedAvp
Defines an interface representing the Redirect-Server grouped AVP type. From the Diameter Credit-Control Application (rfc4006.txt) specification:8.37. Redirect-Server AVP The Redirect-Server AVP (AVP Code 434) is of type Grouped and contains the address information of the redirect server (e.g., HTTP redirect server, SIP Server) with which the end user is to be connected when the account cannot cover the service cost. It MUST be present when the Final-Unit-Action AVP is set to REDIRECT. It is defined as follows (per the grouped-avp-def of RFC 3588 [DIAMBASE]): Redirect-Server ::= < AVP Header: 434 > { Redirect-Address-Type } { Redirect-Server-Address }
Note:
The support for extension AVPs is present even thou the ABNF grammar for this AVP does not contain the "* [ AVP ]" line. Be aware that adding any extension AVPs may result in interoperability problems with products that strongly validate the incoming diameter message for it's adherence to the specification.
-
-
Field Summary
-
Fields inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DiameterAvp[]
getExtensionAvps()
Returns the set of extension AVPs.RedirectAddressType
getRedirectAddressType()
Returns the value of the Redirect-Address-Type AVP, of type Enumerated.String
getRedirectServerAddress()
Returns the value of the Redirect-Server-Address AVP, of type UTF8String.boolean
hasRedirectAddressType()
Returns true if the Redirect-Address-Type AVP is present in the Redirect-Server AVP.boolean
hasRedirectServerAddress()
Returns true if the Redirect-Server-Address AVP is present in the Redirect-Server AVP.void
removeExtensionAvps()
Removes all extension AVPs from the Redirect-Server AVP.void
removeRedirectAddressType()
Removes the Redirect-Address-Type AVP from the Redirect-Server AVP.void
removeRedirectServerAddress()
Removes the Redirect-Server-Address AVP from the Redirect-Server AVP.void
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.void
setRedirectAddressType(RedirectAddressType redirectAddressType)
Sets the value of the Redirect-Address-Type AVP, of type Enumerated.void
setRedirectServerAddress(String redirectServerAddress)
Sets the value of the Redirect-Server-Address AVP, of type UTF8String.-
Methods inherited from interface org.jainslee.resources.diameter.base.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
-
-
-
-
Method Detail
-
hasRedirectAddressType
boolean hasRedirectAddressType()
Returns true if the Redirect-Address-Type AVP is present in the Redirect-Server AVP.
-
getRedirectAddressType
RedirectAddressType getRedirectAddressType()
Returns the value of the Redirect-Address-Type AVP, of type Enumerated.- Returns:
- the value of the Redirect-Address-Type AVP, or null if it has not been set.
-
setRedirectAddressType
void setRedirectAddressType(RedirectAddressType redirectAddressType)
Sets the value of the Redirect-Address-Type AVP, of type Enumerated.- Throws:
NullPointerException
- ifredirectAddressType
isnull
.
-
removeRedirectAddressType
void removeRedirectAddressType()
Removes the Redirect-Address-Type AVP from the Redirect-Server AVP. If the Redirect-Address-Type AVP is not present, this method returns silently.
-
hasRedirectServerAddress
boolean hasRedirectServerAddress()
Returns true if the Redirect-Server-Address AVP is present in the Redirect-Server AVP.
-
getRedirectServerAddress
String getRedirectServerAddress()
Returns the value of the Redirect-Server-Address AVP, of type UTF8String.- Returns:
- the value of the Redirect-Server-Address AVP, or null if it has not been set.
-
setRedirectServerAddress
void setRedirectServerAddress(String redirectServerAddress)
Sets the value of the Redirect-Server-Address AVP, of type UTF8String.- Throws:
NullPointerException
- ifredirectServerAddress
isnull
.
-
removeRedirectServerAddress
void removeRedirectServerAddress()
Removes the Redirect-Server-Address AVP from the Redirect-Server AVP. If the Redirect-Server-Address AVP is not present, this method returns silently.
-
getExtensionAvps
DiameterAvp[] getExtensionAvps()
Returns the set of extension AVPs. The returned array contains the extension AVPs in the order they appear in the Redirect-Server AVP. A return value of null implies that no extensions AVPs have been set.
-
setExtensionAvps
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
Sets the set of extension AVPs with all the values in the given array. The AVPs will be added to Redirect-Server AVP in the order in which they appear in the array. Note: the array must not be altered by the caller following this call, and getExtensionAvps() is not guaranteed to return the same array instance, e.g. an "==" check would fail.- Throws:
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class (i.e. an AVP for which get/set methods already appear in this class)NullPointerException
- ifavps
isnull
.
-
removeExtensionAvps
void removeExtensionAvps()
Removes all extension AVPs from the Redirect-Server AVP. If no extension AVPs are present, this method returns silently.
-
-