Class TCPBabelChannel

java.lang.Object
pt.unl.fct.di.novasys.babel2.channels.tcp_tls.AbstractTCPBabelChannel
pt.unl.fct.di.novasys.babel2.channels.tcp_tls.TCPBabelChannel
All Implemented Interfaces:
BabelChannel, IPBabelChannel

public final class TCPBabelChannel extends AbstractTCPBabelChannel
Concrete TCP Babel channel implementation that transports messages over persistent TCP connections.

Configures Netty's ServerSocketChannel and client Bootstrap pipelines with length-field framing and handshake codecs.

Instances of this channel should be created via builder().

  • Method Details

    • createServerSocketChannel

      protected io.netty.channel.socket.ServerSocketChannel createServerSocketChannel(Babel runtime, NodeStore store, InetSocketAddress address, io.netty.channel.EventLoopGroup workerGroup, int numberOfMessages, boolean verifyIdentity, AbstractTCPBabelChannel.TCPBabelChannelAuthMode authMode, @Nullable Set<BabelNode> permittedNodes)
      Description copied from class: AbstractTCPBabelChannel
      Creates and binds the Netty ServerSocketChannel for accepting incoming connections.
      Specified by:
      createServerSocketChannel in class AbstractTCPBabelChannel
      Parameters:
      runtime - the Babel runtime
      store - the node store for address and component resolution
      address - the local address to bind to
      workerGroup - the Netty event loop group for channel I/O
      numberOfMessages - outbound message queue buffer capacity per connection
      verifyIdentity - whether cryptographic identity verification is enabled
      authMode - the authentication mode configuring accepted message types
      permittedNodes - the set of permitted nodes, or null if all nodes are permitted
      Returns:
      the bound and initialized ServerSocketChannel
    • createClientBootstrap

      protected io.netty.bootstrap.Bootstrap createClientBootstrap(Babel runtime, NodeStore store, io.netty.channel.EventLoopGroup workerGroup, int numberOfMessages, boolean verifyIdentity, AbstractTCPBabelChannel.TCPBabelChannelAuthMode authMode, @Nullable Set<BabelNode> permittedNodes)
      Description copied from class: AbstractTCPBabelChannel
      Creates and configures the Netty client Bootstrap for initiating outbound connections.
      Specified by:
      createClientBootstrap in class AbstractTCPBabelChannel
      Parameters:
      runtime - the Babel runtime
      store - the node store for address and component resolution
      workerGroup - the Netty event loop group for channel I/O
      numberOfMessages - outbound message queue buffer capacity per connection
      verifyIdentity - whether cryptographic identity verification is enabled
      authMode - the authentication mode configuring accepted message types
      permittedNodes - the set of permitted nodes, or null if all nodes are permitted
      Returns:
      the configured client Bootstrap
    • builder

      public static TCPBabelChannelBuilder builder()
      Creates a new TCPBabelChannelBuilder instance for configuring a TCPBabelChannel.
      Returns:
      a new channel builder