org.apache.catalina.tribes
Class ChannelException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.catalina.tribes.ChannelException
All Implemented Interfaces:
java.io.Serializable

public class ChannelException
extends java.lang.Exception

Channel Exception
A channel exception is thrown when an internal error happens somewhere in the channel.
When a global error happens, the cause can be retrieved using getCause()

If an application is sending a message and some of the recipients fail to receive it, the application can retrieve what recipients failed by using the getFaultyMembers() method. This way, an application will always know if a message was delivered successfully or not.

Version:
$Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
Author:
Filip Hanik
See Also:
Serialized Form

Nested Class Summary
static class ChannelException.FaultyMember
          Title: FaultyMember class Description: Represent a failure to a specific member when a message was sent to more than one member
 
Constructor Summary
ChannelException()
          Constructor, creates a ChannelException
ChannelException(java.lang.String message)
          Constructor, creates a ChannelException with an error message
ChannelException(java.lang.String message, java.lang.Throwable cause)
          Constructor, creates a ChannelException with an error message and a cause
ChannelException(java.lang.Throwable cause)
          Constructor, creates a ChannelException with a cause
 
Method Summary
 void addFaultyMember(ChannelException.FaultyMember mbr)
          Adds a faulty member
 void addFaultyMember(ChannelException.FaultyMember[] mbrs)
          Adds a list of faulty members
 void addFaultyMember(Member mbr, java.lang.Exception x)
          Adds a faulty member, and the reason the member failed.
 ChannelException.FaultyMember[] getFaultyMembers()
          Returns an array of members that failed and the reason they failed.
 java.lang.String getMessage()
          Returns the message for this exception
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

ChannelException

public ChannelException()
Constructor, creates a ChannelException

See Also:
Exception.Exception()

ChannelException

public ChannelException(java.lang.String message)
Constructor, creates a ChannelException with an error message

See Also:
Exception.Exception(String)

ChannelException

public ChannelException(java.lang.String message,
                        java.lang.Throwable cause)
Constructor, creates a ChannelException with an error message and a cause

Parameters:
message - String
cause - Throwable
See Also:
Exception.Exception(String,Throwable)

ChannelException

public ChannelException(java.lang.Throwable cause)
Constructor, creates a ChannelException with a cause

Parameters:
cause - Throwable
See Also:
Exception.Exception(Throwable)
Method Detail

getMessage

public java.lang.String getMessage()
Returns the message for this exception

Overrides:
getMessage in class java.lang.Throwable
Returns:
String
See Also:
Throwable.getMessage()

addFaultyMember

public void addFaultyMember(Member mbr,
                            java.lang.Exception x)
Adds a faulty member, and the reason the member failed.

Parameters:
mbr - Member
x - Exception

addFaultyMember

public void addFaultyMember(ChannelException.FaultyMember[] mbrs)
Adds a list of faulty members

Parameters:
mbrs - FaultyMember[]

addFaultyMember

public void addFaultyMember(ChannelException.FaultyMember mbr)
Adds a faulty member

Parameters:
mbr - FaultyMember

getFaultyMembers

public ChannelException.FaultyMember[] getFaultyMembers()
Returns an array of members that failed and the reason they failed.

Returns:
FaultyMember[]


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.