geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r446657 - in /geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire: command/ state/ transport/ transport/tcp/ wireformat/
Date Fri, 15 Sep 2006 17:14:02 GMT
Author: jgenender
Date: Fri Sep 15 10:14:01 2006
New Revision: 446657

URL: http://svn.apache.org/viewvc?view=rev&rev=446657
Log:
GERONIMO-2407 make code compilable

Added:
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
  (with props)
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
  (with props)
Modified:
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/BaseCommand.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Command.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Endpoint.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/KeepAliveInfo.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/WireFormatInfo.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/state/CommandVisitor.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServer.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServerFilter.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/tcp/TcpTransportServer.java
    geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/wireformat/ObjectStreamWireFormat.java

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/BaseCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/BaseCommand.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/BaseCommand.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/BaseCommand.java
Fri Sep 15 10:14:01 2006
@@ -59,7 +59,7 @@
         return false;
     }
 
-    public boolean isBrokerInfo() {
+    public boolean isNodeInfo() {
         return false;
     }
 

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Command.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Command.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Command.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Command.java
Fri Sep 15 10:14:01 2006
@@ -35,7 +35,7 @@
 
     boolean isResponse();
     boolean isMessageDispatch();
-    boolean isBrokerInfo();
+    boolean isNodeInfo();
     boolean isWireFormatInfo();
     boolean isMessage();
     boolean isMessageAck();

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Endpoint.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Endpoint.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Endpoint.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/Endpoint.java
Fri Sep 15 10:14:01 2006
@@ -26,18 +26,18 @@
     public String getName();
 
     /**
-     * Returns the broker ID for this endpoint, if the endpoint is a broker or
+     * Returns the node ID for this endpoint, if the endpoint is a broker or
      * null
      */
-    public BrokerId getBrokerId();
+    public NodeId getNodeId();
 
     /**
-     * Returns the broker information for this endpoint, if the endpoint is a
-     * broker or null
+     * Returns the node information for this endpoint, if the endpoint is a
+     * node or null if not
      */
-    public BrokerInfo getBrokerInfo();
+    public NodeInfo getNodeInfo();
 
-    public void setBrokerInfo(BrokerInfo brokerInfo);
+    public void setNodeInfo(NodeInfo nodeInfo);
 
 }
 

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/KeepAliveInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/KeepAliveInfo.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/KeepAliveInfo.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/KeepAliveInfo.java
Fri Sep 15 10:14:01 2006
@@ -48,7 +48,7 @@
         return false;
     }
 
