org.jdiameter.common.impl.validation
Class MessageRepresentationImpl
java.lang.Object
org.jdiameter.common.impl.validation.MessageRepresentationImpl
- All Implemented Interfaces:
- MessageRepresentation
public class MessageRepresentationImpl
- extends java.lang.Object
- implements MessageRepresentation
This class represents message/command in validation framework. It contains
basic info about command along with avp list - their multiplicity and
allowance.
- Since:
- 1.5.4.0-build404
- Author:
- Bartosz Baranowski , Alexandre Mendonca
|
Method Summary |
java.lang.Object |
clone()
|
int |
compareTo(MessageRepresentation o)
|
boolean |
equals(java.lang.Object obj)
|
long |
getApplicationId()
|
AvpRepresentation |
getAvp(int code)
|
AvpRepresentation |
getAvp(int code,
long vendorId)
|
int |
getCommandCode()
|
java.util.Map<AvpRepresentation,AvpRepresentation> |
getMessageAvps()
|
java.lang.String |
getName()
|
int |
hashCode()
|
boolean |
isAllowed(int code)
|
boolean |
isAllowed(int code,
long vendorId)
|
boolean |
isCountValidForMultiplicity(AvpSet destination,
int code)
|
boolean |
isCountValidForMultiplicity(AvpSet destination,
int code,
int numberToAdd)
|
boolean |
isCountValidForMultiplicity(AvpSet destination,
int code,
long vendorId)
|
boolean |
isCountValidForMultiplicity(AvpSet destination,
int code,
long vendorId,
int numberToAdd)
|
boolean |
isCountValidForMultiplicity(int code,
int avpCount)
|
boolean |
isCountValidForMultiplicity(int code,
long vendorId,
int avpCount)
|
boolean |
isRequest()
|
void |
setMessageAvps(java.util.Map<AvpRepresentation,AvpRepresentation> messageAvps)
|
java.lang.String |
toString()
|
void |
validate(Message msg,
ValidatorLevel validatorLevel)
|
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
unmuttableMessageAvps
protected java.util.Map<AvpRepresentation,AvpRepresentation> unmuttableMessageAvps
MessageRepresentationImpl
public MessageRepresentationImpl(int commandCode,
long applicationId,
boolean isRequest)
MessageRepresentationImpl
public MessageRepresentationImpl(int commandCode,
boolean isRequest)
MessageRepresentationImpl
public MessageRepresentationImpl(int commandCode,
long applicationId,
boolean isRequest,
java.lang.String name)
MessageRepresentationImpl
public MessageRepresentationImpl(MessageRepresentationImpl clone)
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
getMessageAvps
public java.util.Map<AvpRepresentation,AvpRepresentation> getMessageAvps()
- Specified by:
getMessageAvps in interface MessageRepresentation
setMessageAvps
public void setMessageAvps(java.util.Map<AvpRepresentation,AvpRepresentation> messageAvps)
getCommandCode
public int getCommandCode()
- Specified by:
getCommandCode in interface MessageRepresentation
getApplicationId
public long getApplicationId()
- Specified by:
getApplicationId in interface MessageRepresentation
isRequest
public boolean isRequest()
- Specified by:
isRequest in interface MessageRepresentation
getName
public java.lang.String getName()
- Specified by:
getName in interface MessageRepresentation
getAvp
public AvpRepresentation getAvp(int code)
- Specified by:
getAvp in interface MessageRepresentation
getAvp
public AvpRepresentation getAvp(int code,
long vendorId)
- Specified by:
getAvp in interface MessageRepresentation
isAllowed
public boolean isAllowed(int code,
long vendorId)
- Specified by:
isAllowed in interface MessageRepresentation
isAllowed
public boolean isAllowed(int code)
- Specified by:
isAllowed in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(int code,
int avpCount)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(int code,
long vendorId,
int avpCount)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(AvpSet destination,
int code,
long vendorId)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(AvpSet destination,
int code)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(AvpSet destination,
int code,
long vendorId,
int numberToAdd)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(AvpSet destination,
int code,
int numberToAdd)
- Specified by:
isCountValidForMultiplicity in interface MessageRepresentation
compareTo
public int compareTo(MessageRepresentation o)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
validate
public void validate(Message msg,
ValidatorLevel validatorLevel)
throws AvpNotAllowedException
- Specified by:
validate in interface MessageRepresentation
- Throws:
AvpNotAllowedException
Copyright © 2014. All Rights Reserved.