tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1738718 - in /tomcat/tc8.0.x/trunk: java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java java/org/apache/catalina/tribes/group/GroupChannel.java webapps/docs/changelog.xml
Date Tue, 12 Apr 2016 07:44:40 GMT
Author: kfujino
Date: Tue Apr 12 07:44:40 2016
New Revision: 1738718

URL: http://svn.apache.org/viewvc?rev=1738718&view=rev
Log:
Add get/set method for the channel that is related to ChannelInterceptorBase.

Modified:
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java?rev=1738718&r1=1738717&r2=1738718&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
(original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java
Tue Apr 12 07:44:40 2016
@@ -16,6 +16,7 @@
  */
 package org.apache.catalina.tribes.group;
 
+import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelInterceptor;
 import org.apache.catalina.tribes.ChannelMessage;
@@ -28,6 +29,7 @@ public abstract class ChannelInterceptor
 
     private ChannelInterceptor next;
     private ChannelInterceptor previous;
+    private Channel channel;
     //default value, always process
     protected int optionFlag = 0;
 
@@ -176,5 +178,20 @@ public abstract class ChannelInterceptor
         //empty operation
     }
 
+    /**
+     * Return the channel that is related to this interceptor
+     * @return Channel
+     */
+    public Channel getChannel() {
+        return channel;
+    }
+
+    /**
+     * Set the channel that is related to this interceptor
+     * @param channel
+     */
+    public void setChannel(Channel channel) {
+        this.channel = channel;
+    }
 
 }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1738718&r1=1738717&r2=1738718&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Tue Apr 12
07:44:40 2016
@@ -130,11 +130,14 @@ public class GroupChannel extends Channe
      */
     @Override
     public void addInterceptor(ChannelInterceptor interceptor) {
+        if (interceptor instanceof ChannelInterceptorBase)
+            ((ChannelInterceptorBase)interceptor).setChannel(this);
         if ( interceptors == null ) {
             interceptors = interceptor;
             interceptors.setNext(coordinator);
             interceptors.setPrevious(null);
             coordinator.setPrevious(interceptors);
+            coordinator.setChannel(this);
         } else {
             ChannelInterceptor last = interceptors;
             while ( last.getNext() != coordinator ) {

Modified: tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml?rev=1738718&r1=1738717&r2=1738718&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml Tue Apr 12 07:44:40 2016
@@ -167,6 +167,10 @@
         Fix potential NPE that depends on the setting order of attributes of
         static member when using the static cluster. (kfujino)
       </fix>
+      <add>
+        Add get/set method for the channel that is related to
+        <code>ChannelInterceptorBase</code>. (kfujino)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Other">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message