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

Method setupProtocolStack

src/org/jgroups/stack/Configurator.java:52–58  ·  view source on GitHub ↗

Sets up the protocol stack. Each ProtocolConfiguration has the protocol name and a map of attribute names and values (strings). Reflection is used to find the right fields (or setters) based on attribute names, and set them (by converting the attribute value to the proper object).

(List<ProtocolConfiguration> protocol_configs, ProtocolStack st)

Source from the content-addressed store, hash-verified

50 * and set them (by converting the attribute value to the proper object).
51 */
52 public static Protocol setupProtocolStack(List<ProtocolConfiguration> protocol_configs, ProtocolStack st) throws Exception {
53 List<Protocol> protocols=createProtocolsAndInitializeAttrs(protocol_configs, st);
54 // Fixes NPE with concurrent channel creation when using a shared stack (https://issues.redhat.com/browse/JGRP-1488)
55 Protocol top_protocol=protocols.get(protocols.size() - 1);
56 top_protocol.setUpProtocol(st);
57 return connectProtocols(protocols);
58 }
59
60
61 public static Protocol createProtocol(String prot_spec, ProtocolStack stack) throws Exception {

Callers 1

setupMethod · 0.95

Calls 5

setUpProtocolMethod · 0.95
connectProtocolsMethod · 0.95
getMethod · 0.65
sizeMethod · 0.65

Tested by

no test coverage detected