Class: Baykit::BayServer::Docker::Ajp::Command::CmdEndResponse

Inherits:
AjpCommand
  • Object
show all
Defined in:
lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb

Instance Attribute Summary collapse

Attributes inherited from AjpCommand

#to_server

Instance Method Summary collapse

Methods inherited from AjpCommand

#pack_header

Constructor Details

#initializeCmdEndResponse

Returns a new instance of CmdEndResponse.



19
20
21
# File 'lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb', line 19

def initialize
  super(AjpType::END_RESPONSE, false)
end

Instance Attribute Details

#reuseObject

Returns the value of attribute reuse.



17
18
19
# File 'lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb', line 17

def reuse
  @reuse
end

Instance Method Details

#handle(handler) ⇒ Object



39
40
41
# File 'lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb', line 39

def handle(handler)
  return handler.handle_end_response(self)
end

#pack(pkt) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb', line 23

def pack(pkt)
  acc = pkt.new_ajp_data_accessor
  acc.put_byte(@type)
  acc.put_byte(@reuse ? 1 : 0)

  #  must be called from last line
  super
end

#unpack(pkt) ⇒ Object



32
33
34
35
36
37
# File 'lib/baykit/bayserver/docker/ajp/command/cmd_end_response.rb', line 32

def unpack(pkt)
  super
  acc = pkt.new_ajp_data_accessor()
  acc.get_byte()   # prefix code
  @reuse = acc.get_byte() != 0
end