public interface Dictionary
| Modifier and Type | Method and Description |
|---|---|
void |
configure(InputStream is)
Configures dictionary.
|
AvpRepresentation |
getAvp(int code)
Fetches Avp representation for given code.
|
AvpRepresentation |
getAvp(int code,
long vendorId)
Fetches Avp representation for given code and vendorId.
|
AvpRepresentation |
getAvp(String avpName)
Fetches Avp representation for given name.
|
MessageRepresentation |
getMessage(int commandCode,
boolean isRequest) |
MessageRepresentation |
getMessage(int commandCode,
long applicationId,
boolean isRequest) |
ValidatorLevel |
getReceiveLevel()
Gets validator level for INCOMING messages.
|
ValidatorLevel |
getSendLevel()
Gets validator level for OUTGOING messages.
|
boolean |
isConfigured()
Gets whether validator is configured.
|
boolean |
isEnabled()
Gets whether validator is enabled.
|
void |
setEnabled(boolean enabled)
Sets whether validator is enabled.
|
void |
setReceiveLevel(ValidatorLevel receiveLevel)
Sets validator level for INCOMING messages.
|
void |
setSendLevel(ValidatorLevel sendLevel)
Gets validator level for OUTGOING messages.
|
void |
validate(Message message,
boolean incoming)
Performs validation according to configured levels
|
AvpRepresentation getAvp(int code)
code - - positive integer, equal to AVP code.AvpRepresentation getAvp(int code, long vendorId)
code - - positive integer, equal to AVP code.vendorId - - positive long representing vendor code.AvpRepresentation getAvp(String avpName)
name - - name of AVP, like Session-Id.MessageRepresentation getMessage(int commandCode, boolean isRequest)
commandCode - - command code of messageisRequest - - switches if lookup searches for request or answerMessageRepresentation getMessage(int commandCode, long applicationId, boolean isRequest)
commandCode - - command code of messageapplicationId - - application id present in message headerisRequest - - switches if lookup searches for request or answervoid configure(InputStream is)
is - boolean isEnabled()
void setEnabled(boolean enabled)
enabled - true to enable the validator, false to disable itboolean isConfigured()
ValidatorLevel getSendLevel()
ValidatorLevelValidatorLevel representing the current levelvoid setSendLevel(ValidatorLevel sendLevel)
ValidatorLevelsendLevel - an instance of ValidatorLevel representing the new levelValidatorLevel getReceiveLevel()
ValidatorLevelValidatorLevel representing the current levelvoid setReceiveLevel(ValidatorLevel receiveLevel)
ValidatorLevelreceiveLevel - an instance of ValidatorLevel representing the new levelvoid validate(Message message, boolean incoming) throws AvpNotAllowedException
message - - message we want to validateincoming - - flag indicating if #message is incoming message or outgoing.AvpNotAllowedException - - in case validation fails. Exception has details(avp code and similar) about failure.Copyright © 2016. All Rights Reserved.