public class PreconditionFields extends Object implements Serializable
For one media description, precondition attributes should be only of one type (segmented or end-to-end)
3GPP TS 24.299,
IETF RFC3312 + RFC4032 (Precondition Mechanism). Serialization fix contributed by [email protected]Modifier and Type | Field and Description |
---|---|
static String[] |
DIRECTION |
static int |
DIRECTION_NONE |
static int |
DIRECTION_RECV |
static int |
DIRECTION_SEND |
static int |
DIRECTION_SENDRECV |
static String[] |
PRECONDITION |
static int |
PRECONDITION_QOS |
protected Vector |
preconditionAttributes |
static String[] |
STATUS |
static int |
STATUS_E2E |
static int |
STATUS_LOCAL |
static int |
STATUS_REMOTE |
static String[] |
STRENGTH |
static int |
STRENGTH_FAILURE |
static int |
STRENGTH_MANDATORY |
static int |
STRENGTH_NONE |
static int |
STRENGTH_OPTIONAL |
static int |
STRENGTH_UNKNOWN |
Constructor and Description |
---|
PreconditionFields()
Constructor
|
Modifier and Type | Method and Description |
---|---|
Vector |
getPreconditionConfirmStatus()
Get the attribute fields with the name "conf"
for confirmation precondition.
|
Vector |
getPreconditionCurr(String status)
Get the attribute fields with the name "curr"
for current precondition.
|
Vector |
getPreconditionDes(String status)
Get the attribute fields with the name "des"
for desired precondition
|
Vector |
getPreconditions()
Get Precondition
|
int |
getPreconditionSize()
Get the number of Precondition attributes
|
void |
setPreconditionConfirmStatus(String precondConfValue)
Set attribute line for confirmation precondition request, given
a string value encoded like the "conf" attribute value
|
void |
setPreconditionConfirmStatus(String status,
String direction)
IETF RFC3312
|
void |
setPreconditionCurr(String precondCurrValue)
Set attribute line for current precondition state, given
a string value encoded like the "curr" attribute value
|
void |
setPreconditionCurr(String status,
String directionTag)
Set the value of the attributes with the name "curr"
for current precondition.
|
void |
setPreconditionDes(String precondDesValue)
Set attribute line for desired precondition state, given
a string value encoded like the "des" attribute value
|
void |
setPreconditionDes(String strength,
String status,
String direction)
Set the value of the attributes with the name "des"
for desired precondition.
|
void |
setPreconditions(Vector preconditions)
Set Preconditions
|
protected Vector preconditionAttributes
public static final int STRENGTH_UNKNOWN
public static final int STRENGTH_FAILURE
public static final int STRENGTH_NONE
public static final int STRENGTH_OPTIONAL
public static final int STRENGTH_MANDATORY
public static final String[] STRENGTH
public static final int DIRECTION_NONE
public static final int DIRECTION_SEND
public static final int DIRECTION_RECV
public static final int DIRECTION_SENDRECV
public static final String[] DIRECTION
public static final int STATUS_E2E
public static final int STATUS_LOCAL
public static final int STATUS_REMOTE
public static final String[] STATUS
public static final int PRECONDITION_QOS
public static final String[] PRECONDITION
public int getPreconditionSize()
public Vector getPreconditions()
public void setPreconditions(Vector preconditions) throws SdpException
preconditions
- - vector with precondition attributesSdpException
- -- if precondition attributes is nullpublic void setPreconditionCurr(String precondCurrValue) throws SdpException
Set attribute line for current precondition state, given a string value encoded like the "curr" attribute value
precondCurrValue
- - a string with the value for a "curr" attributeSdpException
public void setPreconditionCurr(String status, String directionTag) throws SdpException
Set the value of the attributes with the name "curr" for current precondition.
- eg: a=curr:qos local none
If there is an attribute "curr" for the same status-type, the direction-tag is updated with the one supplied.
status
- - (local, remote, e2e)directionTag
- - (none, send, recv, sendrecv)SdpParseException
SdpException
public void setPreconditionDes(String precondDesValue) throws SdpException
Set attribute line for desired precondition state, given a string value encoded like the "des" attribute value
precondDesValue
- - a string with the value for a "des" attributeSdpException
public void setPreconditionDes(String strength, String status, String direction) throws SdpException
Set the value of the attributes with the name "des" for desired precondition.
- eg: a=des:qos mandatory remote sendrecv
There can be more than one desired precondition line for a status-type, specially if strength-tag is different.
If there is an attribute "des" for the same status-type, the strength-tag and direction-tag are updated with the ones supplied.
IETF RFC4032: strength should only be downgraded within SDP offers
strength
- - (none, optional,status
- - (local, remote, e2e)direction
- - (none, send, recv, sendrecv)SdpParseException
SdpException
public void setPreconditionConfirmStatus(String precondConfValue) throws SdpException
Set attribute line for confirmation precondition request, given a string value encoded like the "conf" attribute value
precondConfValue
- - a string with the value for a "conf" attributeSdpException
public void setPreconditionConfirmStatus(String status, String direction) throws SdpException
IETF RFC3312
"The confirmation status attribute carries threshold conditions for a media stream. When the status of network resources reach these conditions, the peer UA will send an update of the session description".
- eg: a=conf:qos remote sendrecv
status
- - (e2e, local, remote)direction
- - (none, send, recv, sendrecv)SdpException
- -- if param are nullpublic Vector getPreconditionCurr(String status) throws SdpException, SdpParseException
Get the attribute fields with the name "curr" for current precondition.
One attribute field per status-type. (eg: a=curr:qos local none)
status
- - (local, remote, e2e)SdpParseException
SdpException
public Vector getPreconditionDes(String status) throws SdpException, SdpParseException
Get the attribute fields with the name "des" for desired precondition
There can be more than one current precondition line for a status-type (with different direction-tag values), specially if strength-tag is different
status
- - (local, remote, e2e)SdpParseException
SdpException
public Vector getPreconditionConfirmStatus() throws SdpException
Get the attribute fields with the name "conf" for confirmation precondition.
IETF RFC3312
"The confirmation status attribute carries threshold conditions for a media stream. When the status of network resources reach these conditions, the peer UA will send an update of the session description".
(eg: a=conf:qos remote sendrecv)
SdpException
Copyright © 2016. All Rights Reserved.