-    public boolean isBrokerInfo() {
+    public boolean isNodeInfo() {
         return false;
     }
 

Added: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java?view=auto&rev=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
(added)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
Fri Sep 15 10:14:01 2006
@@ -0,0 +1,72 @@
+/*
+ * 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.geronimo.openwire.command;
+
+/**
+ * The id of a node, which is a single cache in the distribute cache.
+ */
+public class NodeId implements DataStructure {
+
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_ID;
+
+    protected String value;
+
+    public NodeId() {
+    }
+
+    public NodeId(String nodeId) {
+        this.value = nodeId;
+    }
+
+    public int hashCode() {
+        return value.hashCode();
+    }
+
+    public boolean equals(Object o) {
+        if (this == o)
+            return true;
+        if (o == null || o.getClass() != NodeId.class)
+            return false;
+        NodeId id = (NodeId) o;
+        return value.equals(id.value);
+    }
+
+    public byte getDataStructureType() {
+        return DATA_STRUCTURE_TYPE;
+    }
+
+    public String toString() {
+        return value;
+    }
+
+    /**
+     * @openwire:property version=1
+     */
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String brokerId) {
+        this.value = brokerId;
+    }
+
+    public boolean isMarshallAware() {
+        return false;
+    }
+}

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeId.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java?view=auto&rev=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
(added)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
Fri Sep 15 10:14:01 2006
@@ -0,0 +1,140 @@
+/*
+ * 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.geronimo.openwire.command;
+
+import org.apache.geronimo.openwire.state.CommandVisitor;
+
+/**
+ * Info about a node including if its the master or slave and the list of peers.
+ */
+public class NodeInfo extends BaseCommand {
+    public static final byte DATA_STRUCTURE_TYPE = CommandTypes.BROKER_INFO;
+
+    NodeId nodeId;
+
+    String nodeURL;
+
+    boolean slaveNode;
+
+    boolean masterNode;
+
+    boolean faultTolerantConfiguration;
+
+    NodeInfo peerNodeInfos[];
+
+    String nodeName;
+
+    public boolean isNodeInfo() {
+        return true;
+    }
+
+    public byte getDataStructureType() {
+        return DATA_STRUCTURE_TYPE;
+    }
+
+    /**
+     * @openwire:property version=1 cache=true
+     */
+    public NodeId getNodeId() {
+        return nodeId;
+    }
+
+    public void setNodeId(NodeId brokerId) {
+        this.nodeId = brokerId;
+    }
+
+    /**
+     * @openwire:property version=1
+     */
+    public String getNodeURL() {
+        return nodeURL;
+    }
+
+    public void setNodeURL(String nodeURL) {
+        this.nodeURL = nodeURL;
+    }
+
+    /**
+     * @openwire:property version=1 testSize=0
+     */
+    public NodeInfo[] getPeerNodeInfos() {
+        return peerNodeInfos;
+    }
+
+    public void setNodeInfos(NodeInfo[] peerNodeInfos) {
+        this.peerNodeInfos = peerNodeInfos;
+    }
+
+    /**
+     * @openwire:property version=1
+     */
+    public String getNodeName() {
+        return nodeName;
+    }
+
+    public void setNodeName(String nodeName) {
+        this.nodeName = nodeName;
+    }
+
+    public Response visit(CommandVisitor visitor) throws Exception {
+        return visitor.processNodeInfo(this);
+    }
+
+    /**
+     * @openwire:property version=1
+     */
+    public boolean isSlaveNode() {
+        return slaveNode;
+    }
+
+    public void setSlaveNode(boolean slaveNode) {
+        this.slaveNode = slaveNode;
+    }
+
+    /**
+     * @openwire:property version=1
+     */
+    public boolean isMasterNode() {
+        return masterNode;
+    }
+
+    /**
+     * @param masterNode
+     *            The masterNode to set.
+     */
+    public void setMasterNode(boolean masterNode) {
+        this.masterNode = masterNode;
+    }
+
+    /**
+     * @openwire:property version=1
+     * @return Returns the faultTolerantConfiguration.
+     */
+    public boolean isFaultTolerantConfiguration() {
+        return faultTolerantConfiguration;
+    }
+
+    /**
+     * @param faultTolerantConfiguration
+     *            The faultTolerantConfiguration to set.
+     */
+    public void setFaultTolerantConfiguration(boolean faultTolerantConfiguration) {
+        this.faultTolerantConfiguration = faultTolerantConfiguration;
+    }
+}

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/NodeInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/WireFormatInfo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/WireFormatInfo.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/WireFormatInfo.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/command/WireFormatInfo.java
Fri Sep 15 10:14:01 2006
@@ -283,7 +283,7 @@
     public boolean isResponse() {
         return false;
     }
