Class SocketAddress.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<SocketAddress.Builder>
com.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
io.envoyproxy.envoy.config.core.v3.SocketAddress.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,SocketAddressOrBuilder,Cloneable
- Enclosing class:
SocketAddress
public static final class SocketAddress.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
implements SocketAddressOrBuilder
[#next-free-field: 7]Protobuf type
envoy.config.core.v3.SocketAddress-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()private voidbuildPartial0(SocketAddress result) private voidbuildPartialOneofs(SocketAddress result) clear()The address for this socket.When binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_.This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.uint32 port_value = 3 [(.validate.rules) = { ....envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ...The name of the custom resolver.The address for this socket.com.google.protobuf.ByteStringThe address for this socket.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanWhen binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_.This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.com.google.protobuf.ByteStringThis is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.intuint32 port_value = 3 [(.validate.rules) = { ....envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ...int.envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ...The name of the custom resolver.com.google.protobuf.ByteStringThe name of the custom resolver.booleanThis is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.booleanuint32 port_value = 3 [(.validate.rules) = { ...protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(SocketAddress other) setAddress(String value) The address for this socket.setAddressBytes(com.google.protobuf.ByteString value) The address for this socket.setIpv4Compat(boolean value) When binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_.setNamedPort(String value) This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.setNamedPortBytes(com.google.protobuf.ByteString value) This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.setPortValue(int value) uint32 port_value = 3 [(.validate.rules) = { ....envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ...setProtocolValue(int value) .envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ...setResolverName(String value) The name of the custom resolver.setResolverNameBytes(com.google.protobuf.ByteString value) The name of the custom resolver.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
portSpecifierCase_
private int portSpecifierCase_ -
portSpecifier_
-
bitField0_
private int bitField0_ -
protocol_
private int protocol_ -
address_
-
resolverName_
-
ipv4Compat_
private boolean ipv4Compat_
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial0
-
buildPartialOneofs
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SocketAddress.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SocketAddress.Builder>
-
mergeFrom
public SocketAddress.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SocketAddress.Builder>- Throws:
IOException
-
getPortSpecifierCase
- Specified by:
getPortSpecifierCasein interfaceSocketAddressOrBuilder
-
clearPortSpecifier
-
getProtocolValue
public int getProtocolValue().envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }- Specified by:
getProtocolValuein interfaceSocketAddressOrBuilder- Returns:
- The enum numeric value on the wire for protocol.
-
setProtocolValue
.envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }- Parameters:
value- The enum numeric value on the wire for protocol to set.- Returns:
- This builder for chaining.
-
getProtocol
.envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }- Specified by:
getProtocolin interfaceSocketAddressOrBuilder- Returns:
- The protocol.
-
setProtocol
.envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }- Parameters:
value- The protocol to set.- Returns:
- This builder for chaining.
-
clearProtocol
.envoy.config.core.v3.SocketAddress.Protocol protocol = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
getAddress
The address for this socket. :ref:`Listeners <config_listeners>` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address controls the source address of outbound connections. For :ref:`clusters <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
string address = 2 [(.validate.rules) = { ... }- Specified by:
getAddressin interfaceSocketAddressOrBuilder- Returns:
- The address.
-
getAddressBytes
public com.google.protobuf.ByteString getAddressBytes()The address for this socket. :ref:`Listeners <config_listeners>` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address controls the source address of outbound connections. For :ref:`clusters <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
string address = 2 [(.validate.rules) = { ... }- Specified by:
getAddressBytesin interfaceSocketAddressOrBuilder- Returns:
- The bytes for address.
-
setAddress
The address for this socket. :ref:`Listeners <config_listeners>` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address controls the source address of outbound connections. For :ref:`clusters <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
string address = 2 [(.validate.rules) = { ... }- Parameters:
value- The address to set.- Returns:
- This builder for chaining.
-
clearAddress
The address for this socket. :ref:`Listeners <config_listeners>` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address controls the source address of outbound connections. For :ref:`clusters <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
string address = 2 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
setAddressBytes
The address for this socket. :ref:`Listeners <config_listeners>` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch <envoy_v3_api_msg_config.listener.v3.FilterChainMatch>`.] When used within an upstream :ref:`BindConfig <envoy_v3_api_msg_config.core.v3.BindConfig>`, the address controls the source address of outbound connections. For :ref:`clusters <envoy_v3_api_msg_config.cluster.v3.Cluster>`, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>`.
string address = 2 [(.validate.rules) = { ... }- Parameters:
value- The bytes for address to set.- Returns:
- This builder for chaining.
-
hasPortValue
public boolean hasPortValue()uint32 port_value = 3 [(.validate.rules) = { ... }- Specified by:
hasPortValuein interfaceSocketAddressOrBuilder- Returns:
- Whether the portValue field is set.
-
getPortValue
public int getPortValue()uint32 port_value = 3 [(.validate.rules) = { ... }- Specified by:
getPortValuein interfaceSocketAddressOrBuilder- Returns:
- The portValue.
-
setPortValue
uint32 port_value = 3 [(.validate.rules) = { ... }- Parameters:
value- The portValue to set.- Returns:
- This builder for chaining.
-
clearPortValue
uint32 port_value = 3 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
hasNamedPort
public boolean hasNamedPort()This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Specified by:
hasNamedPortin interfaceSocketAddressOrBuilder- Returns:
- Whether the namedPort field is set.
-
getNamedPort
This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Specified by:
getNamedPortin interfaceSocketAddressOrBuilder- Returns:
- The namedPort.
-
getNamedPortBytes
public com.google.protobuf.ByteString getNamedPortBytes()This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Specified by:
getNamedPortBytesin interfaceSocketAddressOrBuilder- Returns:
- The bytes for namedPort.
-
setNamedPort
This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Parameters:
value- The namedPort to set.- Returns:
- This builder for chaining.
-
clearNamedPort
This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Returns:
- This builder for chaining.
-
setNamedPortBytes
This is only valid if :ref:`resolver_name <envoy_v3_api_field_config.core.v3.SocketAddress.resolver_name>` is specified below and the named resolver is capable of named port resolution.
string named_port = 4;- Parameters:
value- The bytes for namedPort to set.- Returns:
- This builder for chaining.
-
getResolverName
The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
string resolver_name = 5;- Specified by:
getResolverNamein interfaceSocketAddressOrBuilder- Returns:
- The resolverName.
-
getResolverNameBytes
public com.google.protobuf.ByteString getResolverNameBytes()The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
string resolver_name = 5;- Specified by:
getResolverNameBytesin interfaceSocketAddressOrBuilder- Returns:
- The bytes for resolverName.
-
setResolverName
The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
string resolver_name = 5;- Parameters:
value- The resolverName to set.- Returns:
- This builder for chaining.
-
clearResolverName
The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
string resolver_name = 5;- Returns:
- This builder for chaining.
-
setResolverNameBytes
The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.
string resolver_name = 5;- Parameters:
value- The bytes for resolverName to set.- Returns:
- This builder for chaining.
-
getIpv4Compat
public boolean getIpv4Compat()When binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:<IPv4-address>``.
bool ipv4_compat = 6;- Specified by:
getIpv4Compatin interfaceSocketAddressOrBuilder- Returns:
- The ipv4Compat.
-
setIpv4Compat
When binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:<IPv4-address>``.
bool ipv4_compat = 6;- Parameters:
value- The ipv4Compat to set.- Returns:
- This builder for chaining.
-
clearIpv4Compat
When binding to an IPv6 address above, this enables `IPv4 compatibility <https://tools.ietf.org/html/rfc3493#page-11>`_. Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:<IPv4-address>``.
bool ipv4_compat = 6;- Returns:
- This builder for chaining.
-