Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vladimir Blagojevic
committed
Oct 20, 2011
1 parent
225b2c0
commit e7b1a2b
Showing
21 changed files
with
851 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,43 @@ | ||
|
||
package org.jgroups; | ||
|
||
|
||
/** | ||
* Allows a listener to be notified when important channel events occur. For example, when | ||
* a channel is closed, a PullPushAdapter can be notified, and stop accordingly. | ||
* Allows a listener to be notified when an important channel lifecycle event occurs. | ||
* <p> | ||
* | ||
* Usually clients do not need to implement ChannelListener interface. However, this interface can | ||
* useful in scenarios when an application opens multiple channels and needs to tracks major | ||
* lifecycle events on those channels from a single location or in scenarios when channel is wrapped | ||
* by JGroups building block installed on top of a channel (RpcDispatcher etc) while a client needs | ||
* to be notified about major channel lifecycle events. | ||
* | ||
* @see Channel#addChannelListener(ChannelListener) | ||
* @see Channel#removeChannelListener(ChannelListener) | ||
* @see Channel#clearChannelListeners() | ||
* | ||
* @author Bela Ban | ||
* @since 2.0 | ||
* | ||
*/ | ||
public interface ChannelListener { | ||
void channelConnected(Channel channel); | ||
void channelDisconnected(Channel channel); | ||
void channelClosed(Channel channel); | ||
|
||
/** | ||
* Channel has been connected notification callback | ||
* | ||
* @param channel the channel that has been connected | ||
*/ | ||
void channelConnected(Channel channel); | ||
|
||
/** | ||
* Channel has been disconnected notification callback | ||
* | ||
* @param channel the disconnected channel | ||
*/ | ||
void channelDisconnected(Channel channel); | ||
|
||
/** | ||
* Channel has been closed notification callback | ||
* | ||
* @param channel the closed channel | ||
*/ | ||
void channelClosed(Channel channel); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.