Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.diameter
Class AvpException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.bea.wcp.diameter.DiameterException
              extended by com.bea.wcp.diameter.MessageException
                  extended by com.bea.wcp.diameter.AvpException

All Implemented Interfaces:
java.io.Serializable

public class AvpException
extends MessageException

Exception raised if an invalid AVP was encountered in a Diameter message.

See Also:
Serialized Form

Constructor Summary
AvpException(ResultCode rc, Attribute attr)
          Creates a new AvpException for the specified ResultCode and missing AVP.
AvpException(ResultCode rc, Avp invalidAvp)
          Creates a new AvpException for the specified ResultCode and invalid AVP.
AvpException(ResultCode rc, Avp[] invalidAvps)
          Creates a new AvpException for the specified ResultCode and invalid AVPs.

 

Method Summary
 void addInvalidAvp(Avp avp)
          Adds an additional AVP to the list of failed AVPs.
 void addMissingAvp(Attribute attr)
          Adds an additional missing AVP to the list of failed AVPs.
static AvpException avpOccursTooManyTimes(Avp avp)
          Convenience method to return an AvpException indicating that the specified AVP occurs too many times in the message.
static AvpException contradictingAvps(Avp avp1, Avp avp2)
          Convenience method to return an AvpException indicating indicating contradicting AVPs in a message.
 Answer createAnswer(Request req)
          Creates a new Answer message for a Request that contained invalid AVPs.
 Avp getFailedAvp()
           
 AvpList getFailedAvps()
          Returns the list of failed AVPs for this exception.
static AvpException invalidAvpLength(Avp avp)
          Convenience method to return an AvpException indicating that the length of the specified AVP was invalid.
static AvpException invalidAvpValue(Avp avp)
          Convenience method to return an AvpException indicating that the value of the specified AVP was invalid.
static AvpException missingAvp(Attribute attr)
           

 

Methods inherited from class com.bea.wcp.diameter.MessageException
getResultCode, unableToComply

 

Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

AvpException

public AvpException(ResultCode rc,
                    Avp invalidAvp)
Creates a new AvpException for the specified ResultCode and invalid AVP.
Parameters:
rc - the error ResultCode
invalidAvp - the invalid (failed) AVP to be included

AvpException

public AvpException(ResultCode rc,
                    Avp[] invalidAvps)
Creates a new AvpException for the specified ResultCode and invalid AVPs.
Parameters:
rc - the error ResultCode
invalidAvps - the the list of invalid (failed) AVPs to be included

AvpException

public AvpException(ResultCode rc,
                    Attribute attr)
Creates a new AvpException for the specified ResultCode and missing AVP.
Parameters:
rc - the error ResultCode
attr - the Attribute for the missing AVP

Method Detail

addInvalidAvp

public void addInvalidAvp(Avp avp)
Adds an additional AVP to the list of failed AVPs.
Parameters:
avp - the failed AVP to be added

addMissingAvp

public void addMissingAvp(Attribute attr)
Adds an additional missing AVP to the list of failed AVPs.
Parameters:
attr - the Attribute for the missing AVP

getFailedAvps

public AvpList getFailedAvps()
Returns the list of failed AVPs for this exception.

getFailedAvp

public Avp getFailedAvp()

createAnswer

public Answer createAnswer(Request req)
Creates a new Answer message for a Request that contained invalid AVPs. The failed AVPs will be included in the answer as well as AVPs for the error result code and error message.
Overrides:
createAnswer in class MessageException
Parameters:
req - the Request that was invalid
Returns:
the Answer message indicating one or more invalid AVPs

avpOccursTooManyTimes

public static AvpException avpOccursTooManyTimes(Avp avp)
Convenience method to return an AvpException indicating that the specified AVP occurs too many times in the message.

missingAvp

public static AvpException missingAvp(Attribute attr)

invalidAvpLength

public static AvpException invalidAvpLength(Avp avp)
Convenience method to return an AvpException indicating that the length of the specified AVP was invalid.

invalidAvpValue

public static AvpException invalidAvpValue(Avp avp)
Convenience method to return an AvpException indicating that the value of the specified AVP was invalid.

contradictingAvps

public static AvpException contradictingAvps(Avp avp1,
                                             Avp avp2)
Convenience method to return an AvpException indicating indicating contradicting AVPs in a message.

Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


Copyright © 2005, 2010, Oracle and/or its affiliates. All rights reserved.