Java Doc for SimpleTcpCluster.java in  » Sevlet-Container » tomcat-cluster » org » apache » catalina » cluster » tcp » 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.tcp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.cluster.tcp.SimpleTcpCluster

SimpleTcpCluster
public class SimpleTcpCluster implements CatalinaCluster,Lifecycle,MembershipListener,ListenCallback,LifecycleListener(Code)
A Cluster implementation using simple multicast. Responsible for setting up a cluster and provides callers with a valid multicast receiver/sender.
author:
   Filip Hanik
author:
   Remy Maucherat
version:
   $Revision: 1.41 $, $Date: 2004/06/04 20:22:27 $


Field Summary
protected  StringclusterImpName
    
protected  VectorclusterListeners
    
protected  StringclusterName
    
protected  Containercontainer
     The Container associated with this Cluster.
protected  intdebug
    
protected  booleanexpireSessionsOnShutdown
    
final protected static  Stringinfo
     Descriptive information about this component implementation.
protected  LifecycleSupportlifecycle
     The lifecycle event support for this component.
public static  org.apache.commons.logging.Loglog
    
protected  HashMapmanagers
     The context name <-> manager association for distributed contexts.
protected  MemberComparatormemberComparator
    
protected  MembershipServicemembershipService
    
protected  booleanprintToScreen
    
protected  StringManagersm
     The string manager for this package.
protected  booleanstarted
    
protected  PropertyChangeSupportsupport
     The property change support for this component.
protected  booleanuseDirtyFlag
    

Constructor Summary
public  SimpleTcpCluster()
    

Method Summary
public  voidaddClusterListener(MessageListener listener)
    
public  voidaddLifecycleListener(LifecycleListener listener)
     Add a lifecycle event listener to this component.
public  voidaddValve(Valve valve)
    
public synchronized  ManagercreateManager(String name)
    
public  LifecycleListener[]findLifecycleListeners()
     Get the lifecycle listeners associated with this lifecycle.
public  org.apache.catalina.cluster.ClusterDeployergetClusterDeployer()
    
public  StringgetClusterName()
     Return the name of the cluster that this Server is currently configured to operate within.
public  org.apache.catalina.cluster.ClusterReceivergetClusterReceiver()
    
public  org.apache.catalina.cluster.ClusterSendergetClusterSender()
    
public  ContainergetContainer()
    
public  intgetDebug()
    
public  StringgetInfo()
     Return descriptive information about this Cluster implementation and the corresponding version number, in the format <description>/<version>.
public  MembergetLocalMember()
     Return the member that represents this node.
public  LoggetLogger()
    
public  ManagergetManager(String name)
    
public  StringgetManagerClassName()
    
public  Member[]getMembers()
    
public  MembershipServicegetMembershipService()
    
public  StringgetProtocol()
     Returns the protocol.
public  voidinstallContext(String contextPath, URL war)
     Install a new web application, whose web application archive is at the specified URL, into this container with the specified context path. A context path of "" (the empty string) should be used for the root application for this container.
public  voidlifecycleEvent(LifecycleEvent lifecycleEvent)
    
public  voidmemberAdded(Member member)
    
public  voidmemberDisappeared(Member member)
    
public  voidmessageDataReceived(byte[] data)
    
public  voidremoveClusterListener(MessageListener listener)
    
public  voidremoveLifecycleListener(LifecycleListener listener)
     Remove a lifecycle event listener from this component.
public  voidremoveManager(String name)
    
public  voidsend(ClusterMessage msg, Member dest)
    
public  voidsend(ClusterMessage msg)
    
public  voidsetClusterDeployer(org.apache.catalina.cluster.ClusterDeployer clusterDeployer)
    
public  voidsetClusterName(String clusterName)
     Set the name of the cluster to join, if no cluster with this name is present create one.
public  voidsetClusterReceiver(org.apache.catalina.cluster.ClusterReceiver clusterReceiver)
    
public  voidsetClusterSender(org.apache.catalina.cluster.ClusterSender clusterSender)
    
public  voidsetContainer(Container container)
    
public  voidsetDebug(int debug)
    
public  voidsetExpireSessionsOnShutdown(boolean expireSessionsOnShutdown)
    
