Java Doc for GossipRouter.java in  » Net » JGroups-2.4.1-sp3 » org » jgroups » stack » 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 » Net » JGroups 2.4.1 sp3 » org.jgroups.stack 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jgroups.stack.GossipRouter

GossipRouter
public class GossipRouter (Code)
Router for TCP based group comunication (using layer TCP instead of UDP). Instead of the TCP layer sending packets point-to-point to each other member, it sends the packet to the router which - depending on the target address - multicasts or unicasts it to the group / or single member.

This class is especially interesting for applets which cannot directly make connections (neither UDP nor TCP) to a host different from the one they were loaded from. Therefore, an applet would create a normal channel plus protocol stack, but the bottom layer would have to be the TCP layer which sends all packets point-to-point (over a TCP connection) to the router, which in turn forwards them to their end location(s) (also over TCP). A centralized router would therefore have to be running on the host the applet was loaded from.

An alternative for running JGroups in an applet (IP multicast is not allows in applets as of 1.2), is to use point-to-point UDP communication via the gossip server. However, then the appplet has to be signed which involves additional administrative effort on the part of the user.


author:
   Bela Ban
author:
   Ovidiu Feodorov
since:
   2.1.1


Inner Class :class AddressEntry
Inner Class :class SocketThread extends Thread

Field Summary
final public static  byteCONNECT
    
final public static  byteDISCONNECT
    
final public static  byteDUMP
    
final public static  longEXPIRY_TIME
    
final public static  byteGET_RSP
    
final public static  byteGOSSIP_GET
    
final public static  longGOSSIP_REQUEST_TIMEOUT
    
final public static  intPORT
    
final public static  byteREGISTER
    
final public static  byteROUTER_GET
    
final public static  longROUTING_CLIENT_REPLY_TIMEOUT
    
final public static  byteSHUTDOWN
    
final public static  byteUNREGISTER
    
final protected  Loglog
    
 Timertimer
    

Constructor Summary
public  GossipRouter()
    
public  GossipRouter(int port)
    
public  GossipRouter(int port, String bindAddressString)
    
public  GossipRouter(int port, String bindAddressString, long expiryTime)
    
public  GossipRouter(int port, String bindAddressString, long expiryTime, long gossipRequestTimeout, long routingClientReplyTimeout)
    

Method Summary
public  voidcreate()
     JBoss MBean lifecycle operation.
public  voiddestroy()
     JBoss MBean lifecycle operation.
public  StringdumpRoutingTable()
    
public  StringgetBindAddress()
    
public  longgetExpiryTime()
    
public  longgetGossipRequestTimeout()
    
public  intgetPort()
    
public  longgetRoutingClientReplyTimeout()
    
static  voidhelp()
    
public  booleanisDiscardLoopbacks()
    
public  booleanisStarted()
    
public static  voidmain(String[] args)
    
public  voidsetBindAddress(String bindAddress)
    
public  voidsetDiscardLoopbacks(boolean discard_loopbacks)
    
public  voidsetExpiryTime(long expiryTime)
    
public  voidsetGossipRequestTimeout(long gossipRequestTimeout)
    
public  voidsetPort(int port)
    
public  voidsetRoutingClientReplyTimeout(long routingClientReplyTimeout)
    
public  voidstart()
     JBoss MBean lifecycle operation.
public  voidstop()
     JBoss MBean lifecycle operation.
public static  Stringtype2String(int type)
    

Field Detail
CONNECT
final public static byte CONNECT(Code)



DISCONNECT
final public static byte DISCONNECT(Code)



DUMP
final public static byte DUMP(Code)



EXPIRY_TIME
final public static long EXPIRY_TIME(Code)



GET_RSP
final public static byte GET_RSP(Code)



GOSSIP_GET
final public static byte GOSSIP_GET(Code)



GOSSIP_REQUEST_TIMEOUT
final public static long GOSSIP_REQUEST_TIMEOUT(Code)



PORT
final public static int PORT(Code)



REGISTER
final public static byte REGISTER(Code)



ROUTER_GET
final public static byte ROUTER_GET(Code)



ROUTING_CLIENT_REPLY_TIMEOUT
final public static long ROUTING_CLIENT_REPLY_TIMEOUT(Code)



SHUTDOWN
final public static byte SHUTDOWN(Code)



UNREGISTER
final public static byte UNREGISTER(Code)



log
final protected Log log(Code)



timer
Timer timer(Code)




Constructor Detail
GossipRouter
public GossipRouter()(Code)



GossipRouter
public GossipRouter(int port)(Code)



GossipRouter
public GossipRouter(int port, String bindAddressString)(Code)



GossipRouter
public GossipRouter(int port, String bindAddressString, long expiryTime)(Code)



GossipRouter
public GossipRouter(int port, String bindAddressString, long expiryTime, long gossipRequestTimeout, long routingClientReplyTimeout)(Code)




Method Detail
create
public void create() throws Exception(Code)
JBoss MBean lifecycle operation.



destroy
public void destroy()(Code)
JBoss MBean lifecycle operation.



dumpRoutingTable
public String dumpRoutingTable()(Code)



getBindAddress
public String getBindAddress()(Code)



getExpiryTime
public long getExpiryTime()(Code)



getGossipRequestTimeout
public long getGossipRequestTimeout()(Code)



getPort
public int getPort()(Code)



getRoutingClientReplyTimeout
public long getRoutingClientReplyTimeout()(Code)



help
static void help()(Code)



isDiscardLoopbacks
public boolean isDiscardLoopbacks()(Code)



isStarted
public boolean isStarted()(Code)



main
public static void main(String[] args) throws Exception(Code)



setBindAddress
public void setBindAddress(String bindAddress)(Code)



setDiscardLoopbacks
public void setDiscardLoopbacks(boolean discard_loopbacks)(Code)



setExpiryTime
public void setExpiryTime(long expiryTime)(Code)



setGossipRequestTimeout
public void setGossipRequestTimeout(long gossipRequestTimeout)(Code)



setPort
public void setPort(int port)(Code)



setRoutingClientReplyTimeout
public void setRoutingClientReplyTimeout(long routingClientReplyTimeout)(Code)



start
public void start() throws Exception(Code)
JBoss MBean lifecycle operation. Called after create(). When this method is called, the managed attributes have already been set.
Brings the Router in fully functional state.



stop
public void stop()(Code)
JBoss MBean lifecycle operation. The JMX agent allways calls this method before destroy(). Close connections and frees resources.



type2String
public static String type2String(int type)(Code)



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.