Skip navigation links

Oracle Communications Converged Application Server Java API Reference
5.0

E18767-01


com.bea.wcp.diameter
Class MessageException

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

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AvpException

public class MessageException
extends DiameterException

Exception raised if an invalid Diameter message has been encountered.

See Also:
Serialized Form

Constructor Summary
MessageException(ResultCode rc)
          Creates a new MessageException for the specified ResultCode and a default error message based on the result code.
MessageException(ResultCode rc, java.lang.String msg)
          Creates a new MessageException for the specified ResultCode and error message.

 

Method Summary
 Answer createAnswer(Request req)
          Creates a new Answer message for an invalid Request.
 ResultCode getResultCode()
          Returns the ResultCode indicating the error.
static MessageException unableToComply(java.lang.String msg)
          Convenience method to return a new UNABLE_TO_COMPLY MessageException.

 

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

MessageException

public MessageException(ResultCode rc,
                        java.lang.String msg)
Creates a new MessageException for the specified ResultCode and error message.
Parameters:
rc - the Diameter result code
msg - the error message

MessageException

public MessageException(ResultCode rc)
Creates a new MessageException for the specified ResultCode and a default error message based on the result code.
Parameters:
rc - the Diameter result code

Method Detail

getResultCode

public ResultCode getResultCode()
Returns the ResultCode indicating the error.

createAnswer

public Answer createAnswer(Request req)
Creates a new Answer message for an invalid Request. The result code for the error will be included in the Answer, as well an Error-Message AVP for the error message.
Parameters:
req - the Request that was invalid
Returns:
the error Answer for the request

unableToComply

public static MessageException unableToComply(java.lang.String msg)
Convenience method to return a new UNABLE_TO_COMPLY MessageException.
Parameters:
msg - the error cause
Returns:
the new MessageException

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.