Package anbxj
Class Channel_Settings
java.lang.Object
anbxj.Channel_Settings
- All Implemented Interfaces:
Serializable
Represents settings for a communication channel.
Implements java.io.Serializable to support serialization.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionChannel_Settings
(Channel_Roles cr, String host, int port) PLAIN channel settingsChannel_Settings
(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port) Standard channel settings, without SSL context specificationChannel_Settings
(Channel_SSLChannelType ct, Channel_Roles cr, String host, int port, String sslContext) Channel_Settings Constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the role of the channel.Gets the type of the channel.String[]
getEnabledCipherSuites
(String[] enabled) Gets the enabled cipher suites based on the channel type.getHost()
Gets the host of the channel.int
getPort()
Gets the port of the channel.Gets the type of the channel.Checks if the channel is authenticated.Checks if the channel is secret.toString()
Generates a string representation of the channel settings.
-
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 notcr
- 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
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
Standard channel settings, without SSL context specification- Parameters:
ct
- channel type: SSL or notcr
- 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
Gets the role of the channel.- Returns:
- The role of the channel.
-
getChannelType
Gets the type of the channel.- Returns:
- The type of the channel.
-
getSSLContextAlgorithm
Gets the type of the channel.- Returns:
- The type of the channel.
-
getEnabledCipherSuites
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
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
Checks if the channel is authenticated.- Returns:
- True if the channel is authenticated, false otherwise.
-
isSecretChannel
Checks if the channel is secret.- Returns:
- True if the channel is secret, false otherwise.
-
toString
Generates a string representation of the channel settings.
-