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, WaterCraft
- 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.
31 32 33 34 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 31 def initialize super @support_h2 = DEFAULT_SUPPORT_H2 end |
Instance Attribute Details
#support_h2 ⇒ Object (readonly)
Returns the value of attribute support_h2.
29 30 31 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 29 def support_h2 @support_h2 end |
Instance Method Details
#init(elm, parent) ⇒ Object
Implements Docker
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 40 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
55 56 57 58 59 60 61 62 63 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 55 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
69 70 71 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 69 def protocol() return H1_PROTO_NAME end |
#support_anchored ⇒ Object
Implements PortBase
76 77 78 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 76 def support_anchored() return true end |
#support_unanchored ⇒ Object
80 81 82 |
# File 'lib/baykit/bayserver/docker/http/htp_port_docker.rb', line 80 def support_unanchored() return false end |