Class ApplicationId

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

public class ApplicationId extends Object
Diameter application identifier. An ApplicationId corresponds to one of the Auth-Application-Id, Acct-Application-Id, or Vendor-Specific-Application-Id AVPs contained within a Diameter message.
Author:
Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ApplicationId
     
    static final ApplicationId
     
    static final ApplicationId
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ApplicationId(int idNum, boolean isAuth)
    Creates a new ApplicationId for the specified numeric id.
    ApplicationId(int idNum, boolean isAuth, int[] vendorIds)
    Creates a new vendor-specific ApplicationId for the specified numeric id and list of vendor identifiers.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    decode(Avp avp)
    If the specified AVP is an Auth-Application-Id, Acct-Application-Id, or Vendor-Specified-Application-Id AVP, then returns the ApplicationId representing the advertised application.
    boolean
    Compares this ApplicationId to another for equality.
    Returns the Auth-Application-Id, Acct-Application-Id, or Vendor-Specific-Application-Id AVP for this application.
    int
    Returns the numeric id for this application.
    int[]
    If this is a vendor-specific application, then returns the list of vendor ids.
    int
     
    boolean
    Returns true if this an accounting application.
    boolean
    Returns true if this an authentication or authorization application.
    boolean
    Returns true iff this a vendor-specific application id.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ApplicationId

      public ApplicationId(int idNum, boolean isAuth)
      Creates a new ApplicationId for the specified numeric id.
      Parameters:
      idNum - IANA assigned application id number
      isAuth - if true, then is authentication/authorization application, otherwise is accounting application
    • ApplicationId

      public ApplicationId(int idNum, boolean isAuth, int[] vendorIds)
      Creates a new vendor-specific ApplicationId for the specified numeric id and list of vendor identifiers.
      Parameters:
      idNum - IANA assigned application id number
      isAuth - if true, then is authentication/authorization application, otherwise is accounting application
      vendorIds - list of application vendor ids
  • Method Details

    • decode

      public static ApplicationId decode(Avp avp) throws AvpException
      If the specified AVP is an Auth-Application-Id, Acct-Application-Id, or Vendor-Specified-Application-Id AVP, then returns the ApplicationId representing the advertised application. Otherwise returns null if not one of those AVPs.
      Parameters:
      avp - the AVP to be decoded
      Returns:
      the corresponding ApplicationId, or null if none
      Throws:
      AvpException - if the AVP was invalid
    • getAvp

      public Avp getAvp()
      Returns the Auth-Application-Id, Acct-Application-Id, or Vendor-Specific-Application-Id AVP for this application.
    • isAuthentication

      public boolean isAuthentication()
      Returns true if this an authentication or authorization application.
    • isAccounting

      public boolean isAccounting()
      Returns true if this an accounting application.
    • getNum

      public int getNum()
      Returns the numeric id for this application.
    • getVendorIds

      public int[] getVendorIds()
      If this is a vendor-specific application, then returns the list of vendor ids. Otherwise, returns null.
    • isVendorSpecific

      public boolean isVendorSpecific()
      Returns true iff this a vendor-specific application id.
    • equals

      public boolean equals(Object obj)
      Compares this ApplicationId to another for equality. Two ApplicationId's are considered equal if their corresponding numeric ids are equal.
      Overrides:
      equals in class Object
    • hashCode

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

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

      public XmlBuffer appendXml(XmlBuffer xb)