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 .
Constructor and Description |
---|
Listener()
Default constructor for a new Listener object.
|
Listener(String protocol,
Integer loadBalancerPort,
Integer instancePort)
Constructs a new Listener object.
|
Modifier and Type | Method and 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.
|
public Listener()
public Listener(String protocol, Integer loadBalancerPort, Integer instancePort)
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.public String getProtocol()
public void setProtocol(String protocol)
protocol
- The load balancer transport protocol to use for routing: HTTP, HTTPS,
TCP, or SSL.public Listener withProtocol(String protocol)
Returns a reference to this object so that method calls can be chained together.
protocol
- The load balancer transport protocol to use for routing: HTTP, HTTPS,
TCP, or SSL.public Integer getLoadBalancerPort()
public void setLoadBalancerPort(Integer loadBalancerPort)
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.public Listener withLoadBalancerPort(Integer loadBalancerPort)
Returns a reference to this object so that method calls can be chained together.
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.public String getInstanceProtocol()
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.
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.
public void setInstanceProtocol(String instanceProtocol)
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.
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.
public Listener withInstanceProtocol(String instanceProtocol)
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 a reference to this object so that method calls can be chained together.
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.
public Integer getInstancePort()
Constraints:
Range: 1 - 65535
public void setInstancePort(Integer instancePort)
Constraints:
Range: 1 - 65535
instancePort
- The port on which the instance is listening.public Listener withInstancePort(Integer instancePort)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 65535
instancePort
- The port on which the instance is listening.public String getSSLCertificateId()
public void setSSLCertificateId(String sSLCertificateId)
sSLCertificateId
- The Amazon Resource Name (ARN) of the server certificate.public Listener withSSLCertificateId(String sSLCertificateId)
Returns a reference to this object so that method calls can be chained together.
sSLCertificateId
- The Amazon Resource Name (ARN) of the server certificate.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.