Class SSCode
- java.lang.Object
-
- com.opencloud.util.AbstractDataObject
-
- com.opencloud.util.AbstractFieldsObject
-
- AbstractEncodedDataObject<T>
-
- AbstractLazyEncodedDataObject<T>
-
- AbstractLazyEncodedNamedInteger<SSCode.EncodedValue>
-
- com.opencloud.slee.resources.in.datatypes.map.SSCode
-
- All Implemented Interfaces:
DataObject
,FastSerializable
,Serializable
public final class SSCode extends AbstractLazyEncodedNamedInteger<SSCode.EncodedValue> implements FastSerializable
Class SSCode encapsulates a Supplementary Service Code. It represents the ASN.1 OCTET STRING type MAP-SS-Code.SS-Code.The API offered by this class is as if the type were specified in ASN.1 as follows.
SSCode ::= SEQUENCE { encodedValue EncodedValue }
EncodedValue is a NamedInteger. For each named value of the type,
n
, the API defines three Java static fields: aDataObject n
, aNamedInteger EncodedValue.n
, and anint EncodedValue._n
.The encoding is based on the value definitions in ASN.1 module MAP-SS-Code in 3GPP TS 29.002 V10.0.0 (2010-09) pp405-407.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SSCode.EncodedValue
SSCode constants.
-
Field Summary
Fields Modifier and Type Field Description static SSCode
ALL_ADDITIONAL_INFO_TRANSFER_SS
all additional information transfer SSstatic SSCode
ALL_BARRING_SS
all barring SSstatic SSCode
ALL_CALL_COMPLETION_SS
all Call completion SSstatic SSCode
ALL_CALL_OFFERING_SS
all call offering SS includes also all forwarding SSstatic SSCode
ALL_CALL_PRIORITY_SS
all call priority SSstatic SSCode
ALL_CHARGING_SS
all charging SSstatic SSCode
ALL_COMMUNITY_OF_INTEREST_SS
all community of interest SSstatic SSCode
ALL_COND_FORWARDING_SS
all conditional forwarding SSstatic SSCode
ALL_FORWARDING_SS
all forwarding SSstatic SSCode
ALL_LCS_PRIVACY_EXCEPTION
all LCS Privacy Exception Classesstatic SSCode
ALL_LINE_IDENTIFICATION_SS
all line identification SSstatic SSCode
ALL_MOLR_SS
all Mobile Originating Location Request Classesstatic SSCode
ALL_MULTIPARTY_SS
all multiparty SSstatic SSCode
ALL_NAME_IDENTIFICATION_SS
all name identification SSstatic SSCode
ALL_PLMN_SPECIFIC_SS
static SSCode
ALL_SS
all SSstatic SSCode
AOCC
advice of charge chargingstatic SSCode
AOCI
advice of charge informationstatic SSCode
AUTONOMOUS_SELF_LOCATION
allow an MS to perform self location without interaction with the PLMN for a predetermined period of timestatic SSCode
BAC_ROAM
barring of incoming calls when roaming outside home PLMN Countrystatic SSCode
BAIC
barring of all incoming callsstatic SSCode
BAOC
barring of all outgoing callsstatic SSCode
BARRING_OF_INCOMING_CALLS
barring of incoming callsstatic SSCode
BARRING_OF_OUTGOING_CALLS
barring of outgoing callsstatic SSCode
BASIC_SELF_LOCATION
allow an MS to request its own locationstatic SSCode
BOIC
barring of outgoing international callsstatic SSCode
BOIC_EX_HC
barring of outgoing international calls except those directed to the home PLMNstatic SSCode
CALL_SESSION_RELATED
allow location by any value added LCS client to which a call/session is established from the target MSstatic SSCode
CALL_SESSION_UNRELATED
allow location by designated external value added LCS clientsstatic SSCode
CCBS_A
completion of call to busy subscribers, originating sidestatic SSCode
CCBS_B
completion of call to busy subscribers, destination sidestatic SSCode
CD
call deflectionstatic SSCode
CFB
call forwarding on mobile subscriber busystatic SSCode
CFNRC
call forwarding on mobile subscriber not reachablestatic SSCode
CFNRY
call forwarding on no replystatic SSCode
CFU
call forwarding unconditionalstatic SSCode
CLIP
calling line identification presentationstatic SSCode
CLIR
calling line identification restrictionstatic SSCode
CNAP
calling name presentationstatic SSCode
COLP
connected line identification presentationstatic SSCode
COLR
connected line identification restrictionstatic SSCode
CUG
closed user groupstatic SSCode
CW
call waitingstatic SSCode
ECT
explicit call transferstatic SSCode
EMLPP
enhanced Multilevel Precedence Pre-emption (EMLPP) servicestatic SSCode
HOLD
call holdstatic SSCode
MAH
mobile access huntingstatic SSCode
MC
multicallstatic SSCode
MCI
malicious call identificationstatic SSCode
MULTIPTY
multipartystatic SSCode
PLMN_OPERATOR
allow location by designated PLMN operator LCS clientsstatic SSCode
PLMN_SPECIFIC_SS_1
static SSCode
PLMN_SPECIFIC_SS_2
static SSCode
PLMN_SPECIFIC_SS_3
static SSCode
PLMN_SPECIFIC_SS_4
static SSCode
PLMN_SPECIFIC_SS_5
static SSCode
PLMN_SPECIFIC_SS_6
static SSCode
PLMN_SPECIFIC_SS_7
static SSCode
PLMN_SPECIFIC_SS_8
static SSCode
PLMN_SPECIFIC_SS_9
static SSCode
PLMN_SPECIFIC_SS_A
static SSCode
PLMN_SPECIFIC_SS_B
static SSCode
PLMN_SPECIFIC_SS_C
static SSCode
PLMN_SPECIFIC_SS_D
static SSCode
PLMN_SPECIFIC_SS_E
static SSCode
PLMN_SPECIFIC_SS_F
static SSCode
TRANSFER_TOP_THIRD_PARTY
allow an MS to request transfer of its location to another LCS clientstatic SSCode
UNIVERSAL
allow location by any LCS clientstatic SSCode
UUS1
UUS1 user-to-user signallingstatic SSCode
UUS2
UUS2 user-to-user signallingstatic SSCode
UUS3
UUS3 user-to-user signalling-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
isDecoded
-
Fields inherited from class com.opencloud.slee.resources.cgin.AbstractEncodedDataObject
encoded
-
Fields inherited from class com.opencloud.util.AbstractFieldsObject
FIELD_ABSENT, FIELD_UNINITIALISED
-
-
Constructor Summary
Constructors Constructor Description SSCode()
Constructs a new SSCode object with no fields set.SSCode(byte[] data)
Constructs a new SSCode object from network-encoded data.SSCode(byte[] data, int start, int len)
Constructs a new SSCode object from part of network-encoded data.SSCode(int arg)
Constructs a new SSCode object from the given int, making it be read-only (immutable).SSCode(SSCode.EncodedValue encodedValue)
Constructs a new SSCode object from given values for all fields.SSCode(DataInput in)
Constructs a new SSCode object from data deserialized from a stream that was written bytoStream(DataOutput)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkFieldsSet()
Checks that all mandatory fields are present.SSCode
clone()
Constructs a copy of this object and everything reachable from it.static SSCode
copyOf(SSCode 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.protected SSCode.EncodedValue
fromValue(int value)
Converts an int to a NamedInteger.byte[]
getByteArrayForm()
Gets the byte array encoded form.SSCode.EncodedValue
getEncodedForm()
Gets the encoded form.SSCode.EncodedValue
getEncodedValue()
Gets the value of the SSCode value.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.boolean
hasEncodedValue()
Tests whether the field EncodedValue has a value.SSCode
setEncodedValue(SSCode.EncodedValue value)
Sets the value of the SSCode value.void
toStream(DataOutput out)
Serializes this object to a stream in a form suitable for reading bySSCode(DataInput)
.-
Methods inherited from class com.opencloud.slee.resources.cgin.AbstractLazyEncodedDataObject
checkDecode, checkModifyAndDecode
-
Methods inherited from class com.opencloud.util.AbstractFieldsObject
equals, hashCode, toString
-
Methods inherited from class com.opencloud.util.AbstractDataObject
checkModify, isReadOnly, setReadOnly
-
-
-
-
Field Detail
-
ALL_SS
public static final SSCode ALL_SS
all SS
-
ALL_LINE_IDENTIFICATION_SS
public static final SSCode ALL_LINE_IDENTIFICATION_SS
all line identification SS
-
CLIP
public static final SSCode CLIP
calling line identification presentation
-
CLIR
public static final SSCode CLIR
calling line identification restriction
-
COLP
public static final SSCode COLP
connected line identification presentation
-
COLR
public static final SSCode COLR
connected line identification restriction
-
MCI
public static final SSCode MCI
malicious call identification
-
ALL_NAME_IDENTIFICATION_SS
public static final SSCode ALL_NAME_IDENTIFICATION_SS
all name identification SS
-
CNAP
public static final SSCode CNAP
calling name presentation
-
ALL_FORWARDING_SS
public static final SSCode ALL_FORWARDING_SS
all forwarding SS
-
CFU
public static final SSCode CFU
call forwarding unconditional
-
ALL_COND_FORWARDING_SS
public static final SSCode ALL_COND_FORWARDING_SS
all conditional forwarding SS
-
CFB
public static final SSCode CFB
call forwarding on mobile subscriber busy
-
CFNRY
public static final SSCode CFNRY
call forwarding on no reply
-
CFNRC
public static final SSCode CFNRC
call forwarding on mobile subscriber not reachable
-
CD
public static final SSCode CD
call deflection
-
ALL_CALL_OFFERING_SS
public static final SSCode ALL_CALL_OFFERING_SS
all call offering SS includes also all forwarding SS
-
ECT
public static final SSCode ECT
explicit call transfer
-
MAH
public static final SSCode MAH
mobile access hunting
-
ALL_CALL_COMPLETION_SS
public static final SSCode ALL_CALL_COMPLETION_SS
all Call completion SS
-
CW
public static final SSCode CW
call waiting
-
HOLD
public static final SSCode HOLD
call hold
-
CCBS_A
public static final SSCode CCBS_A
completion of call to busy subscribers, originating side
-
CCBS_B
public static final SSCode CCBS_B
completion of call to busy subscribers, destination side
-
MC
public static final SSCode MC
multicall
-
ALL_MULTIPARTY_SS
public static final SSCode ALL_MULTIPARTY_SS
all multiparty SS
-
MULTIPTY
public static final SSCode MULTIPTY
multiparty
-
ALL_COMMUNITY_OF_INTEREST_SS
public static final SSCode ALL_COMMUNITY_OF_INTEREST_SS
all community of interest SS
-
CUG
public static final SSCode CUG
closed user group
-
ALL_CHARGING_SS
public static final SSCode ALL_CHARGING_SS
all charging SS
-
AOCI
public static final SSCode AOCI
advice of charge information
-
AOCC
public static final SSCode AOCC
advice of charge charging
-
ALL_ADDITIONAL_INFO_TRANSFER_SS
public static final SSCode ALL_ADDITIONAL_INFO_TRANSFER_SS
all additional information transfer SS
-
UUS1
public static final SSCode UUS1
UUS1 user-to-user signalling
-
UUS2
public static final SSCode UUS2
UUS2 user-to-user signalling
-
UUS3
public static final SSCode UUS3
UUS3 user-to-user signalling
-
ALL_BARRING_SS
public static final SSCode ALL_BARRING_SS
all barring SS
-
BARRING_OF_OUTGOING_CALLS
public static final SSCode BARRING_OF_OUTGOING_CALLS
barring of outgoing calls
-
BAOC
public static final SSCode BAOC
barring of all outgoing calls
-
BOIC
public static final SSCode BOIC
barring of outgoing international calls
-
BOIC_EX_HC
public static final SSCode BOIC_EX_HC
barring of outgoing international calls except those directed to the home PLMN
-
BARRING_OF_INCOMING_CALLS
public static final SSCode BARRING_OF_INCOMING_CALLS
barring of incoming calls
-
BAIC
public static final SSCode BAIC
barring of all incoming calls
-
BAC_ROAM
public static final SSCode BAC_ROAM
barring of incoming calls when roaming outside home PLMN Country
-
ALL_CALL_PRIORITY_SS
public static final SSCode ALL_CALL_PRIORITY_SS
all call priority SS
-
EMLPP
public static final SSCode EMLPP
enhanced Multilevel Precedence Pre-emption (EMLPP) service
-
ALL_LCS_PRIVACY_EXCEPTION
public static final SSCode ALL_LCS_PRIVACY_EXCEPTION
all LCS Privacy Exception Classes
-
UNIVERSAL
public static final SSCode UNIVERSAL
allow location by any LCS client
-
CALL_SESSION_RELATED
public static final SSCode CALL_SESSION_RELATED
allow location by any value added LCS client to which a call/session is established from the target MS
-
CALL_SESSION_UNRELATED
public static final SSCode CALL_SESSION_UNRELATED
allow location by designated external value added LCS clients
-
PLMN_OPERATOR
public static final SSCode PLMN_OPERATOR
allow location by designated PLMN operator LCS clients
-
ALL_MOLR_SS
public static final SSCode ALL_MOLR_SS
all Mobile Originating Location Request Classes
-
BASIC_SELF_LOCATION
public static final SSCode BASIC_SELF_LOCATION
allow an MS to request its own location
-
AUTONOMOUS_SELF_LOCATION
public static final SSCode AUTONOMOUS_SELF_LOCATION
allow an MS to perform self location without interaction with the PLMN for a predetermined period of time
-
TRANSFER_TOP_THIRD_PARTY
public static final SSCode TRANSFER_TOP_THIRD_PARTY
allow an MS to request transfer of its location to another LCS client
-
ALL_PLMN_SPECIFIC_SS
public static final SSCode ALL_PLMN_SPECIFIC_SS
-
PLMN_SPECIFIC_SS_1
public static final SSCode PLMN_SPECIFIC_SS_1
-
PLMN_SPECIFIC_SS_2
public static final SSCode PLMN_SPECIFIC_SS_2
-
PLMN_SPECIFIC_SS_3
public static final SSCode PLMN_SPECIFIC_SS_3
-
PLMN_SPECIFIC_SS_4
public static final SSCode PLMN_SPECIFIC_SS_4
-
PLMN_SPECIFIC_SS_5
public static final SSCode PLMN_SPECIFIC_SS_5
-
PLMN_SPECIFIC_SS_6
public static final SSCode PLMN_SPECIFIC_SS_6
-
PLMN_SPECIFIC_SS_7
public static final SSCode PLMN_SPECIFIC_SS_7
-
PLMN_SPECIFIC_SS_8
public static final SSCode PLMN_SPECIFIC_SS_8
-
PLMN_SPECIFIC_SS_9
public static final SSCode PLMN_SPECIFIC_SS_9
-
PLMN_SPECIFIC_SS_A
public static final SSCode PLMN_SPECIFIC_SS_A
-
PLMN_SPECIFIC_SS_B
public static final SSCode PLMN_SPECIFIC_SS_B
-
PLMN_SPECIFIC_SS_C
public static final SSCode PLMN_SPECIFIC_SS_C
-
PLMN_SPECIFIC_SS_D
public static final SSCode PLMN_SPECIFIC_SS_D
-
PLMN_SPECIFIC_SS_E
public static final SSCode PLMN_SPECIFIC_SS_E
-
PLMN_SPECIFIC_SS_F
public static final SSCode PLMN_SPECIFIC_SS_F
-
-
Constructor Detail
-
SSCode
public SSCode()
Constructs a new SSCode object with no fields set.
-
SSCode
public SSCode(byte[] data)
Constructs a new SSCode object from network-encoded data. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded data- Throws:
NullPointerException
- if data is null
-
SSCode
public SSCode(byte[] data, int start, int len)
Constructs a new SSCode object from part of network-encoded data. The part starts at indexstart
and islen
bytes long. The data is not decoded and might not be decodable.- Parameters:
data
- network-encoded datastart
- starting offset of network-encoded data in byte arraylen
- default length if not predictable- Throws:
NullPointerException
- if data is nullIllegalArgumentException
- if len is negative
-
SSCode
public SSCode(SSCode.EncodedValue encodedValue)
Constructs a new SSCode object from given values for all fields.- Parameters:
encodedValue
- the SSCode value
-
SSCode
public SSCode(int arg)
Constructs a new SSCode object from the given int, making it be read-only (immutable).- Parameters:
arg
- int
-
SSCode
public SSCode(DataInput in) throws IOException
Constructs a new SSCode object from data deserialized from a stream that was written bytoStream(DataOutput)
.- Parameters:
in
- the stream to read from- Throws:
EOFException
- if reading is pre-empted by end-of-fileIOException
- if the data cannot be read
-
-
Method Detail
-
toStream
public void toStream(DataOutput out) throws IOException
Serializes this object to a stream in a form suitable for reading bySSCode(DataInput)
.- Specified by:
toStream
in interfaceFastSerializable
- Parameters:
out
- the stream to write to- Throws:
IOException
- if an I/O error occurs
-
hasEncodedValue
public boolean hasEncodedValue() throws DecodeException
Tests whether the field EncodedValue has a value.- Returns:
- whether the field has a value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
checkFieldsSet
public void checkFieldsSet() throws EncodeException
Checks that all mandatory fields are present. Should be called immediately before all calls to encode().- Specified by:
checkFieldsSet
in classAbstractLazyEncodedDataObject<SSCode.EncodedValue>
- Throws:
EncodeException
- if any mandatory field is not present
-
getEncodedValue
public SSCode.EncodedValue getEncodedValue() throws DecodeException
Gets the value of the SSCode value.- Returns:
- EncodedValue representation of the SSCode value
- Throws:
DecodeException
- if encoded state cannot be decoded
-
setEncodedValue
public SSCode setEncodedValue(SSCode.EncodedValue value) throws IllegalStateException
Sets the value of the SSCode value.- Parameters:
value
- EncodedValue representation of the SSCode value- Returns:
- this
- Throws:
IllegalStateException
-
copyOf
public static SSCode copyOf(SSCode 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.- Parameters:
from
- the object from which to copy- Returns:
- SSCode
-
clone
public SSCode clone()
Constructs a copy of this object and everything reachable from it.- Specified by:
clone
in interfaceDataObject
- Specified by:
clone
in classAbstractDataObject
- Returns:
- copy of object
-
getFieldAccessors
public static FieldAccessor[] getFieldAccessors()
Gets a new array of the accessors for fields of this type.- Returns:
- FieldAccessor[]
-
getFieldsMap
public Map<String,Object> getFieldsMap(boolean withAbsents)
Gets a Map from field-name to field-value for the fields of a sequence. For a field of primitive type, the field-value is boxed. For an absent optional field, the field-value is AbstractFieldsObject.FIELD_ABSENT. For an uninitialised mandatory field, the field-value is AbstractFieldsObject.FIELD_UNINITIALISED. For a field of String type, the encoded form is used if the String cannot be decoded. For a type that represents an OCTET STRING that cannot be decoded, a map from "encodedValue" to the byte array value is returned.- Specified by:
getFieldsMap
in classAbstractFieldsObject
- Parameters:
withAbsents
- whether to put absent optional fields into Map- Returns:
- Map from field-name to field-value
-
encodedIsInvalid
protected boolean encodedIsInvalid()
Determines whether the encoded form is invalid.- Returns:
- boolean
-
getEncodedForm
public SSCode.EncodedValue getEncodedForm() throws EncodeException
Gets the encoded form.- Returns:
- encoded form
- Throws:
EncodeException
- if encoding fails
-
getByteArrayForm
public byte[] getByteArrayForm() throws EncodeException
Gets the byte array encoded form. The size of the array is the least of 1, 2, 4, or 8 according to the type's bounds. The most significant byte of the numeric value is in the lowest indexed byte of the array.- Returns:
- byte array form
- Throws:
EncodeException
- if encoding fails
-
fromValue
protected SSCode.EncodedValue fromValue(int value)
Converts an int to a NamedInteger. Reuses any existing instance where possible.- Specified by:
fromValue
in classAbstractLazyEncodedNamedInteger<SSCode.EncodedValue>
- Parameters:
value
- int- Returns:
- NamedInteger
-
encode
protected void encode() throws EncodeException
Computes the encoded form from the decoded form.- Specified by:
encode
in classAbstractLazyEncodedDataObject<SSCode.EncodedValue>
- Throws:
EncodeException
- if EncodedValue is not in range [0,255]
-
decode
protected void decode() throws DecodeException
Computes the decoded form from the encoded form.- Specified by:
decode
in classAbstractLazyEncodedDataObject<SSCode.EncodedValue>
- Throws:
DecodeException
- if decoding fails
-
-