@Override
    public List<org.jgroups.conf.ProtocolConfiguration> getProtocolStack() {
        List<org.jgroups.conf.ProtocolConfiguration> stack = new ArrayList<>(this.configuration.getProtocols().size() + 1);
        TransportConfiguration transport = this.configuration.getTransport();
        org.jgroups.conf.ProtocolConfiguration protocol = createProtocol(this.configuration, transport);
        Map<String, String> properties = protocol.getProperties();

        Introspector introspector = new Introspector(protocol);

        SocketBinding binding = transport.getSocketBinding();
        if (binding != null) {
            configureBindAddress(introspector, protocol, binding);
            configureServerSocket(introspector, protocol, "bind_port", binding);
            configureMulticastSocket(introspector, protocol, "mcast_addr", "mcast_port", binding);
        }

        SocketBinding diagnosticsSocketBinding = transport.getDiagnosticsSocketBinding();
        boolean diagnostics = (diagnosticsSocketBinding != null);
        properties.put("enable_diagnostics", String.valueOf(diagnostics));
        if (diagnostics) {
            configureMulticastSocket(introspector, protocol, "diagnostics_addr", "diagnostics_port", diagnosticsSocketBinding);
        }

        stack.add(protocol);

        final Class<? extends TP> transportClass = introspector.getProtocolClass().asSubclass(TP.class);
        PrivilegedExceptionAction<TP> action = transportClass::newInstance;
        try {
            stack.addAll(createProtocols(this.configuration, WildFlySecurityManager.doChecked(action).isMulticastCapable()));
        } catch (PrivilegedActionException e) {
            throw new IllegalStateException(e.getCause());
        }

        return stack;
    }
@ Override public List < org . jgroups . conf . ProtocolConfiguration > getProtocolStack ( ) { List < org . jgroups . conf . ProtocolConfiguration > stack = new ArrayList < > ( this . configuration . getProtocols ( ) . size ( ) + 1 ) ; TransportConfiguration transport = this . configuration . getTransport ( ) ; org . jgroups . conf . ProtocolConfiguration protocol = createProtocol ( this . configuration , transport ) ; Map < String , String > properties = protocol . getProperties ( ) ; Introspector introspector = new Introspector ( protocol ) ; SocketBinding binding = transport . getSocketBinding ( ) ; if ( binding != null ) { configureBindAddress ( introspector , protocol , binding ) ; configureServerSocket ( introspector , protocol , "bind_port" , binding ) ; configureMulticastSocket ( introspector , protocol , "mcast_addr" , "mcast_port" , binding ) ; } SocketBinding diagnosticsSocketBinding = transport . getDiagnosticsSocketBinding ( ) ; boolean diagnostics = ( diagnosticsSocketBinding != null ) ; properties . put ( "enable_diagnostics" , String . valueOf ( diagnostics ) ) ; if ( diagnostics ) { configureMulticastSocket ( introspector , protocol , "diagnostics_addr" , "diagnostics_port" , diagnosticsSocketBinding ) ; } stack . add ( protocol ) ; final Class < ? extends TP > transportClass = introspector . getProtocolClass ( ) . asSubclass ( TP . class ) ; PrivilegedExceptionAction < TP > action = transportClass :: newInstance ; try { stack . addAll ( createProtocols ( this . configuration , WildFlySecurityManager . doChecked ( action ) . isMulticastCapable ( ) ) ) ; } catch ( PrivilegedActionException e ) { throw new IllegalStateException ( e . getCause ( ) ) ; } return stack ; }
{@inheritDoc}
@see org.jgroups.conf.ProtocolStackConfigurator#getProtocolStack()