-    public boolean isBrokerInfo() {
+    public boolean isNodeInfo() {
         return false;
     }
     public boolean isMessageDispatch() {

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/state/CommandVisitor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/state/CommandVisitor.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/state/CommandVisitor.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/state/CommandVisitor.java
Fri Sep 15 10:14:01 2006
@@ -1,8 +1,9 @@
 package org.apache.geronimo.openwire.state;
 
+import org.apache.geronimo.openwire.command.KeepAliveInfo;
+import org.apache.geronimo.openwire.command.NodeInfo;
 import org.apache.geronimo.openwire.command.Response;
 import org.apache.geronimo.openwire.command.WireFormatInfo;
-import org.apache.geronimo.openwire.command.KeepAliveInfo;
 
 /**
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -33,6 +34,7 @@
 
     Response processWireFormat(WireFormatInfo info) throws Exception;
     Response processKeepAlive(KeepAliveInfo info) throws Exception;
+    Response processNodeInfo(NodeInfo info) throws Exception;
 
 
 }

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServer.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServer.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServer.java
Fri Sep 15 10:14:01 2006
@@ -21,6 +21,7 @@
 import java.net.URI;
 
 import org.apache.geronimo.openwire.Service;
+import org.apache.geronimo.openwire.command.NodeInfo;
 
 
 /**
@@ -44,7 +45,7 @@
      * 
      * @param brokerInfo
      */
-    public void setBrokerInfo(BrokerInfo brokerInfo);
+    public void setNodeInfo(NodeInfo nodeInfo);
 
     public URI getConnectURI();
 

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServerFilter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServerFilter.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServerFilter.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/TransportServerFilter.java
Fri Sep 15 10:14:01 2006
@@ -20,6 +20,8 @@
 import java.net.InetSocketAddress;
 import java.net.URI;
 
+import org.apache.geronimo.openwire.command.NodeInfo;
+
 public class TransportServerFilter implements TransportServer {
 
     protected final TransportServer next;
@@ -39,8 +41,8 @@
         next.setAcceptListener(acceptListener);
     }
 
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
-        next.setBrokerInfo(brokerInfo);
+    public void setNodeInfo(NodeInfo nodeInfo) {
+        next.setNodeInfo(nodeInfo);
     }
 
     public void start() throws Exception {

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/tcp/TcpTransportServer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/tcp/TcpTransportServer.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/tcp/TcpTransportServer.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/transport/tcp/TcpTransportServer.java
Fri Sep 15 10:14:01 2006
@@ -29,17 +29,18 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.net.ServerSocketFactory;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.openwire.command.NodeInfo;
+import org.apache.geronimo.openwire.transport.Transport;
+import org.apache.geronimo.openwire.transport.TransportServerThreadSupport;
 import org.apache.geronimo.openwire.util.IOExceptionSupport;
 import org.apache.geronimo.openwire.util.ServiceStopper;
-import org.apache.geronimo.openwire.transport.TransportServerThreadSupport;
-import org.apache.geronimo.openwire.transport.Transport;
-import org.apache.geronimo.openwire.wireformat.WireFormatFactory;
-import org.apache.geronimo.openwire.wireformat.WireFormat;
 import org.apache.geronimo.openwire.wireformat.ObjectStreamWireFormatFactory;
-
-import javax.net.ServerSocketFactory;
+import org.apache.geronimo.openwire.wireformat.WireFormat;
+import org.apache.geronimo.openwire.wireformat.WireFormatFactory;
 
 /**
  * A TCP based implementation of {@link org.apache.geronimo.openwire.transport.TransportServer}
@@ -114,7 +115,7 @@
      * 
      * @param brokerInfo
      */
-    public void setBrokerInfo(BrokerInfo brokerInfo) {
+    public void setNodeInfo(NodeInfo nodeInfo) {
     }
 
     public long getMaxInactivityDuration() {

Modified: geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/wireformat/ObjectStreamWireFormat.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/wireformat/ObjectStreamWireFormat.java?view=diff&rev=446657&r1=446656&r2=446657
==============================================================================
--- geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/wireformat/ObjectStreamWireFormat.java
(original)
+++ geronimo/sandbox/gcache/openwire/src/main/java/org/apache/geronimo/openwire/wireformat/ObjectStreamWireFormat.java
Fri Sep 15 10:14:01 2006
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.ObjectOutputStream;
 
+import org.apache.geronimo.openwire.command.WireFormatInfo;
 import org.apache.geronimo.openwire.util.ByteSequence;
 import org.apache.geronimo.openwire.util.ByteArrayOutputStream;
 import org.apache.geronimo.openwire.util.ByteArrayInputStream;
@@ -70,6 +71,19 @@
 
     public int getVersion() {
         return 0;
+    }
+
+    public void setPreferedWireFormatInfo(WireFormatInfo info) {
+        // TODO Auto-generated method stub
+    }
+
+    public WireFormatInfo getPreferedWireFormatInfo() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void renegotiateWireFormat(WireFormatInfo info) throws IOException {
+        // TODO Auto-generated method stub
     }
 
 }



Mime
View raw message