Class Listener
- 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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Listener
clone()
boolean
equals(Object obj)
Integer
getInstancePort()
The port on which the instance is listening.String
getInstanceProtocol()
The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.Integer
getLoadBalancerPort()
The port on which the load balancer is listening.String
getProtocol()
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.String
getSSLCertificateId()
The Amazon Resource Name (ARN) of the server certificate.int
hashCode()
void
setInstancePort(Integer instancePort)
The port on which the instance is listening.void
setInstanceProtocol(String instanceProtocol)
The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.void
setLoadBalancerPort(Integer loadBalancerPort)
The port on which the load balancer is listening.void
setProtocol(String protocol)
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.void
setSSLCertificateId(String sSLCertificateId)
The Amazon Resource Name (ARN) of the server certificate.String
toString()
Returns a string representation of this object; useful for testing and debugging.Listener
withInstancePort(Integer instancePort)
The port on which the instance is listening.Listener
withInstanceProtocol(String instanceProtocol)
The protocol to use for routing traffic to back-end instances: HTTP, HTTPS, TCP, or SSL.Listener
withLoadBalancerPort(Integer loadBalancerPort)
The port on which the load balancer is listening.Listener
withProtocol(String protocol)
The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.Listener
withSSLCertificateId(String sSLCertificateId)
The Amazon Resource Name (ARN) of the server certificate.
-
-
-
Constructor Detail
-
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 Detail
-
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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
whoseInstanceProtocol
is secure, (HTTPS or SSL), the listener'sInstanceProtocol
must also be secure.If there is another listener with the same
InstancePort
whoseInstanceProtocol
is HTTP or TCP, the listener'sInstanceProtocol
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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
-