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[] supported) Returns the cipher suites that should be enabled for this channel's SSL type, determined from the full set of supported suites.getHost()Gets the host of the channel.intgetPort()Gets the port of the channel.Gets the type of the channel.booleanChecks if the channel is authenticated.booleanChecks 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
Returns the cipher suites that should be enabled for this channel's SSL type, determined from the full set of supported suites.The filtering logic is delegated to
Channel_SSLChannelUtils.filterCipherSuites(Channel_SSLChannelType, String[]).- Parameters:
supported- all cipher suites supported by the SSL engine (e.g. fromSSLSocket.getSupportedCipherSuites())- Returns:
- the subset of cipher suites to enable for this channel; may be an empty array if no suites match the channel type
-
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
Generates a string representation of the channel settings.
-