Class LegacySimpleServerBabelChannelBuilder

All Implemented Interfaces:
BabelChannelBuilder

public class LegacySimpleServerBabelChannelBuilder extends AbstractIPBabelChannelBuilder<LegacySimpleServerBabelChannelBuilder>
Builder for constructing LegacySimpleServerBabelChannel instances.
  • Constructor Details

    • LegacySimpleServerBabelChannelBuilder

      public LegacySimpleServerBabelChannelBuilder()
      Constructs a new LegacySimpleServerBabelChannelBuilder with default parameters.
  • Method Details

    • setProtoId

      public LegacySimpleServerBabelChannelBuilder setProtoId(short protoId)
      Sets the legacy protocol ID to deliver messages to.
      Parameters:
      protoId - the target protocol ID
      Returns:
      this builder instance
    • setHeartbeatInterval

      public LegacySimpleServerBabelChannelBuilder setHeartbeatInterval(int heartbeatInterval)
      Sets the interval between outbound heartbeat frames.
      Parameters:
      heartbeatInterval - interval in milliseconds
      Returns:
      this builder instance
    • setHeartbeatTolerance

      public LegacySimpleServerBabelChannelBuilder setHeartbeatTolerance(int heartbeatTolerance)
      Sets the maximum tolerance before an idle connection is terminated.
      Parameters:
      heartbeatTolerance - tolerance in milliseconds
      Returns:
      this builder instance
    • build

      public BabelChannel build(Babel runtime, NodeStore store, BabelNode identity, BabelProtocol protocol)
      Description copied from interface: BabelChannelBuilder
      Creates a new BabelChannel instance, registering it with the given runtime and limiting its interest to the provided message types.
      Parameters:
      runtime - the owning Babel runtime
      store - the NodeStore that will be used by this channel
      identity - BabelNode object used to represent this Babel instance to other instances
      protocol - the protocol instance associated with this channel
      Returns:
      a ready-to-use BabelChannel