java.lang.Object
com.amazonaws.services.elasticloadbalancing.model.Listener
All Implemented Interfaces:
Serializable, Cloneable

public class Listener extends Object implements Serializable, Cloneable

Information about a listener.

For information about the protocols and the ports supported by Elastic Load Balancing, see Listener Configurations for Elastic Load Balancing in the Elastic Load Balancing Developer Guide.

See Also:
  • Constructor Details

    • Listener

      public Listener()
      Default constructor for Listener object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • Listener

      public Listener(String protocol, Integer loadBalancerPort, Integer instancePort)
      Constructs a new Listener object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      protocol - The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
      loadBalancerPort - The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
      instancePort - The port on which the instance is listening.
  • Method Details

    • setProtocol

      public void setProtocol(String protocol)

      The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.

      Parameters:
      protocol - The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
    • getProtocol

      public String getProtocol()

      The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.

      Returns:
      The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
    • withProtocol

      public Listener withProtocol(String protocol)

      The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.

      Parameters:
      protocol - The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setLoadBalancerPort

      public void setLoadBalancerPort(Integer loadBalancerPort)

      The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.

      Parameters:
      loadBalancerPort - The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
    • getLoadBalancerPort

      public Integer getLoadBalancerPort()

      The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.

      Returns:
      The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
    • withLoadBalancerPort

      public Listener withLoadBalancerPort(Integer loadBalancerPort)

      The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.

      Parameters:
      loadBalancerPort - The port on which the load balancer is listening. On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setInstanceProtocol

      public void setInstanceProtocol(String instanceProtocol)

      The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

      Parameters:
      instanceProtocol - The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

    • getInstanceProtocol

      public String getInstanceProtocol()

      The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

      Returns:
      The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

    • withInstanceProtocol

      public Listener withInstanceProtocol(String instanceProtocol)

      The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

      Parameters:
      instanceProtocol - The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.

      If the front-end protocol is HTTP, HTTPS, TCP, or SSL, InstanceProtocol must be at the same protocol.

      If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

      If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setInstancePort

      public void setInstancePort(Integer instancePort)

      The port on which the instance is listening.

      Parameters:
      instancePort - The port on which the instance is listening.
    • getInstancePort

      public Integer getInstancePort()

      The port on which the instance is listening.

      Returns:
      The port on which the instance is listening.
    • withInstancePort

      public Listener withInstancePort(Integer instancePort)

      The port on which the instance is listening.

      Parameters:
      instancePort - The port on which the instance is listening.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setSSLCertificateId

      public void setSSLCertificateId(String sSLCertificateId)

      The Amazon Resource Name (ARN) of the server certificate.

      Parameters:
      sSLCertificateId - The Amazon Resource Name (ARN) of the server certificate.
    • getSSLCertificateId

      public String getSSLCertificateId()

      The Amazon Resource Name (ARN) of the server certificate.

      Returns:
      The Amazon Resource Name (ARN) of the server certificate.
    • withSSLCertificateId

      public Listener withSSLCertificateId(String sSLCertificateId)

      The Amazon Resource Name (ARN) of the server certificate.

      Parameters:
      sSLCertificateId - The Amazon Resource Name (ARN) of the server certificate.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Listener clone()
      Overrides:
      clone in class Object