public final class ServiceIDLookupImpl extends java.lang.Object implements ServiceIDLookup, java.io.Serializable
Constructor and Description |
---|
ServiceIDLookupImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
long |
getIDForName(java.lang.String name)
Lookup the numerical identifier which is currently mapped to a particular service name in the
DiameterCharging service's serviceID configuration.
|
long[] |
getIds() |
java.lang.String[] |
getNames() |
java.lang.String |
getServiceNameForID(long id)
Lookup the name which is currently mapped to a particular service ID in the
DiameterCharging service's service ID configuration.
|
int |
hashCode() |
java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Long>> |
iterator() |
void |
put(long id,
java.lang.String name)
Used by the codec to decode an id/name entry.
|
void |
setNewConfiguration(long[] ids,
java.lang.String[] names)
Re-initialize the configuration with a new set of IDs and names.
|
java.lang.String |
toString() |
public java.lang.String getServiceNameForID(long id)
ServiceIDLookup
getServiceNameForID
in interface ServiceIDLookup
id
- The service ID as it appears in the MSCC's 'serviceIDs' AVPnull
if there
is currently no name mapped to the ID.public long getIDForName(java.lang.String name)
ServiceIDLookup
getIDForName
in interface ServiceIDLookup
name
- The service name as it is used e.g. by the promotion features to identify a service-1
if there
is currently no name mapped to the ID.public java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Long>> iterator()
iterator
in interface java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.Long>>
public void setNewConfiguration(long[] ids, java.lang.String[] names)
ids
- The list of numeric IDs. If null
, 'names' has to be null
as well.names
- The list of human readable names. If null
, 'ids' has to be null
as well.java.lang.IllegalArgumentException
- If the two lists are of unequal length or just one
of them is null
.public void put(long id, java.lang.String name)
id
- name
- public java.lang.String[] getNames()
public long[] getIds()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © OpenCloud. All Rights Reserved.