Class Attribute

java.lang.Object
com.bea.wcp.diameter.Attribute

public final class Attribute extends Object
Diameter attribute information.
Author:
Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
  • Field Details

    • FLAG_NONE

      public static final int FLAG_NONE
      See Also:
    • FLAG_VENDOR_SPECIFIC

      public static final int FLAG_VENDOR_SPECIFIC
      See Also:
    • FLAG_MANDATORY

      public static final int FLAG_MANDATORY
      See Also:
    • FLAG_END_TO_END_ENCRYPTION

      public static final int FLAG_END_TO_END_ENCRYPTION
      See Also:
    • FLAG_MANDATORY_RULE_DEFAULT

      public static final int FLAG_MANDATORY_RULE_DEFAULT
      See Also:
    • FLAG_MANDATORY_RULE_MUST

      public static final int FLAG_MANDATORY_RULE_MUST
      See Also:
    • FLAG_MANDATORY_RULE_MUST_NOT

      public static final int FLAG_MANDATORY_RULE_MUST_NOT
      See Also:
    • FLAG_MANDATORY_RULE_MAY

      public static final int FLAG_MANDATORY_RULE_MAY
      See Also:
    • FLAG_MANDATORY_RULE_MASK

      public static final int FLAG_MANDATORY_RULE_MASK
      See Also:
    • CODE_ACCT_APPLICATION_ID

      public static final int CODE_ACCT_APPLICATION_ID
      See Also:
    • CODE_AUTH_APPLICATION_ID

      public static final int CODE_AUTH_APPLICATION_ID
      See Also:
    • CODE_DESTINATION_HOST

      public static final int CODE_DESTINATION_HOST
      See Also:
    • CODE_DESTINATION_REALM

      public static final int CODE_DESTINATION_REALM
      See Also:
    • CODE_EXPERIMENTAL_RESULT

      public static final int CODE_EXPERIMENTAL_RESULT
      See Also:
    • CODE_EXPERIMENTAL_RESULT_CODE

      public static final int CODE_EXPERIMENTAL_RESULT_CODE
      See Also:
    • CODE_FIRMWARE_REVISION

      public static final int CODE_FIRMWARE_REVISION
      See Also:
    • CODE_HOST_IP_ADDRESS

      public static final int CODE_HOST_IP_ADDRESS
      See Also:
    • CODE_INBAND_SECURITY_ID

      public static final int CODE_INBAND_SECURITY_ID
      See Also:
    • CODE_ORIGIN_HOST

      public static final int CODE_ORIGIN_HOST
      See Also:
    • CODE_ORIGIN_REALM

      public static final int CODE_ORIGIN_REALM
      See Also:
    • CODE_PRODUCT_NAME

      public static final int CODE_PRODUCT_NAME
      See Also:
    • CODE_PROXY_INFO

      public static final int CODE_PROXY_INFO
      See Also:
    • CODE_RESULT_CODE

      public static final int CODE_RESULT_CODE
      See Also:
    • CODE_ROUTE_RECORD

      public static final int CODE_ROUTE_RECORD
      See Also:
    • CODE_SESSION_ID

      public static final int CODE_SESSION_ID
      See Also:
    • CODE_SUPPORTED_VENDOR_ID

      public static final int CODE_SUPPORTED_VENDOR_ID
      See Also:
    • CODE_VENDOR_ID

      public static final int CODE_VENDOR_ID
      See Also:
    • CODE_VENDOR_SPECIFIC_APPLICATION_ID

      public static final int CODE_VENDOR_SPECIFIC_APPLICATION_ID
      See Also:
    • CODE_ACCOUNTING_RECORD_TYPE

      public static final int CODE_ACCOUNTING_RECORD_TYPE
      See Also:
    • CODE_ACCOUNTING_RECORD_NUMBER

      public static final int CODE_ACCOUNTING_RECORD_NUMBER
      See Also:
    • CODE_USER_NAME

      public static final int CODE_USER_NAME
      See Also:
    • CODE_ACCT_INTERIM_INTERVAL

      public static final int CODE_ACCT_INTERIM_INTERVAL
      See Also:
    • ACCT_INTERIM_INTERVAL

      public static final Attribute ACCT_INTERIM_INTERVAL
    • ACCOUNTING_REALTIME_REQUIRED

      public static final Attribute ACCOUNTING_REALTIME_REQUIRED
    • ACCT_MULTI_SESSION_ID

      public static final Attribute ACCT_MULTI_SESSION_ID
    • ACCOUNTING_RECORD_NUMBER

      public static final Attribute ACCOUNTING_RECORD_NUMBER
    • ACCOUNTING_RECORD_TYPE

      public static final Attribute ACCOUNTING_RECORD_TYPE
    • ACCOUNTING_SESSION_ID

      public static final Attribute ACCOUNTING_SESSION_ID
    • ACCOUNTING_SUB_SESSION_ID

      public static final Attribute ACCOUNTING_SUB_SESSION_ID
    • ACCT_APPLICATION_ID

      public static final Attribute ACCT_APPLICATION_ID
    • AUTH_APPLICATION_ID

      public static final Attribute AUTH_APPLICATION_ID
    • AUTH_REQUEST_TYPE

      public static final Attribute AUTH_REQUEST_TYPE
    • AUTHORIZATION_LIFETIME

      public static final Attribute AUTHORIZATION_LIFETIME
    • AUTH_GRACE_PERIOD

      public static final Attribute AUTH_GRACE_PERIOD
    • AUTH_SESSION_STATE

      public static final Attribute AUTH_SESSION_STATE
    • RE_AUTH_REQUEST_TYPE

      public static final Attribute RE_AUTH_REQUEST_TYPE
    • CLASS

      public static final Attribute CLASS
    • DESTINATION_HOST

      public static final Attribute DESTINATION_HOST
    • DESTINATION_REALM

      public static final Attribute DESTINATION_REALM
    • DISCONNECT_CAUSE

      public static final Attribute DISCONNECT_CAUSE
    • E2E_SEQUENCE

      public static final Attribute E2E_SEQUENCE
    • ERROR_MESSAGE

      public static final Attribute ERROR_MESSAGE
    • ERROR_REPORTING_HOST

      public static final Attribute ERROR_REPORTING_HOST
    • EVENT_TIMESTAMP

      public static final Attribute EVENT_TIMESTAMP
    • EXPERIMENTAL_RESULT

      public static final Attribute EXPERIMENTAL_RESULT
    • EXPERIMENTAL_RESULT_CODE

      public static final Attribute EXPERIMENTAL_RESULT_CODE
    • FAILED_AVP

      public static final Attribute FAILED_AVP
    • FIRMWARE_REVISION

      public static final Attribute FIRMWARE_REVISION
    • HOST_IP_ADDRESS

      public static final Attribute HOST_IP_ADDRESS
    • INBAND_SECURITY_ID

      public static final Attribute INBAND_SECURITY_ID
    • MULTI_ROUND_TIME_OUT

      public static final Attribute MULTI_ROUND_TIME_OUT
    • ORIGIN_HOST

      public static final Attribute ORIGIN_HOST
    • ORIGIN_REALM

      public static final Attribute ORIGIN_REALM
    • ORIGIN_STATE_ID

      public static final Attribute ORIGIN_STATE_ID
    • PRODUCT_NAME

      public static final Attribute PRODUCT_NAME
    • PROXY_HOST

      public static final Attribute PROXY_HOST
    • PROXY_INFO

      public static final Attribute PROXY_INFO
    • PROXY_STATE

      public static final Attribute PROXY_STATE
    • REDIRECT_HOST

      public static final Attribute REDIRECT_HOST
    • REDIRECT_HOST_USAGE

      public static final Attribute REDIRECT_HOST_USAGE
    • REDIRECT_MAX_CACHE_TIME

      public static final Attribute REDIRECT_MAX_CACHE_TIME
    • RESULT_CODE

      public static final Attribute RESULT_CODE
    • ROUTE_RECORD

      public static final Attribute ROUTE_RECORD
    • SESSION_ID

      public static final Attribute SESSION_ID
    • SESSION_TIMEOUT

      public static final Attribute SESSION_TIMEOUT
    • SESSION_BINDING

      public static final Attribute SESSION_BINDING
    • SESSION_SERVER_FAILOVER

      public static final Attribute SESSION_SERVER_FAILOVER
    • SUPPORTED_VENDOR_ID

      public static final Attribute SUPPORTED_VENDOR_ID
    • TERMINATION_CAUSE

      public static final Attribute TERMINATION_CAUSE
    • USER_NAME

      public static final Attribute USER_NAME
    • VENDOR_ID

      public static final Attribute VENDOR_ID
    • VENDOR_SPECIFIC_APPLICATION_ID

      public static final Attribute VENDOR_SPECIFIC_APPLICATION_ID
  • Constructor Details

    • Attribute

      public Attribute(int code, int vendorId, int flags)
      Creates a new "anonymous" Attribute decoded from a Diameter message. This attribute will be of type "Data" and will not be added to the registry of known attributes.
      Parameters:
      code - the attribute code
      vendorId - the attribute vendor id
      flags - the attribute flags
  • Method Details

    • define

      public static Attribute define(int code, String name, int vendorId, int flags, Type type)
      Defines a new Diameter attribute. If the Attribute is already defined then returns the previous definition. Otherwise, returns a newly defined Attribute object.
      Parameters:
      code - the attribute code
      name - the attribute name
      vendorId - the attribute vendor id, or 0 for Diameter base
      flags - the attribute flags
      type - the attribute data type
      Throws:
      IllegalStateException - if the attribute is already defined but with properties that are inconsistent with the specified arguments
    • define

      public static Attribute define(int code, String name, int vendorId, Type type)
      Defines a new Diameter attribute with default flags (FLAG_MANDATORY).
      Parameters:
      code - the attribute code
      name - the attribute name
      vendorId - the attribute vendor id, or 0 for Diameter base
      type - the attribute data type
      Throws:
      IllegalStateException - if the attribute is already defined
    • define

      public static Attribute define(int code, String name, Type type)
      Defines a new Diameter base protocol attribute with default flags (FLAG_MANDATORY).
      Parameters:
      code - the attribute code
      name - the attribute name
      type - the attribute data type
      Throws:
      IllegalStateException - if the attribute is already defined
    • define

      public static Attribute define(int code, String name)
      Defines a new Diameter base protocol attribute with default flags (FLAGS_MANDATORY) and data type of "Integer32".
      Parameters:
      code - the attribute code
      name - the attribute name
    • getByName

      public static Attribute getByName(String name)
      Returns the Attribute for the specified attribute name. The attribute must have been previously defined.
      Parameters:
      name - the attribute name
      Returns:
      the registered Attribute, or null if none
    • getByCode

      public static Attribute getByCode(int code)
      Returns the base protocol Attribute for the specified attribute code. The attribute must have been previously defined.
      Parameters:
      code - the attribute code
      Returns:
      the registered Attribute, or null if none
    • getByCode

      public static Attribute getByCode(int code, int vendorId)
      Returns the attribute for the specified attribute code and vendor id. The attribute must have been previously defined.
      Parameters:
      code - the attribute code
      vendorId - the attribute vendor id
      Returns:
      the registered Attribute, or null if none
    • getCode

      public int getCode()
      Returns the attribute AVP code.
    • getName

      public String getName()
      Returns the attribute name, or null if unspecified.
    • getFlags

      public int getFlags()
      Returns the AVP header flags for the attribute.
    • getVendorId

      public int getVendorId()
      Returns the attribute vendor id, or 0 for Diameter base protocol.
    • getType

      public Type getType()
      Returns the attribute data type.
    • isGrouped

      public boolean isGrouped()
      Returns true if this is an attribute for a grouped AVP.
    • isMandatory

      public boolean isMandatory()
      Returns true if this is a mandatory attribute.
    • isVendorSpecific

      public boolean isVendorSpecific()
      Returns true if this is a vendor specified attribute.
    • isEndToEndEncryption

      public boolean isEndToEndEncryption()
      Returns true if this attribute supports end-to-end encryption.
    • isUnknown

      public boolean isUnknown()
      Returns true if this attribute is unknown (unregistered).
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Compares this Attribute to another for equality. Two Attributes are considered equal if they have the same attribute code and vendor id.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSupportedVendorIds

      public static Set<Integer> getSupportedVendorIds()
    • appendXml

      public XmlBuffer appendXml(XmlBuffer xb)