org.jdiameter.api
Interface Message

All Superinterfaces:
java.io.Serializable, Wrapper
All Known Subinterfaces:
Answer, Request

public interface Message
extends Wrapper, java.io.Serializable

A Diameter message is either a request from a client to a server, or a response from a server to a client. Both Request and Answer messages use the basic format of RFC 3588 Wrapper interface allows adapt message to any driver vendor specific interface The message must support adaptable operation to Answer and Request interfaces Serializable interface allows use this class in SLEE Event objects

Version:
1.5.1 Final

Field Summary
static int ABORT_SESSION_ANSWER
          The Abort-Session-Answer message code
static int ABORT_SESSION_REQUEST
          The Abort-Session-Request message code
static int ACCOUNTING_ANSWER
          The Accounting-Answer message code
static int ACCOUNTING_REQUEST
          The Accounting-Request message code
static int CAPABILITIES_EXCHANGE_ANSWER
          The Capabilities-Exchange-Answer message code
static int CAPABILITIES_EXCHANGE_REQUEST
          The Capabilities-Exchange-Request message code
static int DEVICE_WATCHDOG_ANSWER
          The Device-Watchdog-Answer message code
static int DEVICE_WATCHDOG_REQUEST
          The Device-Watchdog-Request message code
static int DISCONNECT_PEER_ANSWER
          The Disconnect-Peer-Answer message code
static int DISCONNECT_PEER_REQUEST
          The Disconnect-Peer-Request message code
static int RE_AUTH_ANSWER
          The Re-Auth-Answer message code
static int RE_AUTH_REQUEST
          The Re-Auth-Request message code
static int SESSION_TERMINATION_ANSWER
          The Session-Termination-Answer message code
static int SESSION_TERMINATION_REQUEST
          The Session-Termination-Request message code
 
Method Summary
 long getApplicationId()
          Return ApplicationId value from message header
 java.util.Set<ApplicationId> getApplicationIdAvps()
          Returns set of Application-Id avps (Auth-Application-Id, Acc-Appplication-Id and Vendor-Specific-Application-Id avps) from message
 AvpSet getAvps()
           
 int getCommandCode()
           
 long getEndToEndIdentifier()
          The End-to-End Identifier is an unsigned 32-bit integer field (in network byte order) and is used to detect duplicate messages.
 long getHopByHopIdentifier()
          The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in network byte order) and aids in matching requests and replies.
 java.lang.String getSessionId()
          Return message Session Id avp Value (null if avp not set)
 byte getVersion()
           
 boolean isError()
           
 boolean isProxiable()
           
 boolean isRequest()
           
 boolean isReTransmitted()
           
 void setError(boolean value)
          Set 1 or 0 to E bit field of header
 void setProxiable(boolean value)
          Set 1 or 0 to P bit field of header
 void setRequest(boolean value)
          Set 1 or 0 to R bit field of header
 void setReTransmitted(boolean value)
          Set 1 or 0 to T bit field of header
 
Methods inherited from interface org.jdiameter.api.Wrapper
isWrapperFor, unwrap
 

Field Detail

ABORT_SESSION_REQUEST

static final int ABORT_SESSION_REQUEST
The Abort-Session-Request message code

See Also:
Constant Field Values

ABORT_SESSION_ANSWER

static final int ABORT_SESSION_ANSWER
The Abort-Session-Answer message code

See Also:
Constant Field Values

ACCOUNTING_REQUEST

static final int ACCOUNTING_REQUEST
The Accounting-Request message code

See Also:
Constant Field Values

ACCOUNTING_ANSWER

static final int ACCOUNTING_ANSWER
The Accounting-Answer message code

See Also:
Constant Field Values

CAPABILITIES_EXCHANGE_REQUEST

static final int CAPABILITIES_EXCHANGE_REQUEST
The Capabilities-Exchange-Request message code

See Also:
Constant Field Values

CAPABILITIES_EXCHANGE_ANSWER

