Package anbxj

# Class Channel_Settings

java.lang.Object
anbxj.Channel_Settings

All Implemented Interfaces:
  `Serializable`

public class Channel_Settings extends Object implements Serializable
Represents settings for a communication channel. Implements java.io.Serializable to support serialization.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Channel_Settings(Channel_Roles cr, String host, int port)`
  PLAIN channel settings
  `Channel_Settings(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port)`
  Standard channel settings, without SSL context specification
  `Channel_Settings(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port, String sslContext)`
  Channel_Settings Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Channel_Roles`
  `getChannelRole()`
  Gets the role of the channel.
  `Channel_SSLChannelType`
  `getChannelType()`
  Gets the type of the channel.
  `String[]`
  `getEnabledCipherSuites(String[] enabled)`
  Gets the enabled cipher suites based on the channel type.
  `String`
  `getHost()`
  Gets the host of the channel.
  `int`
  `getPort()`
  Gets the port of the channel.
  `String`
  `getSSLContextAlgorithm()`
  Gets the type of the channel.
  `Boolean`
  `isAuthenticatedChannel()`
  Checks if the channel is authenticated.
  `Boolean`
  `isSecretChannel()`
  Checks if the channel is secret.
  `String`
  `toString()`
  Generates a string representation of the channel settings.

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Channel_Settings

    public Channel_Settings(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port, String sslContext)
    Channel_Settings Constructor
    Parameters:
      `ct` - channel type: SSL or not
      `cr` - channel role (client or server)
      `host` - IP address of the remote server (if role is client)
      `port` - port (both client an server)
      `sslContext` - the sslContext parameter (e.g. TLSv1.2, TLSv1.3)

  - ### Channel_Settings

    public Channel_Settings(Channel_Roles cr, String host, int port)
    PLAIN channel settings
    Parameters:
      `cr` - channel role (client or server)
      `host` - IP address of the remote server (if role is client)
      `port` - port (both client an server)

  - ### Channel_Settings

    public Channel_Settings(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port)
    Standard channel settings, without SSL context specification
    Parameters:
      `ct` - channel type: SSL or not
      `cr` - channel role (client or server)
      `host` - IP address of the remote server (if role is client)
      `port` - port (both client an server)

- ## Method Details

  - ### getChannelRole

    public Channel_Roles getChannelRole()
    Gets the role of the channel.
    Returns:
      The role of the channel.

  - ### getChannelType

    public Channel_SSLChannelType getChannelType()
    Gets the type of the channel.
    Returns:
      The type of the channel.

  - ### getSSLContextAlgorithm

    public String getSSLContextAlgorithm()
    Gets the type of the channel.
    Returns:
      The type of the channel.

  - ### getEnabledCipherSuites

    public String[] getEnabledCipherSuites(String[] enabled)
    Gets the enabled cipher suites based on the channel type.
    Parameters:
      `enabled` - The array of enabled cipher suites.
    Returns:
      The modified array of enabled cipher suites.

  - ### getHost

    public String getHost()
    Gets the host of the channel.
    Returns:
      The host of the channel.

  - ### getPort

    public int getPort()
    Gets the port of the channel.
    Returns:
      The port of the channel.

  - ### isAuthenticatedChannel

    public Boolean isAuthenticatedChannel()
    Checks if the channel is authenticated.
    Returns:
      True if the channel is authenticated, false otherwise.

  - ### isSecretChannel

    public Boolean isSecretChannel()
    Checks if the channel is secret.
    Returns:
      True if the channel is secret, false otherwise.

  - ### toString

    public String toString()
    Generates a string representation of the channel settings.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the channel settings.