geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject cvs commit: incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging NodeImpl.java Node.java
Date Thu, 27 May 2004 14:34:46 GMT
gdamour     2004/05/27 07:34:46

  Modified:    sandbox/messaging/src/test/org/apache/geronimo/messaging
                        MockNode.java
               sandbox/messaging/src/java/org/apache/geronimo/messaging
                        NodeImpl.java Node.java
  Log:
  New method returning the NodeInfo of all the Nodes of the topology.
  
  Revision  Changes    Path
  1.3       +22 -3     incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/MockNode.java
  
  Index: MockNode.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/test/org/apache/geronimo/messaging/MockNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MockNode.java	20 May 2004 13:37:11 -0000	1.2
  +++ MockNode.java	27 May 2004 14:34:46 -0000	1.3
  @@ -17,6 +17,11 @@
   
   package org.apache.geronimo.messaging;
   
  +import java.util.HashMap;
  +import java.util.HashSet;
  +import java.util.Map;
  +import java.util.Set;
  +
   import org.apache.geronimo.gbean.GBeanContext;
   import org.apache.geronimo.gbean.WaitingException;
   import org.apache.geronimo.messaging.io.NullReplacerResolver;
  @@ -32,7 +37,17 @@
   
       private NodeInfo nodeInfo;
       private ReplacerResolver replacerResolver = new NullReplacerResolver();
  -
  +    private final Map factoryEndPointProxy = new HashMap();
  +    private final Set getRemoteNodeInfos = new HashSet();
  +    
  +    public Map getMockFactoryEndPointProxy() {
  +        return factoryEndPointProxy;
  +    }
  +    
  +    public Set getMockGetRemoteNodeInfos() {
  +        return getRemoteNodeInfos;
  +    }
  +    
       public void setNodeInfo(NodeInfo aNodeInfo) {
           nodeInfo = aNodeInfo;
       }
  @@ -73,10 +88,14 @@
       }
   
       public Object factoryEndPointProxy(EndPointProxyInfo anInfo) {
  -        return null;
  +        return factoryEndPointProxy.get(anInfo.getTargets()[0]);
       }
   
       public void releaseEndPointProxy(Object aProxy) {
       }
   
  +    public Set getRemoteNodeInfos() {
  +        return getRemoteNodeInfos;
  +    }
  +    
   }
  
  
  
  1.3       +8 -2      incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/NodeImpl.java
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/NodeImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NodeImpl.java	20 May 2004 13:37:11 -0000	1.2
  +++ NodeImpl.java	27 May 2004 14:34:46 -0000	1.3
  @@ -17,6 +17,8 @@
   
   package org.apache.geronimo.messaging;
   
  +import java.util.Set;
  +
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.geronimo.gbean.GBean;
  @@ -24,10 +26,10 @@
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.WaitingException;
  -import org.apache.geronimo.messaging.interceptors.ThrowableTrapOutInterceptor;
   import org.apache.geronimo.messaging.interceptors.HeaderOutInterceptor;
   import org.apache.geronimo.messaging.interceptors.MsgOutDispatcher;
   import org.apache.geronimo.messaging.interceptors.MsgOutInterceptor;
  +import org.apache.geronimo.messaging.interceptors.ThrowableTrapOutInterceptor;
   import org.apache.geronimo.messaging.io.IOContext;
   import org.apache.geronimo.messaging.io.NullReplacerResolver;
   import org.apache.geronimo.messaging.io.ReplacerResolver;
  @@ -187,6 +189,10 @@
       
       public void releaseEndPointProxy(Object aProxy) {
           endPointProxyFactory.releaseProxy(aProxy);
  +    }
  +    
  +    public Set getRemoteNodeInfos() {
  +        return compression.getTopology().getNodes();
       }
       
       public void setGBeanContext(GBeanContext aContext) {
  
  
  
  1.3       +12 -1     incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/Node.java
  
  Index: Node.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/sandbox/messaging/src/java/org/apache/geronimo/messaging/Node.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Node.java	20 May 2004 13:37:11 -0000	1.2
  +++ Node.java	27 May 2004 14:34:46 -0000	1.3
  @@ -17,6 +17,8 @@
   
   package org.apache.geronimo.messaging;
   
  +import java.util.Set;
  +
   import org.apache.geronimo.gbean.GBean;
   import org.apache.geronimo.messaging.io.ReplacerResolver;
   import org.apache.geronimo.messaging.proxy.EndPointProxyInfo;
  @@ -104,11 +106,20 @@
        * Releases the resources of the specified EndPoint proxy.
        * <BR>
        * From this point, the proxy can no more be used.
  +     * <BR>An IllegalStateException should be thrown when a method is invoked
  +     * on a released proxy.
        * 
        * @param aProxy EndPoint proxy.
        * @exception IllegalArgumentException Indicates that the provided instance
        * is not a proxy.
        */
       public void releaseEndPointProxy(Object aProxy);
  +    
  +    /**
  +     * Gets the NodeInfo of the Nodes which can be reached from this Node.
  +     * 
  +     * @return Set of NodeInfos.
  +     */
  +    public Set getRemoteNodeInfos();
       
   }
  
  
  

Mime
View raw message