org.apache.catalina.tribes

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.catalina.tribes 
org.apache.catalina.tribes
Apache Tribes - The Tomcat Cluster Communication Module

QuickStart


            //create a channel
            Channel myChannel = new GroupChannel();

            //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);

    

Interfaces for the Application Developer

  1. org.apache.catalina.tribes.Channel Main component to interact with to send messages
  2. org.apache.catalina.tribes.MembershipListener Listen to membership changes
  3. org.apache.catalina.tribes.ChannelListener Listen to data messages
  4. org.apache.catalina.tribes.Member Identifies a node, implementation specific, default is org.apache.catalina.tribes.membership.MemberImpl

Interfaces for the Tribes Component Developer

  1. org.apache.catalina.tribes.Channel Main component to that the application interacts with
  2. org.apache.catalina.tribes.ChannelReceiver IO Component to receive messages over some network transport
  3. org.apache.catalina.tribes.ChannelSender IO Component to send messages over some network transport
  4. org.apache.catalina.tribes.MembershipService IO Component that handles membership discovery and
  5. org.apache.catalina.tribes.ChannelInterceptor interceptors between the Channel and the IO layer
  6. org.apache.catalina.tribes.ChannelMessage The message that is sent through the interceptor stack down to the IO layer
  7. org.apache.catalina.tribes.Member Identifies a node, implementation specific to the underlying IO logic
Java Source File NameTypeComment
ByteMessage.javaClass A byte message is not serialized and deserialized by the channel instead it is sent as a byte array
By default Tribes uses java serialization when it receives an object to be sent over the wire.
Channel.javaInterface Channel interface
A channel is a representation of a group of nodes all participating in some sort of communication with each other.
The channel is the main API class for Tribes, this is essentially the only class that an application needs to be aware of.
ChannelException.javaClass Channel Exception
A channel exception is thrown when an internal error happens somewhere in the channel.
ChannelInterceptor.javaInterface A ChannelInterceptor is an interceptor that intercepts messages and membership messages in the channel stack. This allows interceptors to modify the message or perform other actions when a message is sent or received.
Interceptors are tied together in a linked list.
See Also:   org.apache.catalina.tribes.group.ChannelInterceptorBase
author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
ChannelListener.javaInterface

Title: ChannelListener

Description: An interface to listens to incoming messages from a channel

When a message is received, the Channel will invoke the channel listener in a conditional sequence. if ( listener.accept(msg,sender) ) listener.messageReceived(msg,sender);
A ChannelListener implementation MUST NOT return true on accept(Serializable, Member) if it doesn't intend to process the message.
ChannelMessage.javaInterface
ChannelReceiver.javaInterface ChannelReceiver Interface
The ChannelReceiver interface is the data receiver component at the bottom layer, the IO layer (for layers see the javadoc for the Channel interface). This class may optionally implement a thread pool for parallel processing of incoming messages.
author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
ChannelSender.javaInterface ChannelReceiver Interface
The ChannelSender interface is the data sender component at the bottom layer, the IO layer (for layers see the javadoc for the Channel interface).
The channel sender must support "silent" members, ie, be able to send a message to a member that is not in the membership, but is part of the destination parameter
author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
Constants.javaClass Manifest constants for the org.apache.catalina.tribes package.
author:
   Bip Thelin
author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
ErrorHandler.javaInterface The ErrorHandler class is used when sending messages that are sent asynchronously and the application still needs to get confirmation when the message was sent successfully or when a message errored out.
Heartbeat.javaInterface
ManagedChannel.javaInterface Channel interface A managed channel interface gives you access to the components of the channels such as senders, receivers, interceptors etc for configurations purposes
author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
Member.javaInterface The Member interface, defines a member in the group. Each member can carry a set of properties, defined by the actual implementation.
A member is identified by the host/ip/uniqueId
The host is what interface the member is listening to, to receive data
The port is what port the member is listening to, to receive data
The uniqueId defines the session id for the member.
MembershipListener.javaInterface The MembershipListener interface is used as a callback to the membership service.
MembershipService.javaInterface MembershipService Interface
The MembershipService interface is the membership component at the bottom layer, the IO layer (for layers see the javadoc for the Channel interface).

author:
   Filip Hanik
version:
   $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct.
MessageListener.javaInterface
RemoteProcessException.javaClass

Title: RemoteProcessException

Description: Message thrown by a sender when USE_SYNC_ACK receives a FAIL_ACK_COMMAND.
This means that the message was received on the remote node but the processing of the message failed.

UniqueId.javaClass
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.