/** * Returns a default stack for testing with transport = SHARED_LOOPBACK * @param additional_protocols Any number of protocols to add to the top of the returned protocol list * @return */ public static Protocol[] getTestStack(Protocol... additional_protocols) { Protocol[] protocols={ new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2(), new UNICAST3(), new STABLE(), new GMS().joinTimeout(1000), new FRAG2().fragSize(8000) }; if(additional_protocols == null) return protocols; Protocol[] tmp=Arrays.copyOf(protocols,protocols.length + additional_protocols.length); System.arraycopy(additional_protocols, 0, tmp, protocols.length, additional_protocols.length); return tmp; }
new UFC(), new MFC(), new FRAG2()}; JChannel ch=new JChannel(prot_stack).name(args[0]);
/** * Returns a default stack for testing with transport = SHARED_LOOPBACK * @param additional_protocols Any number of protocols to add to the top of the returned protocol list * @return */ public static Protocol[] getTestStack(Protocol... additional_protocols) { Protocol[] protocols={ new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2(), new UNICAST3(), new STABLE(), new GMS().joinTimeout(1000), new FRAG2().fragSize(8000) }; if(additional_protocols == null) return protocols; Protocol[] tmp=Arrays.copyOf(protocols,protocols.length + additional_protocols.length); System.arraycopy(additional_protocols, 0, tmp, protocols.length, additional_protocols.length); return tmp; }
new UFC(), new MFC(), new FRAG2()}; JChannel ch=new JChannel(prot_stack).name(args[0]);