org.iids.aos.exception
Class MessageException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.iids.aos.exception.MessageException
All Implemented Interfaces:
java.io.Serializable

public class MessageException
extends java.lang.Exception
implements java.io.Serializable

Class MessageException is used to report exceptions when sending multiple Messages at once (see API sendMessages()). The MessageException contains the cause of the Exception and an index indicating which message has caused the Exception.

See Also:
Serialized Form

Constructor Summary
MessageException(java.lang.String string, Envelope... envelopes)
           
MessageException(java.lang.String desc, java.util.List<Envelope> undeliverable)
           
MessageException(java.lang.String desc, java.lang.Throwable cause)
           
 
Method Summary
 java.util.List<Envelope> getUndeliverableMessages()
           
 boolean isLocalProblem()
          The flag isLocalProblem can be set so that the party that receives this message knows which side is causing the exception.
 MessageException setIsLocalProblem(boolean localProblem)
          Set a flag that defines if the problem is cause by the local side (sender) or the remote side (receiver(s)).
 
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(java.lang.String desc,
                        java.util.List<Envelope> undeliverable)

MessageException

public MessageException(java.lang.String string,
                        Envelope... envelopes)

MessageException

public MessageException(java.lang.String desc,
                        java.lang.Throwable cause)
Method Detail

getUndeliverableMessages

public java.util.List<Envelope> getUndeliverableMessages()

isLocalProblem

public boolean isLocalProblem()
The flag isLocalProblem can be set so that the party that receives this message knows which side is causing the exception. This way, the sender can find out which action to take based on whether this is a problem on the local or the remote site.

Returns:
true - if it is a local problem

setIsLocalProblem

public MessageException setIsLocalProblem(boolean localProblem)
Set a flag that defines if the problem is cause by the local side (sender) or the remote side (receiver(s)).

This is not part of the constructor, so that not all references need to be changed. This method returns this object, so it can be written in one go.

Parameters:
localProblem - A boolean indicating where the problem lies: a local handle or a remote handle (target unknown).
Returns:
This object.


Copyright © 2003, 2004 IIDS Group. All Rights Reserved.