org.apache.catalina.tribes

Class ChannelException

public class ChannelException extends 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: 532400 $, $Date: 2007-04-25 18:16:37 +0200 (Wed, 25 Apr 2007) $

Author: Filip Hanik

Nested Class Summary
static classChannelException.FaultyMember

Title: FaultyMember class

Description: Represent a failure to a specific member when a message was sent to more than one member

Field Summary
protected static ChannelException.FaultyMember[]EMPTY_LIST
Empty list to avoid reinstatiating lists
Constructor Summary
ChannelException()
Constructor, creates a ChannelException
ChannelException(String message)
Constructor, creates a ChannelException with an error message
ChannelException(String message, Throwable cause)
Constructor, creates a ChannelException with an error message and a cause
ChannelException(Throwable cause)
Constructor, creates a ChannelException with a cause
Method Summary
booleanaddFaultyMember(Member mbr, Exception x)
Adds a faulty member, and the reason the member failed.
intaddFaultyMember(ChannelException.FaultyMember[] mbrs)
Adds a list of faulty members
booleanaddFaultyMember(ChannelException.FaultyMember mbr)
Adds a faulty member
ChannelException.FaultyMember[]getFaultyMembers()
Returns an array of members that failed and the reason they failed.
StringgetMessage()
Returns the message for this exception

Field Detail

EMPTY_LIST

protected static final ChannelException.FaultyMember[] EMPTY_LIST
Empty list to avoid reinstatiating lists

Constructor Detail

ChannelException

public ChannelException()
Constructor, creates a ChannelException

See Also: java.lang.Exception#Exception()

ChannelException

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

See Also: java.lang.Exception#Exception(String)

ChannelException

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

Parameters: message String cause Throwable

See Also: java.lang.Exception#Exception(String,Throwable)

ChannelException

public ChannelException(Throwable cause)
Constructor, creates a ChannelException with a cause

Parameters: cause Throwable

See Also: java.lang.Exception#Exception(Throwable)

Method Detail

addFaultyMember

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

Parameters: mbr Member x Exception

addFaultyMember

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

Parameters: mbrs FaultyMember[]

addFaultyMember

public boolean 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[]

getMessage

public String getMessage()
Returns the message for this exception

Returns: String

See Also: java.lang.Exception#getMessage()

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