Package org.apache.kafka.common
Class Endpoint
- java.lang.Object
-
- org.apache.kafka.common.Endpoint
-
@Evolving public class Endpoint extends java.lang.Object
Represents a broker endpoint.
-
-
Constructor Summary
Constructors Constructor Description Endpoint(java.lang.String listenerName, SecurityProtocol securityProtocol, java.lang.String host, int port)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
host()
Returns advertised host name of this endpoint.java.util.Optional<java.lang.String>
listenerName()
Returns the listener name of this endpoint.int
port()
Returns the port to which the listener is bound.SecurityProtocol
securityProtocol()
Returns the security protocol of this endpoint.java.lang.String
toString()
-
-
-
Constructor Detail
-
Endpoint
public Endpoint(java.lang.String listenerName, SecurityProtocol securityProtocol, java.lang.String host, int port)
-
-
Method Detail
-
listenerName
public java.util.Optional<java.lang.String> listenerName()
Returns the listener name of this endpoint. This is non-empty for endpoints provided to broker plugins, but may be empty when used in clients.
-
securityProtocol
public SecurityProtocol securityProtocol()
Returns the security protocol of this endpoint.
-
host
public java.lang.String host()
Returns advertised host name of this endpoint.
-
port
public int port()
Returns the port to which the listener is bound.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-