CVS update: JGroups/src/org/jgroups/stack ProtocolStack.java Configurator.java
"Bela Ban" <[email protected]> Thu, 16 Sep 2010 15:51:18 +0000
| Newsgroups | gmane.comp.java.javagroups.cvs |
|---|---|
| Message-ID | <[email protected]> |
User: belaban
Date: 10/09/16 15:51:18
Modified: src/org/jgroups/stack ProtocolStack.java Configurator.java
Log:
removed ProtocolStackFactory interface
Revision Changes Path
1.108 +3 -11 JGroups/src/org/jgroups/stack/ProtocolStack.java
Index: ProtocolStack.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/stack/ProtocolStack.java,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- ProtocolStack.java 16 Sep 2010 15:46:54 -0000 1.107
+++ ProtocolStack.java 16 Sep 2010 15:51:18 -0000 1.108
@@ -30,7 +30,7 @@
* stacks, and to destroy them again when not needed anymore
*
* @author Bela Ban
- * @version $Id: ProtocolStack.java,v 1.107 2010/09/16 15:46:54 belaban Exp $
+ * @version $Id: ProtocolStack.java,v 1.108 2010/09/16 15:51:18 belaban Exp $
*/
public class ProtocolStack extends Protocol implements Transport {
public static final int ABOVE = 1; // used by insertProtocol()
@@ -453,7 +453,7 @@
public void setup(List<ProtocolConfiguration> configs) throws Exception {
if(top_prot == null) {
- top_prot=getProtocolStackFactory().setupProtocolStack(configs);
+ top_prot=new Configurator(this).setupProtocolStack(configs);
top_prot.setUpProtocol(this);
this.setDownProtocol(top_prot);
bottom_prot=getBottomProtocol();
@@ -462,15 +462,11 @@
}
- protected ProtocolStackFactory getProtocolStackFactory() {
- return new Configurator(this);
- }
-
public void setup(ProtocolStack stack) throws Exception {
if(top_prot == null) {
- top_prot=getProtocolStackFactory().setupProtocolStack(stack);
+ top_prot=new Configurator(this).setupProtocolStack(stack);
top_prot.setUpProtocol(this);
this.setDownProtocol(top_prot);
bottom_prot=getBottomProtocol();
@@ -947,9 +943,5 @@
}
}
- public interface ProtocolStackFactory{
- public Protocol setupProtocolStack(List<ProtocolConfiguration> cfg) throws Exception;
- public Protocol setupProtocolStack(ProtocolStack copySource) throws Exception;
- }
}
1.87 +2 -3 JGroups/src/org/jgroups/stack/Configurator.java
Index: Configurator.java
===================================================================
RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/stack/Configurator.java,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- Configurator.java 16 Sep 2010 15:32:23 -0000 1.86
+++ Configurator.java 16 Sep 2010 15:51:18 -0000 1.87
@@ -10,7 +10,6 @@
import org.jgroups.logging.Log;
import org.jgroups.logging.LogFactory;
import org.jgroups.protocols.TP;
-import org.jgroups.stack.ProtocolStack.ProtocolStackFactory;
import org.jgroups.util.StackType;
import org.jgroups.util.Tuple;
import org.jgroups.util.Util;
@@ -37,9 +36,9 @@
* of the protocol stack and the properties of each layer.
* @author Bela Ban
* @author Richard Achmatowicz
- * @version $Id: Configurator.java,v 1.86 2010/09/16 15:32:23 belaban Exp $
+ * @version $Id: Configurator.java,v 1.87 2010/09/16 15:51:18 belaban Exp $
*/
-public class Configurator implements ProtocolStackFactory {
+public class Configurator {
protected static final Log log=LogFactory.getLog(Configurator.class);
private final ProtocolStack stack;
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev