Author: rjung
Date: Thu Apr 15 18:39:10 2010
New Revision: 934517

URL: http://svn.apache.org/viewvc?rev=934517&view=rev
Log:
Add classes missing from commit r812933.
Thanks to Florian Kirchhoff and Konstantin
for reminding me.

Added:
    
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
   (with props)
    
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
   (with props)
Modified:
    tomcat/sandbox/tomcat-oacc/trunk/build.xml

Modified: tomcat/sandbox/tomcat-oacc/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/build.xml?rev=934517&r1=934516&r2=934517&view=diff
==============================================================================
--- tomcat/sandbox/tomcat-oacc/trunk/build.xml (original)
+++ tomcat/sandbox/tomcat-oacc/trunk/build.xml Thu Apr 15 18:39:10 2010
@@ -226,6 +226,9 @@
         <include name="src/**"/>
         <include name="test/**"/>
         <exclude name=".*/**"/>
+        <exclude name="**/*.java.rest"/>
+        <exclude name="**/*.java.full"/>
+        <exclude name="**/*.java.orig"/>
         <exclude name="test/build/**"/>
         <exclude name="test/logs/**"/>
       </fileset>

Added: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java?rev=934517&view=auto
==============================================================================
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
 (added)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
 Thu Apr 15 18:39:10 2010
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.cluster;
+
+import org.apache.catalina.cluster.Member;
+
+
+/**
+ * <p>Title: </p>
+ *
+ * <p>Description: </p>
+ *
+ *
+ * <p>Company: </p>
+ *
+ * @author not attributable
+ * @version 1.0
+ */
+public class ClusterMessageBase implements ClusterMessage {
+    
+    protected transient Member address = null;
+    private String uniqueId = null;
+    private long timestamp = 0;
+    private int resend = ClusterMessage.FLAG_DEFAULT ;
+    private int compress = ClusterMessage.FLAG_DEFAULT ;
+
+    public ClusterMessageBase() {
+    }
+
+    /**
+     * getAddress
+     *
+     * @return Member
+     */
+    public Member getAddress() {
+        return address;
+    }
+
+    public String getUniqueId() {
+        return uniqueId;
+    }
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+    /**
+     * setAddress
+     *
+     * @param member Member
+     */
+    public void setAddress(Member member) {
+        this.address = member;
+    }
+
+    public void setUniqueId(String uniqueId) {
+        this.uniqueId = uniqueId;
+    }
+
+    public void setTimestamp(long timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    /**
+     * @return Returns the compress.
+     * @since 5.5.10
+     */
+    public int getCompress() {
+        return compress;
+    }
+    /**
+     * @param compress The compress to set.
+     * @since 5.5.10
+     */
+    public void setCompress(int compress) {
+        this.compress = compress;
+    }
+    /**
+     * @return Returns the resend.
+     * @since 5.5.10
+     */
+    public int getResend() {
+        return resend;
+    }
+    /**
+     * @param resend The resend to set.
+     * @since 5.5.10
+     */
+    public void setResend(int resend) {
+        this.resend = resend;
+    }
+}

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/ClusterMessageBase.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java?rev=934517&view=auto
==============================================================================
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
 (added)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
 Thu Apr 15 18:39:10 2010
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.catalina.cluster.session;
+
+import org.apache.catalina.cluster.ClusterManager;
+import java.beans.PropertyChangeListener;
+import org.apache.catalina.Lifecycle;
+import org.apache.catalina.session.ManagerBase;
+import org.apache.catalina.Loader;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import org.apache.catalina.cluster.session.ReplicationStream;
+import org.apache.catalina.Container;
+
+/**
+ * 
+ * @author Filip Hanik
+ * @version $Revision$ $Date$
+ */
+
+public abstract class ClusterManagerBase extends ManagerBase implements 
Lifecycle, PropertyChangeListener, ClusterManager{
+    
+
+    public static ClassLoader[] getClassLoaders(Container container) {
+        Loader loader = null;
+        ClassLoader classLoader = null;
+        if (container != null) loader = container.getLoader();
+        if (loader != null) classLoader = loader.getClassLoader();
+        else classLoader = Thread.currentThread().getContextClassLoader();
+        if ( classLoader == Thread.currentThread().getContextClassLoader() ) {
+            return new ClassLoader[] {classLoader};
+        } else {
+            return new ClassLoader[] 
{classLoader,Thread.currentThread().getContextClassLoader()};
+        }
+    }
+
+
+    public ClassLoader[] getClassLoaders() {
+        return getClassLoaders(container);
+    }
+
+    /**
+     * Open Stream and use correct ClassLoader (Container) Switch
+     * ThreadClassLoader
+     * 
+     * @param data
+     * @return The object input stream
+     * @throws IOException
+     */
+    public ReplicationStream getReplicationStream(byte[] data) throws 
IOException {
+        return getReplicationStream(data,0,data.length);
+    }
+
+    public ReplicationStream getReplicationStream(byte[] data, int offset, int 
length) throws IOException {
+        ByteArrayInputStream fis = new ByteArrayInputStream(data, offset, 
length);
+        return new ReplicationStream(fis, getClassLoaders());
+    }    
+
+
+}

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/session/ClusterManagerBase.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



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

Reply via email to