public  voidsetManagerClassName(String managerClassName)
    
public  voidsetMembershipService(MembershipService membershipService)
    
public  voidsetPrintToScreen(boolean printToScreen)
    
public  voidsetProtocol(String protocol)
     Sets the configurable protocol stack.
public  voidsetUseDirtyFlag(boolean useDirtyFlag)
    
public  voidstart()
     Prepare for the beginning of active use of the public methods of this component.
public  voidstartContext(String contextPath)
     Start an existing web application, attached to the specified context path in all the other nodes in the cluster.
public  voidstop()
     Gracefully terminate the active use of the public methods of this component.
public  voidstop(String contextPath)
     Stop an existing web application, attached to the specified context path.

Field Detail
clusterImpName
protected String clusterImpName(Code)
Name for logging purpose



clusterListeners
protected Vector clusterListeners(Code)
Listeners of messages



clusterName
protected String clusterName(Code)
The cluster name to join



container
protected Container container(Code)
The Container associated with this Cluster.



debug
protected int debug(Code)
The debug level for this Container



expireSessionsOnShutdown
protected boolean expireSessionsOnShutdown(Code)
Whether to expire sessions when shutting down



info
final protected static String info(Code)
Descriptive information about this component implementation.



lifecycle
protected LifecycleSupport lifecycle(Code)
The lifecycle event support for this component.



log
public static org.apache.commons.logging.Log log(Code)



managers
protected HashMap managers(Code)
The context name <-> manager association for distributed contexts.



memberComparator
protected MemberComparator memberComparator(Code)



membershipService
protected MembershipService membershipService(Code)
the service that provides the membership



printToScreen
protected boolean printToScreen(Code)
Print debug to std.out?



sm
protected StringManager sm(Code)
The string manager for this package.



started
protected boolean started(Code)
Has this component been started?



support
protected PropertyChangeSupport support(Code)
The property change support for this component.



useDirtyFlag
protected boolean useDirtyFlag(Code)
Replicate only sessions that have been marked dirty false=replicate sessions after each request




Constructor Detail
SimpleTcpCluster
public SimpleTcpCluster()(Code)




Method Detail
addClusterListener
public void addClusterListener(MessageListener listener)(Code)



addLifecycleListener
public void addLifecycleListener(LifecycleListener listener)(Code)
Add a lifecycle event listener to this component.
Parameters:
  listener - The listener to add



addValve
public void addValve(Valve valve)(Code)



createManager
public synchronized Manager createManager(String name)(Code)



findLifecycleListeners
public LifecycleListener[] findLifecycleListeners()(Code)
Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.



getClusterDeployer
public org.apache.catalina.cluster.ClusterDeployer getClusterDeployer()(Code)



getClusterName
public String getClusterName()(Code)
Return the name of the cluster that this Server is currently configured to operate within. The name of the cluster associated with this server



getClusterReceiver
public org.apache.catalina.cluster.ClusterReceiver getClusterReceiver()(Code)



getClusterSender
public org.apache.catalina.cluster.ClusterSender getClusterSender()(Code)



getContainer
public Container getContainer()(Code)
Get the Container associated with our Cluster The Container associated with our Cluster



getDebug
public int getDebug()(Code)
Get the debug level for this component The debug level



getInfo
public String getInfo()(Code)
Return descriptive information about this Cluster implementation and the corresponding version number, in the format <description>/<version>.



getLocalMember
public Member getLocalMember()(Code)
Return the member that represents this node. Member



getLogger
public Log getLogger()(Code)



getManager
public Manager getManager(String name)(Code)



getManagerClassName
public String getManagerClassName()(Code)



getMembers
public Member[] getMembers()(Code)



getMembershipService
public MembershipService getMembershipService()(Code)



getProtocol
public String getProtocol()(Code)
Returns the protocol.



installContext
public void installContext(String contextPath, URL war)(Code)
Install a new web application, whose web application archive is at the specified URL, into this container with the specified context path. A context path of "" (the empty string) should be used for the root application for this container. Otherwise, the context path must start with a slash.

If this application is successfully installed, a ContainerEvent of type PRE_INSTALL_EVENT will be sent to registered listeners before the associated Context is started, and a ContainerEvent of type INSTALL_EVENT will be sent to all registered listeners after the associated Context is started, with the newly created Context as an argument.
Parameters:
  contextPath - The context path to which this application shouldbe installed (must be unique)
