public final class ExtForwOptions extends ForwardingOptions implements FastSerializable
The API offered by this class is as if the type were specified in ASN.1 as follows.
Ext-ForwOptions ::= SEQUENCE {
notificationToForwardingParty BOOLEAN,
redirectingPresentation BOOLEAN,
notificationToCallingParty BOOLEAN,
forwardingReason ForwardingReason
}
The class takes care of encoding the field values into a byte-array
and decoding field values from a byte-array,
the encoded representation being as tabulated below.
| Data Encoding - based on comment in ASN.1 module MAP-MS-DataTypes in 3GPP TS 29.002 V10.0.0 (2010-09) p369 | ||||||||
|---|---|---|---|---|---|---|---|---|
| 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | |
| Octet 1 | Notification to forwarding party? | Redirecting presentation? | Notification to calling party? | 0 | Forwarding reason | 0 | 0 | |
| 0 to 4 more octets | Reserved for future use | |||||||
ForwardingOptions.ForwardingReasonisDecodedencodedFIELD_ABSENT, FIELD_UNINITIALISED| Constructor and Description |
|---|
ExtForwOptions()
Constructs a new ExtForwOptions object with no fields set.
|
ExtForwOptions(boolean notificationToForwardingParty,
boolean redirectingPresentation,
boolean notificationToCallingParty,
ForwardingOptions.ForwardingReason forwardingReason)
Constructs a new ExtForwOptions object from given values for all fields.
|
ExtForwOptions(byte[] data)
Constructs a new ExtForwOptions object from network-encoded data.
|
ExtForwOptions(byte[] data,
int start,
int len)
Constructs a new ExtForwOptions object from part of network-encoded data.
|
ExtForwOptions(DataInput in)
Constructs a new ExtForwOptions object from data deserialized from a stream that was written by
toStream(DataOutput). |
| Modifier and Type | Method and Description |
|---|---|
void |
checkFieldsSet()
Checks that all mandatory fields are present.
|
ExtForwOptions |
clone()
Constructs a copy of this object and everything reachable from it.
|
static ExtForwOptions |
copyOf(ExtForwOptions from)
Creates a new object of this type, cloning the values of common fields from the given object of any subclass of the same base type.
|
protected void |
decode()
Computes the decoded form from the encoded form.
|
protected void |
encode()
Computes the encoded form from the decoded form.
|
protected boolean |
encodedIsInvalid()
Determines whether the encoded form is invalid.
|
static int |
getContainedLength(byte[] data,
int start,
int len)
Determines the length of the encoded value that commences at offset
start in the given data. |
byte[] |
getEncodedForm()
Gets the encoded form.
|
static FieldAccessor[] |
getFieldAccessors()
Gets a new array of the accessors for fields of this type.
|
Map<String,Object> |
getFieldsMap(boolean withAbsents)
Gets a Map from field-name to field-value for the fields of a sequence.
|
ForwardingOptions.ForwardingReason |
getForwardingReason()
Gets the value of Forwarding reason.
|
boolean |
getNotificationToCallingParty()
Gets the value of Notification to calling party.
|
boolean |
getNotificationToForwardingParty()
Gets the value of Notification to forwarding party.
|
boolean |
getRedirectingPresentation()
Gets the value of Redirecting presentation.
|
boolean |
hasForwardingReason()
Tests whether the field ForwardingReason has a value.
|
boolean |
hasNotificationToCallingParty()
Tests whether the field NotificationToCallingParty has a value.
|
boolean |
hasNotificationToForwardingParty()
Tests whether the field NotificationToForwardingParty has a value.
|
boolean |
hasRedirectingPresentation()
Tests whether the field RedirectingPresentation has a value.
|
ExtForwOptions |
setForwardingReason(ForwardingOptions.ForwardingReason value)
Sets the value of Forwarding reason.
|
ExtForwOptions |
setNotificationToCallingParty(boolean value)
Sets the value of Notification to calling party.
|
ExtForwOptions |
setNotificationToCallingPartyPresent(boolean flag)
Sets the presence or absence of the field NotificationToCallingParty.
|
ExtForwOptions |
setNotificationToForwardingParty(boolean value)
Sets the value of Notification to forwarding party.
|
ExtForwOptions |
setNotificationToForwardingPartyPresent(boolean flag)
Sets the presence or absence of the field NotificationToForwardingParty.
|
ExtForwOptions |
setRedirectingPresentation(boolean value)
Sets the value of Redirecting presentation.
|
ExtForwOptions |
setRedirectingPresentationPresent(boolean flag)
Sets the presence or absence of the field RedirectingPresentation.
|
void |
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading by
ExtForwOptions(DataInput). |
copyOfcheckDecode, checkModifyAndDecodeequals, hashCode, toStringcheckModify, isReadOnly, setReadOnlypublic ExtForwOptions()
public ExtForwOptions(byte[] data)
data - network-encoded dataNullPointerException - if data is nullpublic ExtForwOptions(byte[] data,
int start,
int len)
start and is len bytes long.
The data is not decoded and might not be decodable.data - network-encoded datastart - starting offset of network-encoded data in byte arraylen - default length if not predictableNullPointerException - if data is nullIllegalArgumentException - if len is negativepublic ExtForwOptions(boolean notificationToForwardingParty,
boolean redirectingPresentation,
boolean notificationToCallingParty,
ForwardingOptions.ForwardingReason forwardingReason)
notificationToForwardingParty - Notification to forwarding partyredirectingPresentation - Redirecting presentationnotificationToCallingParty - Notification to calling partyforwardingReason - Forwarding reasonpublic ExtForwOptions(DataInput in) throws IOException
toStream(DataOutput).in - the stream to read fromEOFException - if reading is pre-empted by end-of-fileIOException - if the data cannot be readpublic void toStream(DataOutput out) throws IOException
ExtForwOptions(DataInput).toStream in interface FastSerializabletoStream in class ForwardingOptionsout - the stream to write toIOException - if an I/O error occurspublic boolean hasNotificationToForwardingParty()
throws DecodeException
hasNotificationToForwardingParty in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic ExtForwOptions setNotificationToForwardingPartyPresent(boolean flag) throws IllegalStateException
setNotificationToForwardingPartyPresent in class ForwardingOptionsflag - whether the field should be marked as presentIllegalStateException - if this instance has been marked as read-onlypublic boolean hasRedirectingPresentation()
throws DecodeException
hasRedirectingPresentation in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic ExtForwOptions setRedirectingPresentationPresent(boolean flag) throws IllegalStateException
setRedirectingPresentationPresent in class ForwardingOptionsflag - whether the field should be marked as presentIllegalStateException - if this instance has been marked as read-onlypublic boolean hasNotificationToCallingParty()
throws DecodeException
hasNotificationToCallingParty in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic ExtForwOptions setNotificationToCallingPartyPresent(boolean flag) throws IllegalStateException
setNotificationToCallingPartyPresent in class ForwardingOptionsflag - whether the field should be marked as presentIllegalStateException - if this instance has been marked as read-onlypublic boolean hasForwardingReason()
throws DecodeException
hasForwardingReason in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic void checkFieldsSet()
throws EncodeException
checkFieldsSet in class ForwardingOptionsEncodeException - if any mandatory field is not presentpublic boolean getNotificationToForwardingParty()
throws DecodeException
getNotificationToForwardingParty in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic boolean getRedirectingPresentation()
throws DecodeException
getRedirectingPresentation in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic boolean getNotificationToCallingParty()
throws DecodeException
getNotificationToCallingParty in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic ForwardingOptions.ForwardingReason getForwardingReason() throws DecodeException
getForwardingReason in class ForwardingOptionsDecodeException - if encoded state cannot be decodedpublic ExtForwOptions setNotificationToForwardingParty(boolean value) throws IllegalStateException
setNotificationToForwardingParty in class ForwardingOptionsvalue - boolean representation of Notification to forwarding partyIllegalStateExceptionpublic ExtForwOptions setRedirectingPresentation(boolean value) throws IllegalStateException
setRedirectingPresentation in class ForwardingOptionsvalue - boolean representation of Redirecting presentationIllegalStateExceptionpublic ExtForwOptions setNotificationToCallingParty(boolean value) throws IllegalStateException
setNotificationToCallingParty in class ForwardingOptionsvalue - boolean representation of Notification to calling partyIllegalStateExceptionpublic ExtForwOptions setForwardingReason(ForwardingOptions.ForwardingReason value) throws IllegalStateException
setForwardingReason in class ForwardingOptionsvalue - ForwardingReason representation of Forwarding reasonIllegalStateExceptionpublic static ExtForwOptions copyOf(ExtForwOptions from)
from - the object from which to copypublic ExtForwOptions clone()
clone in interface DataObjectclone in class ForwardingOptionspublic static FieldAccessor[] getFieldAccessors()
public Map<String,Object> getFieldsMap(boolean withAbsents)
getFieldsMap in class ForwardingOptionswithAbsents - whether to put absent optional fields into Mapprotected boolean encodedIsInvalid()
encodedIsInvalid in class ForwardingOptionspublic byte[] getEncodedForm()
throws EncodeException
getEncodedForm in class ForwardingOptionsEncodeException - if encoding failspublic static int getContainedLength(byte[] data,
int start,
int len)
start in the given data.
The value is not fully decoded and might not be decodable.
If the encoded value ends with a filling field,
then the given len is returned.
If the encoded value is so currupt that its length cannot be determined,
then 0 is returned.data - network-encoded datastart - index into data where value commenceslen - length in data to be consideredNullPointerException - if data is nullprotected void encode()
encode in class ForwardingOptionsprotected void decode()
throws DecodeException
decode in class ForwardingOptionsDecodeException - if not between 1 and 5 octets to be decoded