MCPcopy Create free account
hub / github.com/belaban/JGroups / init

Method init

src/org/jgroups/stack/ProtocolStack.java:780–797  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

778
779
780 public void init() throws Exception {
781 List<Protocol> protocols=getProtocols();
782 Collections.reverse(protocols);
783 top_prot=Configurator.connectProtocols(protocols);
784 top_prot.setUpProtocol(this);
785 this.setDownProtocol(top_prot);
786 bottom_prot=getBottomProtocol();
787
788 StackType ip_version=Util.getIpStackType();
789 TP tp=getTransport();
790 InetAddress resolved_addr=tp != null? tp.getBindAddress() : null;
791 if(resolved_addr != null)
792 ip_version=resolved_addr instanceof Inet6Address? StackType.IPv6 : StackType.IPv4;
793 else if(ip_version == StackType.Dual)
794 ip_version=StackType.IPv4; // prefer IPv4 addresses
795 Configurator.setDefaultAddressValues(protocols, ip_version);
796 initProtocolStack(null);
797 }
798
799
800 /** Calls @link{{@link Protocol#init()}} in all protocols, from bottom to top */

Callers 1

setupMethod · 0.95

Calls 10

getProtocolsMethod · 0.95
connectProtocolsMethod · 0.95
getBottomProtocolMethod · 0.95
getIpStackTypeMethod · 0.95
getTransportMethod · 0.95
initProtocolStackMethod · 0.95
setUpProtocolMethod · 0.80
setDownProtocolMethod · 0.80
getBindAddressMethod · 0.45

Tested by 1

setupMethod · 0.76