public class ChannelException extends Exception
getCause()
getFaultyMembers()
method. This way, an application will always know if a message was delivered successfully or not.Modifier and Type | Class and Description |
---|---|
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
|
Modifier and Type | Field and Description |
---|---|
protected static ChannelException.FaultyMember[] |
EMPTY_LIST
Empty list to avoid reinstantiating lists
|
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
boolean |
addFaultyMember(ChannelException.FaultyMember mbr)
Adds a faulty member
|
int |
addFaultyMember(ChannelException.FaultyMember[] mbrs)
Adds a list of faulty members
|
boolean |
addFaultyMember(Member mbr,
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.
|
String |
getMessage()
Returns the message for this exception
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected static final ChannelException.FaultyMember[] EMPTY_LIST
public ChannelException()
Exception.Exception()
public ChannelException(String message)
Exception.Exception(String)
public ChannelException(String message, Throwable cause)
message
- Stringcause
- ThrowableException.Exception(String,Throwable)
public ChannelException(Throwable cause)
cause
- ThrowableException.Exception(Throwable)
public String getMessage()
getMessage
in class Throwable
Throwable.getMessage()
public boolean addFaultyMember(Member mbr, Exception x)
mbr
- Memberx
- Exceptionpublic int addFaultyMember(ChannelException.FaultyMember[] mbrs)
mbrs
- FaultyMember[]public boolean addFaultyMember(ChannelException.FaultyMember mbr)
mbr
- FaultyMemberpublic ChannelException.FaultyMember[] getFaultyMembers()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.