Java Doc for Configurator.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.Configurator

Configurator
public class Configurator (Code)
The task if this class is to setup and configure the protocol stack. A string describing the desired setup, which is both the layering and the configuration of each layer, is given to the configurator which creates and configures the protocol stack and returns a reference to the top layer (Protocol).

Future functionality will include the capability to dynamically modify the layering of the protocol stack and the properties of each layer.
author:
   Bela Ban


Inner Class :public class ProtocolConfiguration

Field Summary
final protected  Loglog
    


Method Summary
public  ProtocolcreateProtocol(String prot_spec, ProtocolStack stack)
     Creates a new protocol given the protocol specification.
public  ProtocolfindProtocol(Protocol prot_stack, String name)
    
public  ProtocolgetBottommostProtocol(Protocol prot_stack)
    
public  voidinitProtocolStack(Protocol bottom_prot)
    
public  voidinsertProtocol(Protocol prot, int position, String neighbor_prot, ProtocolStack stack)
     Inserts an already created (and initialized) protocol into the protocol list.
public static  voidmain(String args)
    
public  VectorparseComponentStrings(String config_str, String delimiter)
     Get a string of the form "P1(config_str1):P2:P3(config_str3)" and return ProtocolConfigurations for it.
public  VectorparseConfigurations(String configuration)
    
 booleanprovidesDownServices(int start_index, Vector req_list, int evt_type)
    
 booleanprovidesUpServices(int end_index, Vector req_list, int evt_type)
    
public  voidremoveProtocol(String prot_name)
     Removes a protocol from the stack.
public  voidsanityCheck(Vector protocols)
     Throws an exception if sanity check fails.
public  ProtocolsetupProtocolStack(String configuration, ProtocolStack st)
     The configuration string has a number of entries, separated by a ':' (colon). Each entry consists of the name of the protocol, followed by an optional configuration of that protocol.
public  voidstartProtocolStack(Protocol bottom_prot)
    
public  voidstopProtocolStack(Protocol start_prot)
    

Field Detail
log
final protected Log log(Code)





Method Detail
createProtocol
public Protocol createProtocol(String prot_spec, ProtocolStack stack) throws Exception(Code)
Creates a new protocol given the protocol specification. Initializes the properties and starts the up and down handler threads.
Parameters:
  prot_spec - The specification of the protocol. Same convention as for specifying a protocol stack.An exception will be thrown if the class cannot be created. Example:
"VERIFY_SUSPECT(timeout=1500)"
Note that no colons (:) have to bespecified
Parameters:
  stack - The protocol stack Protocol The newly created protocol
exception:
  Exception - Will be thrown when the new protocol cannot be created



findProtocol
public Protocol findProtocol(Protocol prot_stack, String name)(Code)



getBottommostProtocol
public Protocol getBottommostProtocol(Protocol prot_stack)(Code)



initProtocolStack
public void initProtocolStack(Protocol bottom_prot) throws Exception(Code)



insertProtocol
public void insertProtocol(Protocol prot, int position, String neighbor_prot, ProtocolStack stack) throws Exception(Code)
Inserts an already created (and initialized) protocol into the protocol list. Sets the links to the protocols above and below correctly and adjusts the linked list of protocols accordingly.
Parameters:
  prot - The protocol to be inserted. Before insertion, a sanity check will ensure that noneof the existing protocols have the same name as the new protocol.
Parameters:
  position - Where to place the protocol with respect to the neighbor_prot (ABOVE, BELOW)
Parameters:
  neighbor_prot - The name of the neighbor protocol. An exception will be thrown if this nameis not found
Parameters:
  stack - The protocol stack
exception:
  Exception - Will be thrown when the new protocol cannot be created, or inserted.



main
public static void main(String args)(Code)



parseComponentStrings
public Vector parseComponentStrings(String config_str, String delimiter)(Code)
Get a string of the form "P1(config_str1):P2:P3(config_str3)" and return ProtocolConfigurations for it. That means, parse "P1(config_str1)", "P2" and "P3(config_str3)"
Parameters:
  config_str - Configuration string Vector of ProtocolConfigurations



parseConfigurations
public Vector parseConfigurations(String configuration) throws Exception(Code)
Return a number of ProtocolConfigurations in a vector
Parameters:
  configuration - protocol-stack configuration string Vector of ProtocolConfigurations



providesDownServices
boolean providesDownServices(int start_index, Vector req_list, int evt_type)(Code)
Checks whether any of the protocols 'above' start_index provide evt_type



providesUpServices
boolean providesUpServices(int end_index, Vector req_list, int evt_type)(Code)
Check whether any of the protocols 'below' end_index provide evt_type



removeProtocol
public void removeProtocol(String prot_name) throws Exception(Code)
Removes a protocol from the stack. Stops the protocol and readjusts the linked lists of protocols.
Parameters:
  prot_name - The name of the protocol. Since all protocol names in a stack have to be unique(otherwise the stack won't be created), the name refers to just 1 protocol.
exception:
  Exception - Thrown if the protocol cannot be stopped correctly.



sanityCheck
public void sanityCheck(Vector protocols) throws Exception(Code)
Throws an exception if sanity check fails. Possible sanity check is uniqueness of all protocol names.



setupProtocolStack
public Protocol setupProtocolStack(String configuration, ProtocolStack st) throws Exception(Code)
The configuration string has a number of entries, separated by a ':' (colon). Each entry consists of the name of the protocol, followed by an optional configuration of that protocol. The configuration is enclosed in parentheses, and contains entries which are name/value pairs connected with an assignment sign (=) and separated by a semicolon.
UDP(in_port=5555;out_port=4445):FRAG(frag_size=1024)

The first entry defines the bottommost layer, the string is parsed left to right and the protocol stack constructed bottom up. Example: the string "UDP(in_port=5555):FRAG(frag_size=32000):DEBUG" results is the following stack:

 -----------------------
 | DEBUG                 |
 |-----------------------|
 | FRAG frag_size=32000  |
 |-----------------------|
 | UDP in_port=32000     |
 -----------------------
 



startProtocolStack
public void startProtocolStack(Protocol bottom_prot)(Code)



stopProtocolStack
public void stopProtocolStack(Protocol start_prot)(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.