Parameters:
  war - A URL of type "jar:" that points to a WAR file, or type"file:" that points to an unpacked directory structure containingthe web application to be installed
exception:
  IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash)
exception:
  IllegalStateException - if the specified context pathis already attached to an existing web application




lifecycleEvent
public void lifecycleEvent(LifecycleEvent lifecycleEvent)(Code)



memberAdded
public void memberAdded(Member member)(Code)



memberDisappeared
public void memberDisappeared(Member member)(Code)



messageDataReceived
public void messageDataReceived(byte[] data)(Code)



removeClusterListener
public void removeClusterListener(MessageListener listener)(Code)



removeLifecycleListener
public void removeLifecycleListener(LifecycleListener listener)(Code)
Remove a lifecycle event listener from this component.
Parameters:
  listener - The listener to remove



removeManager
public void removeManager(String name)(Code)



send
public void send(ClusterMessage msg, Member dest)(Code)



send
public void send(ClusterMessage msg)(Code)



setClusterDeployer
public void setClusterDeployer(org.apache.catalina.cluster.ClusterDeployer clusterDeployer)(Code)



setClusterName
public void setClusterName(String clusterName)(Code)
Set the name of the cluster to join, if no cluster with this name is present create one.
Parameters:
  clusterName - The clustername to join



setClusterReceiver
public void setClusterReceiver(org.apache.catalina.cluster.ClusterReceiver clusterReceiver)(Code)



setClusterSender
public void setClusterSender(org.apache.catalina.cluster.ClusterSender clusterSender)(Code)



setContainer
public void setContainer(Container container)(Code)
Set the Container associated with our Cluster
Parameters:
  container - The Container to use



setDebug
public void setDebug(int debug)(Code)
Set the debug level for this component
Parameters:
  debug - The debug level



setExpireSessionsOnShutdown
public void setExpireSessionsOnShutdown(boolean expireSessionsOnShutdown)(Code)



setManagerClassName
public void setManagerClassName(String managerClassName)(Code)



setMembershipService
public void setMembershipService(MembershipService membershipService)(Code)



setPrintToScreen
public void setPrintToScreen(boolean printToScreen)(Code)



setProtocol
public void setProtocol(String protocol)(Code)
Sets the configurable protocol stack. This is a setting in server.xml where you can configure your protocol.
Parameters:
  protocol - the protocol stack - this method is called bythe server configuration at startup
See Also:    JavaGroups for details



setUseDirtyFlag
public void setUseDirtyFlag(boolean useDirtyFlag)(Code)



start
public void start() throws LifecycleException(Code)
Prepare for the beginning of active use of the public methods of this component. This method should be called after configure(), and before any of the public methods of the component are utilized.
Starts the cluster communication channel, this will connect with the other nodes in the cluster, and request the current session state to be transferred to this node.
exception:
  IllegalStateException - if this component has already beenstarted
exception:
  LifecycleException - if this component detects a fatal errorthat prevents this component from being used



startContext
public void startContext(String contextPath) throws IOException(Code)
Start an existing web application, attached to the specified context path in all the other nodes in the cluster. Only starts a web application if it is not running.
Parameters:
  contextPath - The context path of the application to be started
exception:
  IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash)
exception:
  IllegalArgumentException - if the specified context path doesnot identify a currently installed web application
exception:
  IOException - if an input/output error occurs duringstartup



stop
public void stop() throws LifecycleException(Code)
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component.
This will disconnect the cluster communication channel and stop the listener thread.
exception:
  IllegalStateException - if this component has not been started
exception:
  LifecycleException - if this component detects a fatal errorthat needs to be reported



stop
public void stop(String contextPath) throws IOException(Code)
Stop an existing web application, attached to the specified context path. Only stops a web application if it is running.
Parameters:
  contextPath - The context path of the application to be stopped
exception:
  IllegalArgumentException - if the specified context pathis malformed (it must be "" or start with a slash)
exception:
  IllegalArgumentException - if the specified context path doesnot identify a currently installed web application
exception:
  IOException - if an input/output error occurs while stoppingthe web application



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.