Class: Baykit::BayServer::Docker::Http::HtpPortDocker
- Inherits:
-
Base::PortBase
- Object
- Base::PortBase
- Baykit::BayServer::Docker::Http::HtpPortDocker
- Includes:
- Bcf, Base, Baykit::BayServer::Docker::Http, H1, H2, HtpDocker, Protocol, Util
- Defined in:
- lib/baykit/bayserver/docker/http/htp_port_docker.rb
Constant Summary collapse
- DEFAULT_SUPPORT_H2 =
true
Constants included from HtpDocker
Baykit::BayServer::Docker::Http::HtpDocker::H1_PROTO_NAME, Baykit::BayServer::Docker::Http::HtpDocker::H2_PROTO_NAME
Instance Attribute Summary collapse
-
#support_h2 ⇒ Object
readonly
Returns the value of attribute support_h2.
Instance Method Summary collapse
-
#init(elm, parent) ⇒ Object
Implements Docker.
-
#init_key_val(kv) ⇒ Object
Implements DockerBase.
-
#initialize ⇒ HtpPortDocker
constructor
A new instance of HtpPortDocker.
-
#protocol ⇒ Object
Implements Port.
-
#support_anchored ⇒ Object
Implements PortBase.
- #support_unanchored ⇒ Object
Constructor Details
#initialize ⇒ HtpPortDocker
Returns a new instance of HtpPortDocker.
29 30 31 32 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 29 def initialize super @support_h2 = DEFAULT_SUPPORT_H2 end |
Instance Attribute Details
#support_h2 ⇒ Object (readonly)
Returns the value of attribute support_h2.
27 28 29 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 27 def support_h2 @support_h2 end |
Instance Method Details
#init(elm, parent) ⇒ Object
Implements Docker
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 38 def init(elm, parent) super if @support_h2 if @secure_docker != nil @secure_docker.set_app_protocols(["h2", "http/1.1"]) end H2ErrorCode.init() end end |
#init_key_val(kv) ⇒ Object
Implements DockerBase
53 54 55 56 57 58 59 60 61 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 53 def init_key_val(kv) case kv.key.downcase when "supporth2", "enableh2" @support_h2 = StringUtil.parse_bool(kv.value) else return super end return true end |
#protocol ⇒ Object
Implements Port
67 68 69 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 67 def protocol() return H1_PROTO_NAME end |
#support_anchored ⇒ Object
Implements PortBase
74 75 76 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 74 def support_anchored() return true end |
#support_unanchored ⇒ Object
78 79 80 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 78 def support_unanchored() return false end |