Author: fhanik Date: Mon Mar 20 08:18:05 2006 New Revision: 387238 URL: http://svn.apache.org/viewcvs?rev=387238&view=rev Log: Start/Stop events propagate through the interceptor stack
Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java?rev=387238&r1=387237&r2=387238&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/ChannelInterceptor.java Mon Mar 20 08:18:05 2006 @@ -65,8 +65,37 @@ /** * * @param mbr Member - * @return Member + * @return Member - the actual member information, including stay alive */ public Member getMember(Member mbr); + + /** + * Starts up the channel. This can be called multiple times for individual services to start + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will start all services <BR> + * MBR_RX_SEQ - starts the membership receiver <BR> + * MBR_TX_SEQ - starts the membership broadcaster <BR> + * SND_TX_SEQ - starts the replication transmitter<BR> + * SND_RX_SEQ - starts the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + public void start(int svc) throws ChannelException; + + /** + * Shuts down the channel. This can be called multiple times for individual services to shutdown + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will shutdown all services <BR> + * MBR_RX_SEQ - stops the membership receiver <BR> + * MBR_TX_SEQ - stops the membership broadcaster <BR> + * SND_TX_SEQ - stops the replication transmitter<BR> + * SND_RX_SEQ - stops the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + public void stop(int svc) throws ChannelException; + + + } Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=387238&r1=387237&r2=387238&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelCoordinator.java Mon Mar 20 08:18:05 2006 @@ -76,7 +76,38 @@ * SND_RX_SEQ - starts the replication receiver<BR> * @throws ChannelException if a startup error occurs or the service is already started. */ - public synchronized void start() throws ChannelException { + public void start(int svc) throws ChannelException { + this.start(); + } + + /** + * Shuts down the channel. This can be called multiple times for individual services to shutdown + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will shutdown all services <BR> + * MBR_RX_SEQ - stops the membership receiver <BR> + * MBR_TX_SEQ - stops the membership broadcaster <BR> + * SND_TX_SEQ - stops the replication transmitter<BR> + * SND_RX_SEQ - stops the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + public void stop(int svc) throws ChannelException { + this.stop(); + } + + + /** + * Starts up the channel. This can be called multiple times for individual services to start + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will start all services <BR> + * MBR_RX_SEQ - starts the membership receiver <BR> + * MBR_TX_SEQ - starts the membership broadcaster <BR> + * SND_TX_SEQ - starts the replication transmitter<BR> + * SND_RX_SEQ - starts the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + protected synchronized void start() throws ChannelException { try { if (started) return; //must start the receiver first so that we can coordinate the port it @@ -106,8 +137,9 @@ * SND_RX_SEQ - starts the replication receiver<BR> * @throws ChannelException if a startup error occurs or the service is already started. */ - public void stop() throws ChannelException { + protected synchronized void stop() throws ChannelException { try { + if ( !started ) return; membershipService.stop(); clusterReceiver.stop(); clusterSender.stop(); Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=387238&r1=387237&r2=387238&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/ChannelInterceptorBase.java Mon Mar 20 08:18:05 2006 @@ -124,5 +124,36 @@ if ( getNext()!=null ) return getNext().getLocalMember(incAlive); else return null; } + + /** + * Starts up the channel. This can be called multiple times for individual services to start + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will start all services <BR> + * MBR_RX_SEQ - starts the membership receiver <BR> + * MBR_TX_SEQ - starts the membership broadcaster <BR> + * SND_TX_SEQ - starts the replication transmitter<BR> + * SND_RX_SEQ - starts the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + public void start(int svc) throws ChannelException { + if ( getNext()!=null ) getNext().start(svc); + } + + /** + * Shuts down the channel. This can be called multiple times for individual services to shutdown + * The svc parameter can be the logical or value of any constants + * @param svc int value of <BR> + * DEFAULT - will shutdown all services <BR> + * MBR_RX_SEQ - stops the membership receiver <BR> + * MBR_TX_SEQ - stops the membership broadcaster <BR> + * SND_TX_SEQ - stops the replication transmitter<BR> + * SND_RX_SEQ - stops the replication receiver<BR> + * @throws ChannelException if a startup error occurs or the service is already started. + */ + public void stop(int svc) throws ChannelException { + if (getNext() != null) getNext().stop(svc); + } + } Modified: tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java?rev=387238&r1=387237&r2=387238&view=diff ============================================================================== --- tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java (original) +++ tomcat/container/tc5.5.x/modules/groupcom/src/share/org/apache/catalina/tribes/group/GroupChannel.java Mon Mar 20 08:18:05 2006 @@ -160,36 +160,6 @@ else return coordinator; } - /** - * Starts up the channel. This can be called multiple times for individual services to start - * The svc parameter can be the logical or value of any constants - * @param svc int value of <BR> - * DEFAULT - will start all services <BR> - * MBR_RX_SEQ - starts the membership receiver <BR> - * MBR_TX_SEQ - starts the membership broadcaster <BR> - * SND_TX_SEQ - starts the replication transmitter<BR> - * SND_RX_SEQ - starts the replication receiver<BR> - * @throws ChannelException if a startup error occurs or the service is already started. - */ - public void start(int svc) throws ChannelException { - coordinator.start(); - } - - /** - * Shuts down the channel. This can be called multiple times for individual services to shutdown - * The svc parameter can be the logical or value of any constants - * @param svc int value of <BR> - * DEFAULT - will shutdown all services <BR> - * MBR_RX_SEQ - starts the membership receiver <BR> - * MBR_TX_SEQ - starts the membership broadcaster <BR> - * SND_TX_SEQ - starts the replication transmitter<BR> - * SND_RX_SEQ - starts the replication receiver<BR> - * @throws ChannelException if a startup error occurs or the service is already started. - */ - public void stop(int svc) throws ChannelException { - coordinator.stop(); - } - public ChannelReceiver getChannelReceiver() { return coordinator.getClusterReceiver(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]