public final class Command extends Object
Modifier and Type | Field and Description |
---|---|
static Command |
ACA
Accounting-Answer (ACA.)
|
static Command |
ACR
Accounting-Request (ACR).
|
static Command |
ASA
Abort-Session-Answer (ASA).
|
static Command |
ASR
Abort-Session-Request (ASR).
|
static Command |
CEA
Capabilities-Exchange-Answer (CEA).
|
static Command |
CER
Capabilities-Exchange-Request (CER).
|
static int |
CODE_AA |
static int |
CODE_AC |
static int |
CODE_AS |
static int |
CODE_CC |
static int |
CODE_CE |
static int |
CODE_DP |
static int |
CODE_DW |
static int |
CODE_RA |
static int |
CODE_ST |
static Command |
DPA
Disconnect-Peer-Answer (DPA).
|
static Command |
DPR
Disconnect-Peer-Request (DPR).
|
static Command |
DWA
Device-Watchdog-Answer (DWA).
|
static Command |
DWR
Device-Watchdog-Request (DWR).
|
static Command |
RAA
Re-Auth-Answer (RAA).
|
static Command |
RAR
Re-Auth-Request (RAR).
|
static Command |
STA
Session-Termination-Answer (STA).
|
static Command |
STR
Session-Termination-Request (STR).
|
Modifier and Type | Method and Description |
---|---|
XmlBuffer |
appendXml(XmlBuffer xb) |
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 |
getAppId()
Returns the Application Identifier.
|
static Command |
getByName(String name)
Returns the Command for the specified command name, or null if not found.
|
int |
getCode()
Returns the command code.
|
MessageFactory |
getFactory()
Returns the MessageFactory for this command, or null if none.
|
String |
getName()
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 |
isProxiable()
Returns true if this command is proxiable.
|
boolean |
isRequest()
Returns true if this is a request command, or false if this is an answer.
|
String |
toString() |
public static final int CODE_CE
public static final int CODE_DW
public static final int CODE_DP
public static final int CODE_AC
public static final int CODE_RA
public static final int CODE_ST
public static final int CODE_AS
public static final int CODE_CC
public static final int CODE_AA
public static final Command ASR
public static final Command ASA
public static final Command ACR
public static final Command ACA
public static final Command CER
public static final Command CEA
public static final Command DWR
public static final Command DWA
public static final Command DPR
public static final Command DPA
public static final Command RAR
public static final Command RAA
public static final Command STR
public static final Command STA
public static Command define(int code, int appId, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
code
- the command codeappId
- the Application-Idname
- the command nameisRequest
- if true then is request, otherwise is answerisProxiable
- if true then is proxiablefactory
- optional message factory for command@Deprecated public static Command define(int code, String name, boolean isRequest, boolean isProxiable, MessageFactory factory)
code
- Command Codename
- Command NameisRequest
- true for Request and false for AnswerisProxiable
- if true then is proxiablefactory
- optional message factory for commandpublic static Command define(int code, int appId, String name, boolean isRequest, boolean isProxiable)
code
- the command codeappId
- the Application-Idname
- the command nameisRequest
- if true then is request, otherwise is answerisProxiable
- if true then is proxiable@Deprecated public static Command define(int code, String name, boolean isRequest, boolean isProxiable)
code
- the command codeappId
- the Application-Idname
- the command nameisRequest
- if true then is request, otherwise is answerisProxiable
- if true then is proxiablepublic static Command define(int code, int appId, String name, boolean isRequest)
code
- the command codeappId
- the Application-Idname
- the command nameisRequest
- if true then is proxiable@Deprecated public static Command define(int code, String name, boolean isRequest)
code
- the command codename
- the command nameisRequest
- if true then is proxiablepublic static Command getReqByCode(int code, int appId)
@Deprecated public static Command getReqByCode(int code)
public static Command getAnsByCode(int code, int appId)
@Deprecated public static Command getAnsByCode(int code)
public static Command getByName(String name)
public int getCode()
public int getAppId()
public String getName()
public boolean isRequest()
public boolean isProxiable()
public MessageFactory getFactory()