Class EndpointPort

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class EndpointPort
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    EndpointPort is a tuple that describes a single port.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  EndpointPort.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      EndpointPort()  
      EndpointPort​(java.lang.String appProtocol, java.lang.String name, @NonNull java.lang.Number port, java.lang.String protocol)  
    • Constructor Detail

      • EndpointPort

        public EndpointPort​(java.lang.String appProtocol,
                            java.lang.String name,
                            @NonNull
                            @NonNull java.lang.Number port,
                            java.lang.String protocol)
      • EndpointPort

        public EndpointPort()
    • Method Detail

      • getAppProtocol

        public java.lang.String getAppProtocol()
        The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:


        * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).


        * Kubernetes-defined prefixed names:

        * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540

        * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455

        * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455


        * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.

      • getName

        public java.lang.String getName()
        The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
      • getPort

        @NonNull
        public @NonNull java.lang.Number getPort()
        The port number of the endpoint.
      • getProtocol

        public java.lang.String getProtocol()
        The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
      • setAppProtocol

        public void setAppProtocol​(java.lang.String appProtocol)
        The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:


        * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).


        * Kubernetes-defined prefixed names:

        * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540

        * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455

        * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455


        * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.

      • setName

        public void setName​(java.lang.String name)
        The name of this port. This must match the 'name' field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
      • setPort

        public void setPort​(@NonNull
                            @NonNull java.lang.Number port)
        The port number of the endpoint.
      • setProtocol

        public void setProtocol​(java.lang.String protocol)
        The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object