Oracle Corp.

Oracle WebLogic Communications Server 10.1 API Reference


com.bea.wcp.diameter
Class MessageException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.bea.wcp.diameter.DiameterException
              extended bycom.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
Copyright © 2008 Oracle Corp. All Rights Reserved.

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)
Creates a new MessageException for the specified ResultCode and a default error message based on the result code.


MessageException

public MessageException(ResultCode rc,
                        java.lang.String msg)
Creates a new MessageException for the specified ResultCode and error message.

Method Detail

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

getResultCode

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


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

Documentation is available at
http://e-docs.bea.com/wlcp/wlss40/
Copyright 2008 Oracle Corp.