static final int CAPABILITIES_EXCHANGE_ANSWER
The Capabilities-Exchange-Answer message code

See Also:
Constant Field Values

DEVICE_WATCHDOG_REQUEST

static final int DEVICE_WATCHDOG_REQUEST
The Device-Watchdog-Request message code

See Also:
Constant Field Values

DEVICE_WATCHDOG_ANSWER

static final int DEVICE_WATCHDOG_ANSWER
The Device-Watchdog-Answer message code

See Also:
Constant Field Values

DISCONNECT_PEER_REQUEST

static final int DISCONNECT_PEER_REQUEST
The Disconnect-Peer-Request message code

See Also:
Constant Field Values

DISCONNECT_PEER_ANSWER

static final int DISCONNECT_PEER_ANSWER
The Disconnect-Peer-Answer message code

See Also:
Constant Field Values

RE_AUTH_REQUEST

static final int RE_AUTH_REQUEST
The Re-Auth-Request message code

See Also:
Constant Field Values

RE_AUTH_ANSWER

static final int RE_AUTH_ANSWER
The Re-Auth-Answer message code

See Also:
Constant Field Values

SESSION_TERMINATION_REQUEST

static final int SESSION_TERMINATION_REQUEST
The Session-Termination-Request message code

See Also:
Constant Field Values

SESSION_TERMINATION_ANSWER

static final int SESSION_TERMINATION_ANSWER
The Session-Termination-Answer message code

See Also:
Constant Field Values
Method Detail

getVersion

byte getVersion()
Returns:
version of message (version filed in header)

isRequest

boolean isRequest()
Returns:
value of R bit from header of message

setRequest

void setRequest(boolean value)
Set 1 or 0 to R bit field of header

Parameters:
value - true == 1 or false = 0

isProxiable

boolean isProxiable()
Returns:
value of P bit from header of message

setProxiable

void setProxiable(boolean value)
Set 1 or 0 to P bit field of header

Parameters:
value - true == 1 or false = 0

isError

boolean isError()
Returns:
value of E bit from header of message

setError

void setError(boolean value)
Set 1 or 0 to E bit field of header

Parameters:
value - true == 1 or false = 0

isReTransmitted

boolean isReTransmitted()
Returns:
value of T bit from header of message

setReTransmitted

void setReTransmitted(boolean value)
Set 1 or 0 to T bit field of header

Parameters:
value - true == 1 or false = 0

getCommandCode

int getCommandCode()
Returns:
command code from header of message

getSessionId

java.lang.String getSessionId()
Return message Session Id avp Value (null if avp not set)

Returns:
session id avp of message

getApplicationId

long getApplicationId()
Return ApplicationId value from message header

Returns:
ApplicationId value from message header

getApplicationIdAvps

java.util.Set<ApplicationId> getApplicationIdAvps()
Returns set of Application-Id avps (Auth-Application-Id, Acc-Appplication-Id and Vendor-Specific-Application-Id avps) from message

Returns:
set of Application-Id avps

getHopByHopIdentifier

long getHopByHopIdentifier()
The Hop-by-Hop Identifier is an unsigned 32-bit integer field (in network byte order) and aids in matching requests and replies. The sender MUST ensure that the Hop-by-Hop identifier in a request is unique on a given connection at any given time, and MAY attempt to ensure that the number is unique across reboots.

Returns:
hop by hop indentifier from header of message

getEndToEndIdentifier

long getEndToEndIdentifier()
The End-to-End Identifier is an unsigned 32-bit integer field (in network byte order) and is used to detect duplicate messages. Upon reboot implementations MAY set the high order 12 bits to contain the low order 12 bits of current time, and the low order 20 bits to a random value. Senders of request messages MUST insert a unique identifier on each message.

Returns:
end to end indentifier from header of message

getAvps

AvpSet getAvps()
Returns:
Set of message Avps


Copyright © 2010. All Rights Reserved.