org.jdiameter.common.impl.validation
Class VMessageRepresentation
java.lang.Object
org.jdiameter.common.impl.validation.VMessageRepresentation
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable<VMessageRepresentation>
public class VMessageRepresentation
- extends java.lang.Object
- implements java.lang.Comparable<VMessageRepresentation>, java.lang.Cloneable
Start time:10:40:36 2009-05-26
Project: diameter-parent
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.189
- Author:
- Bartosz Baranowski , Alexandre Mendonca
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
messageAvps
protected java.util.Map<VAvpRepresentation,VAvpRepresentation> messageAvps
VMessageRepresentation
public VMessageRepresentation(int commandCode,
long applicationId,
boolean isRequest)
VMessageRepresentation
public VMessageRepresentation(int commandCode,
long applicationId,
boolean isRequest,
java.lang.String name)
VMessageRepresentation
public VMessageRepresentation(VMessageRepresentation 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<VAvpRepresentation,VAvpRepresentation> getMessageAvps()
setMessageAvps
public void setMessageAvps(java.util.Map<VAvpRepresentation,VAvpRepresentation> messageAvps)
getCommandCode
public int getCommandCode()
getApplicationId
public long getApplicationId()
isRequest
public boolean isRequest()
getName
public java.lang.String getName()
validate
public void validate(org.jdiameter.api.Message msg,
ValidatorLevel validatorLevel)
throws JAvpNotAllowedException
- Valdiates messages in terms of contained avps. It checks against
deinftion if available if all requried avps are set, not allowed avps are
not present, and number of avps is correct.
- Parameters:
msg - validatorLevel -
- Throws:
JAvpNotAllowedException
validate
public void validate(org.jdiameter.api.AvpSet destination,
org.jdiameter.api.Avp avp)
compareTo
public int compareTo(VMessageRepresentation o)
- Specified by:
compareTo in interface java.lang.Comparable<VMessageRepresentation>
isCountValidForMultiplicity
public boolean isCountValidForMultiplicity(int code,
long vendorId,
int count)
- Parameters:
code - vendorId - count -
- Returns:
isAllowed
public boolean isAllowed(int code,
long vendorId)
- Parameters:
code - vendorId -
- Returns:
hasRepresentation
public boolean hasRepresentation(int avpCode,
long avpVendor)
- Parameters:
avpCode - avpVendor -
- Returns:
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
Copyright © 2010. All Rights Reserved.