Java Doc for McastService.java in  » Sevlet-Container » tomcat-cluster » org » apache » catalina » cluster » mcast » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 » tomcat cluster » org.apache.catalina.cluster.mcast 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.cluster.mcast.McastService

McastService
public class McastService implements MembershipService,MembershipListener(Code)
A membership implementation using simple multicast. This is the representation of a multicast membership service. This class is responsible for maintaining a list of active cluster nodes in the cluster. If a node fails to send out a heartbeat, the node will be dismissed.
author:
   Filip Hanik
version:
   $Revision: 1.11 $, $Date: 2004/05/26 16:36:03 $


Field Summary
protected  McastServiceImplimpl
    
protected  MembershipListenerlistener
    
protected  McastMemberlocalMember
    
protected  Propertiesproperties
    

Constructor Summary
public  McastService()
     Create a membership service.

Method Summary
public  voidaddMembershipListener(MembershipListener listener)
     Add a membership listener, this version only supports one listener per service, so calling this method twice will result in only the second listener being active.
public  MembergetLocalMember()
    
public  intgetMcastSoTimeout()
    
public  intgetMcastTTL()
    
public  Member[]getMembers()
    
public  PropertiesgetProperties()
    
protected  voidhasProperty(Properties properties, String name)
     Check if a required property is available.
public static  voidmain(String args)
    
public  voidmemberAdded(Member member)
    
public  voidmemberDisappeared(Member member)
    
public  voidremoveMembershipListener()
    
public  voidsetLocalMemberProperties(String listenHost, int listenPort)
    
public  voidsetMcastAddr(String addr)
    
public  voidsetMcastBindAddress(String bindaddr)
    
public  voidsetMcastDropTime(long time)
    
public  voidsetMcastFrequency(long time)
    
public  voidsetMcastPort(int port)
    
public  voidsetMcastSoTimeout(int mcastSoTimeout)
    
public  voidsetMcastTTL(int mcastTTL)
    
public  voidsetProperties(Properties properties)
     properties
All are required
1.
public  voidstart()
    
public  voidstart(int level)
    
public  voidstop()
    

Field Detail
impl
protected McastServiceImpl impl(Code)
A handle to the actual low level implementation



listener
protected MembershipListener listener(Code)
A membership listener delegate (should be the cluster :)



localMember
protected McastMember localMember(Code)
The local member



properties
protected Properties properties(Code)
The implementation specific properties




Constructor Detail
McastService
public McastService()(Code)
Create a membership service.




Method Detail
addMembershipListener
public void addMembershipListener(MembershipListener listener)(Code)
Add a membership listener, this version only supports one listener per service, so calling this method twice will result in only the second listener being active.
Parameters:
  listener - The listener



getLocalMember
public Member getLocalMember()(Code)
Return the local member



getMcastSoTimeout
public int getMcastSoTimeout()(Code)



getMcastTTL
public int getMcastTTL()(Code)



getMembers
public Member[] getMembers()(Code)
Return all the members



getProperties
public Properties getProperties()(Code)
Return the properties, see setProperties



hasProperty
protected void hasProperty(Properties properties, String name)(Code)
Check if a required property is available.
Parameters:
  properties - The set of properties
Parameters:
  name - The property to check for



main
public static void main(String args) throws Exception(Code)
Simple test program
Parameters:
  args - Command-line arguments
throws:
  Exception - If an error occurs



memberAdded
public void memberAdded(Member member)(Code)



memberDisappeared
public void memberDisappeared(Member member)(Code)
Callback from the impl when a new member has been received
Parameters:
  member - The member



removeMembershipListener
public void removeMembershipListener()(Code)
Remove the membership listener



setLocalMemberProperties
public void setLocalMemberProperties(String listenHost, int listenPort)(Code)
Sets the local member properties for broadcasting



setMcastAddr
public void setMcastAddr(String addr)(Code)



setMcastBindAddress
public void setMcastBindAddress(String bindaddr)(Code)



setMcastDropTime
public void setMcastDropTime(long time)(Code)



setMcastFrequency
public void setMcastFrequency(long time)(Code)



setMcastPort
public void setMcastPort(int port)(Code)



setMcastSoTimeout
public void setMcastSoTimeout(int mcastSoTimeout)(Code)



setMcastTTL
public void setMcastTTL(int mcastTTL)(Code)



setProperties
public void setProperties(Properties properties)(Code)
properties
All are required
1. mcastPort - the port to listen to
2. mcastAddress - the mcast group address
3. bindAddress - the bind address if any - only one that can be null
4. memberDropTime - the time a member is gone before it is considered gone.
5. msgFrequency - the frequency of sending messages
6. tcpListenPort - the port this member listens to
7. tcpListenHost - the bind address of this member

exception:
  java.lang.IllegalArgumentException - if a property is missing.



start
public void start() throws java.lang.Exception(Code)
Start broadcasting and listening to membership pings
throws:
  java.lang.Exception - if a IO error occurs



start
public void start(int level) throws java.lang.Exception(Code)



stop
public void stop()(Code)
Stop broadcasting and listening to membership pings



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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