Class Command

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final Command
    Accounting-Answer (ACA.)
    static final Command
    Accounting-Request (ACR).
    static final Command
    Abort-Session-Answer (ASA).
    static final Command
    Abort-Session-Request (ASR).
    static final Command
    Capabilities-Exchange-Answer (CEA).
    static final Command
    Capabilities-Exchange-Request (CER).
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final Command
    Disconnect-Peer-Answer (DPA).
    static final Command
    Disconnect-Peer-Request (DPR).
    static final Command
    Device-Watchdog-Answer (DWA).
    static final Command
    Device-Watchdog-Request (DWR).
    static final Command
    Re-Auth-Answer (RAA).
    static final Command
    Re-Auth-Request (RAR).
    static final Command
    Session-Termination-Answer (STA).
    static final Command
    Session-Termination-Request (STR).
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static Command
    define(int code, int appId, String name, boolean isRequest)
    Defines a new Command which is proxiable and uses the default message factory.
    static Command
    define(int code, int appId, String name, boolean isRequest, boolean isProxiable)
    Defines a new Command with default message factory.
    static Command
    define(int code, int appId, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
    Defines a new Command.
    static Command
    define(int code, String name, boolean isRequest)
    Deprecated.
    static Command
    define(int code, String name, boolean isRequest, boolean isProxiable)
    Deprecated.
    Use the method with appId instead
    static Command
    define(int code, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
    Deprecated.
    Use the method with appId instead
    static Command
    getAnsByCode(int code)
    Deprecated.
    Use the method with appId instead(getAnsByCode(int code, int appId))
    static Command
    getAnsByCode(int code, int appId)
    Returns the Command for the specified answer command code, or null if not found.
    int
    Returns the Application Identifier.
    static Command
    Returns the Command for the specified command name, or null if not found.
    int
    Returns the command code.
    Returns the MessageFactory for this command, or null if none.
    Returns the command name.
    static Command
    getReqByCode(int code)
    Deprecated.
    Use the method with appId instead(getReqByCode(int code, int appId))
    static Command
    getReqByCode(int code, int appId)
    Returns the Command for the specified request command code, or null if not found.
    boolean
    Returns true if this command is proxiable.
    boolean
    Returns true if this is a request command, or false if this is an answer.
     

    Methods inherited from class java.lang.Object

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

    • CODE_CE

      public static final int CODE_CE
      See Also:
    • CODE_DW

      public static final int CODE_DW
      See Also:
    • CODE_DP

      public static final int CODE_DP
      See Also:
    • CODE_AC

      public static final int CODE_AC
      See Also:
    • CODE_RA

      public static final int CODE_RA
      See Also:
    • CODE_ST

      public static final int CODE_ST
      See Also:
    • CODE_AS

      public static final int CODE_AS
      See Also:
    • CODE_CC

      public static final int CODE_CC
      See Also:
    • CODE_AA

      public static final int CODE_AA
      See Also:
    • ASR

      public static final Command ASR
      Abort-Session-Request (ASR).
    • ASA

      public static final Command ASA
      Abort-Session-Answer (ASA).
    • ACR

      public static final Command ACR
      Accounting-Request (ACR).
    • ACA

      public static final Command ACA
      Accounting-Answer (ACA.)
    • CER

      public static final Command CER
      Capabilities-Exchange-Request (CER).
    • CEA

      public static final Command CEA
      Capabilities-Exchange-Answer (CEA).
    • DWR

      public static final Command DWR
      Device-Watchdog-Request (DWR).
    • DWA

      public static final Command DWA
      Device-Watchdog-Answer (DWA).
    • DPR

      public static final Command DPR
      Disconnect-Peer-Request (DPR).
    • DPA

      public static final Command DPA
      Disconnect-Peer-Answer (DPA).
    • RAR

      public static final Command RAR
      Re-Auth-Request (RAR).
    • RAA

      public static final Command RAA
      Re-Auth-Answer (RAA).
    • STR

      public static final Command STR
      Session-Termination-Request (STR).
    • STA

      public static final Command STA
      Session-Termination-Answer (STA).
  • Method Details

    • define

      public static Command define(int code, int appId, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
      Defines a new Command. The Command will be added to the registry of known commands.
      Parameters:
      code - the command code
      appId - the Application-Id
      name - the command name
      isRequest - if true then is request, otherwise is answer
      isProxiable - if true then is proxiable
      factory - optional message factory for command
    • define

      @Deprecated public static Command define(int code, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
      Deprecated.
      Use the method with appId instead
      Defines a new Command. This method is kept for backward compatibility
      Parameters:
      code - Command Code
      name - Command Name
      isRequest - true for Request and false for Answer
      isProxiable - if true then is proxiable
      factory - optional message factory for command
      Returns:
      Command
    • define

      public static Command define(int code, int appId, String name, boolean isRequest, boolean isProxiable)
      Defines a new Command with default message factory.
      Parameters:
      code - the command code
      appId - the Application-Id
      name - the command name
      isRequest - if true then is request, otherwise is answer
      isProxiable - if true then is proxiable
    • define

      @Deprecated public static Command define(int code, String name, boolean isRequest, boolean isProxiable)
      Deprecated.
      Use the method with appId instead
      Defines a new Command with default message factory.
      Parameters:
      code - the command code
      appId - the Application-Id
      name - the command name
      isRequest - if true then is request, otherwise is answer
      isProxiable - if true then is proxiable
    • define

      public static Command define(int code, int appId, String name, boolean isRequest)
      Defines a new Command which is proxiable and uses the default message factory.
      Parameters:
      code - the command code
      appId - the Application-Id
      name - the command name
      isRequest - if true then is proxiable
    • define

      @Deprecated public static Command define(int code, String name, boolean isRequest)
      Deprecated.
      Defines a new Command which is proxiable and uses the default message factory.
      Parameters:
      code - the command code
      name - the command name
      isRequest - if true then is proxiable
    • getReqByCode

      public static Command getReqByCode(int code, int appId)
      Returns the Command for the specified request command code, or null if not found.
    • getReqByCode

      @Deprecated public static Command getReqByCode(int code)
      Deprecated.
      Use the method with appId instead(getReqByCode(int code, int appId))
      Returns the Command for the specified request command code, or null if not found.
    • getAnsByCode

      public static Command getAnsByCode(int code, int appId)
      Returns the Command for the specified answer command code, or null if not found.
    • getAnsByCode

      @Deprecated public static Command getAnsByCode(int code)
      Deprecated.
      Use the method with appId instead(getAnsByCode(int code, int appId))
      Returns the Command for the specified answer command code, or null if not found.
    • getByName

      public static Command getByName(String name)
      Returns the Command for the specified command name, or null if not found.
    • getCode

      public int getCode()
      Returns the command code.
    • getAppId

      public int getAppId()
      Returns the Application Identifier.
    • getName

      public String getName()
      Returns the command name.
    • isRequest

      public boolean isRequest()
      Returns true if this is a request command, or false if this is an answer.
    • isProxiable

      public boolean isProxiable()
      Returns true if this command is proxiable.
    • getFactory

      public MessageFactory getFactory()
      Returns the MessageFactory for this command, or null if none.
    • toString

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

      public XmlBuffer appendXml(XmlBuffer xb)