Package com.bea.wcp.diameter
Class ApplicationId
java.lang.Object
com.bea.wcp.diameter.ApplicationId
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
FieldsModifier and TypeFieldDescriptionstatic final ApplicationIdstatic final ApplicationIdstatic final ApplicationId -
Constructor Summary
ConstructorsConstructorDescriptionApplicationId(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 TypeMethodDescriptionstatic ApplicationIdIf 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.booleanCompares this ApplicationId to another for equality.getAvp()Returns the Auth-Application-Id, Acct-Application-Id, or Vendor-Specific-Application-Id AVP for this application.intgetNum()Returns the numeric id for this application.int[]If this is a vendor-specific application, then returns the list of vendor ids.inthashCode()booleanReturns true if this an accounting application.booleanReturns true if this an authentication or authorization application.booleanReturns true iff this a vendor-specific application id.toString()
-
Field Details
-
COMMON
-
BASE_ACCOUNTING
-
RELAY
-
-
Constructor Details
-
ApplicationId
public ApplicationId(int idNum, boolean isAuth) Creates a new ApplicationId for the specified numeric id.- Parameters:
idNum- IANA assigned application id numberisAuth- 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 numberisAuth- if true, then is authentication/authorization application, otherwise is accounting applicationvendorIds- list of application vendor ids
-
-
Method Details
-
decode
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
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
Compares this ApplicationId to another for equality. Two ApplicationId's are considered equal if their corresponding numeric ids are equal. -
hashCode
public int hashCode() -
toString
-
appendXml
-