You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2006/05/05 23:01:13 UTC
svn commit: r400171 - in
/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes:
ChannelMessage.java UniqueId.java package.html
Author: fhanik
Date: Fri May 5 14:01:12 2006
New Revision: 400171
URL: http://svn.apache.org/viewcvs?rev=400171&view=rev
Log:
Updated docs
Modified:
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/UniqueId.java
tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/package.html
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java?rev=400171&r1=400170&r2=400171&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelMessage.java Fri May 5 14:01:12 2006
@@ -19,6 +19,9 @@
import org.apache.catalina.tribes.io.XByteBuffer;
/**
+ * Message that is passed through the interceptor stack after the
+ * data serialized in the Channel object and then passed down to the
+ * interceptor and eventually down to the ChannelSender component
* @author Filip Hanik
*
*/
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/UniqueId.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/UniqueId.java?rev=400171&r1=400170&r2=400171&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/UniqueId.java (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/UniqueId.java Fri May 5 14:01:12 2006
@@ -25,7 +25,7 @@
* @author Filip Hanik
* @version 1.0
*/
-public class UniqueId {
+public final class UniqueId {
protected byte[] id;
public UniqueId() {
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/package.html
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/package.html?rev=400171&r1=400170&r2=400171&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/package.html (original)
+++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/package.html Fri May 5 14:01:12 2006
@@ -1,11 +1,70 @@
<body>
+<head><title>Apache Tribes - The Tomcat Cluster Communication Module</title>
+<h3>QuickStart</h3>
+ <pre><code>
+ //create a channel
+ Channel myChannel = new GroupChannel();
-<p>This package contains code for Clustering, the base class
-of a Cluster is <code>org.apache.catalina.Cluster</code> implementations
-of this class is done when implementing a new Cluster protocol</p>
-
-<p>The only Cluster protocol currently implemented is a JavaGroups based<br>
- <b>JGCluster.java</b>
-</p>
+ //create my listeners
+ MyMessageListener msgListener = new MyMessageListener();
+ MyMemberListener mbrListener = new MyMemberListener();
+ //attach the listeners to the channel
+ myChannel.addMembershipListener(mbrListener);
+ myChannel.addChannelListener(msgListener);
+
+ //start the channel
+ myChannel.start(Channel.DEFAULT);
+
+ //create a message to be sent, message must implement java.io.Serializable
+ //for performance reasons you probably want them to implement java.io.Externalizable
+ Serializable myMsg = new MyMessage();
+
+ //retrieve my current members
+ Member[] group = myChannel.getMembers();
+
+ //send the message
+ channel.send(group,myMsg,Channel.SEND_OPTIONS_DEFAULT);
+
+ </code></pre>
+<h3>Interfaces for the Application Developer</h3>
+ <ol>
+ <li><code>org.apache.catalina.tribes.Channel</code>
+ Main component to interact with to send messages
+ </li>
+ <li><code>org.apache.catalina.tribes.MembershipListener</code>
+ Listen to membership changes
+ </li>
+ <li><code>org.apache.catalina.tribes.ChannelListener</code>
+ Listen to data messages
+ </li>
+ <li><code>org.apache.catalina.tribes.Member</code>
+ Identifies a node, implementation specific, default is org.apache.catalina.tribes.membership.MemberImpl
+ </li>
+ </ol>
+ <h3>Interfaces for the Tribes Component Developer</h3>
+ <ol>
+ <li><code>org.apache.catalina.tribes.Channel</code>
+ Main component to that the application interacts with
+ </li>
+ <li><code>org.apache.catalina.tribes.ChannelReceiver</code>
+ IO Component to receive messages over some network transport
+ </li>
+ <li><code>org.apache.catalina.tribes.ChannelSender</code>
+ IO Component to send messages over some network transport
+ </li>
+ <li><code>org.apache.catalina.tribes.MembershipService</code>
+ IO Component that handles membership discovery and
+ </li>
+ <li><code>org.apache.catalina.tribes.ChannelInterceptor</code>
+ interceptors between the Channel and the IO layer
+ </li>
+ <li><code>org.apache.catalina.tribes.ChannelMessage</code>
+ The message that is sent through the interceptor stack down to the IO layer
+ </li>
+
+ <li><code>org.apache.catalina.tribes.Member</code>
+ Identifies a node, implementation specific to the underlying IO logic
+ </li>
+ </ol>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org