Working with Diameter Nodes
8.6.3 Creating New Command Codes
A Diameter command code determines the message type. For instance, when sending a request message, you must supply a command code. The Command class represents pre-defined commands codes for the Diameter base protocol, and can be used to create new command codes. Command codes share a common name space based on the code itself. The define method enables you to define codes, as in: static final Command TCA = Command.define1234, Test-Request, true, true; The define method registers a new Command, or returns a previous command definition if one was already defined. Commands can be compared using the reference equality operator ==.8.7 Working with AVPs
Attribute Value Pair AVP is a method of encapsulating information relevant to the Diameter message. AVPs are used by the Diameter base protocol, the Diameter application, or a higher-level application that employs Diameter. The Avp class represents a Diameter attribute-value pair. You can create new AVPs with an attribute value in the following way: Avp avp = new AvpAttribute.ERROR_MESSAGE, Bad request; You can also specify the attribute name directly, as in: Avp avp = new AvpError-Message, Bad request; The value that you specify must be valid for the specified attribute type. To create a grouped AVP, use the AvpList class, as in: AvpList avps = new AvpList; avps.addnew AvpEvent-Timestamp, 1234; avps.addnew AvpVendor-Id, 1111;8.7.1 Creating New Attributes
You can create new attributes to extend your Diameter application. The Attribute class represents an AVP attribute, and includes the AVP code, name, flags, optional vendor ID, and type of attribute. The class also maintains a registry of defined attributes. All attributes share a common namespace based on the attribute code and vendor ID. The define method enables you to define new attributes, as in: static final Attribute TEST = Attribute.define1234, Test-Attribute, 0, Attribute.FLAG_MANDATORY, Type.INTEGER32; Table 8–1 lists the available attribute types and describes how they are mapped to Java types. The define method registers a new attribute, or returns a previous definition if one was already defined. Attributes can be compared using the reference equality operator ==.Parts
» Oracle Fusion Middleware Online Documentation Library
» Multiple Responses SIP Servlets Versus HTTP Servlets
» Receiving Responses SIP Servlets Versus HTTP Servlets
» Proxy Functions SIP Servlets Versus HTTP Servlets
» Servlet Request Message Body
» Servlet Response Message Body
» Application Management Role of a Servlet Container
» Sends a 200 response to the CANCEL request.
» Sends a 487 response to the INVITE request to be cancelled.
» Invokes a doCancel method on the SIP servlet. This allows the application to
» Utility Functions Role of a Servlet Container
» Overview of Converged Applications
» Assembling and Packaging a Converged Application
» Using the Converged Application Example
» Overview of Header Format APIs and Configuration Summary of Compact Headers
» Assigning Header Formats with WlssSipServletMessage
» Summary of API and Configuration Behavior
» Overview Generating SNMP Traps from Application Code
» Requirement for Accessing SipServletSnmpTrapRuntimeMBean
» Obtaining a Reference to SipServletSnmpTrapRuntimeMBean
» Overview of Developing Distributed Applications
» Applications Must Not Create Threads
» Servlets Must Be Non-Blocking
» Store all Application Data in the Session
» All Session Data Must Be Serializable
» Use setAttribute to Modify Session Data in “No-Call” Scope
» Mark SIP Servlets as Distributable
» Session Expiration Best Practices
» Observe Best Practices for Java EE Applications
» Application Composition Model Oracle Fusion Middleware Online Documentation Library
» Using the Default Application Router
» Configuring a Custom Application Router
» Session Key-Based Request Targeting
» Overview of SIP Servlet Security
» Role Mapping Features Oracle Fusion Middleware Online Documentation Library
» Using Implicit Role Assignment
» Important Requirements Assigning Roles Using security-role-assignment
» Assigning run-as Roles Role Assignment Precedence for SIP Servlet Roles
» Debugging Security Features weblogic.xml Deployment Descriptor Reference
» Specifying a Predefined Logging Level
» Customizing Log Records Enabling Message Logging
» Overview Specifying Content Types for Unencrypted Logging
» Example Message Log Configuration and Output
» Configuring Log File Rotation
» Diameter Protocol Packages Oracle Fusion Middleware Online Documentation Library
» File Required for Compiling Application Using the Diameter API
» Implementing a Diameter Application
» Sending Request Messages Sending Answer Messages
» Creating New Attributes Working with AVPs
» Working with Diameter Sessions Creating Converged Diameter and SIP Applications
» Overview of Profile Service API and Sh Interface Support
» Enabling the Sh Interface Provider
» Using a Constructed Document Key to Manage Profile Data
» Prerequisites for Listener Implementations
» Implementing ProfileListener Monitoring Profile Data with ProfileListener
» Overview of the Profile Service API
» Implementing Profile Service API Methods
» Mapping Profile Requests to Profile Providers
» Configuring Profile Providers Using the Administration Console
» Overview of Rf Interface Support
» Understanding Offline Charging Events
» Configuring the Rf Application
» Specifying the Session Expiration Sending Asynchronous Events
» Accessing the Rf Application Implementing Event-Based Charging
» Using the Accounting Session State
» Overview of Ro Interface Support
» Credit Authorization with Unit Determination
» Credit Authorization with Direct Debiting
» Determining Units and Rating
» Configuring the Ro Application
Show more