Method: Arrow::Transaction#initialize

Defined in:
lib/arrow/transaction.rb

#initialize(request, config, broker) ⇒ Transaction

Create a new Arrow::Transaction object with the specified request (an Apache::Request object), config (an Arrow::Config object), broker object (an Arrow::Broker), and session (Arrow::Session) objects.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/arrow/transaction.rb', line 76

def initialize( request, config, broker )
  @request         = request
  @config          = config
  @broker          = broker
  @handler_status  = Apache::OK

  @serial          = make_transaction_serial( request )

  # Stuff that may be filled in later
  @session         = nil # Lazily-instantiated
  @applet_path     = nil # Added by the broker
  @vargs           = nil # Filled in by the applet
  @data            = {}
  @request_cookies = parse_cookies( request )
  @cookies         = Arrow::CookieSet.new()
  @accepted_types  = nil

  # Check for a "RubyOption root_dispatcher true"
  if @request.options.key?('root_dispatcher') &&
    @request.options['root_dispatcher'].match( /^(true|yes|1)$/i )
    self.log.debug "Dispatching from root path"
    @root_dispatcher = true
  else
    self.log.debug "Dispatching from sub-path"
    @root_dispatcher = false
  end

  @request.sync_header = true
  super()
end