Changeset 125 for Arrow/trunk/lib/arrow/applet.rb
- Timestamp:
- 07/26/04 10:24:39 (4 years ago)
- Files:
-
- 1 modified
-
Arrow/trunk/lib/arrow/applet.rb (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Arrow/trunk/lib/arrow/applet.rb
r116 r125 32 32 # }, 33 33 # }, 34 # :monitors => {35 # :averageExecutionTimer => {36 # :description =>37 # "Average execution time of each applet method.",38 # :type => AverageTimerTable,39 # },40 # :cumulativeRuntime => {41 # :description =>42 # "Total time used by this applet.",43 # :type => TotalTimer,44 # }45 # }46 34 # } 47 35 # 48 # # Define the 'display' action36 # # Define the 'display' action 49 37 # action( 'display' ) {|txn| 50 # Monitor[self].cumulativeRuntime.time do 51 # char = txn.vargs[:char] || 'x' 52 # char_page = self.make_character_page( char ) 53 # templ = self.loadTemplate( :main ) 54 # templ.char_page = char_page 55 # 56 # return templ 57 # end 38 # char = txn.vargs[:char] || 'x' 39 # char_page = self.make_character_page( char ) 40 # templ = self.loadTemplate( :main ) 41 # templ.char_page = char_page 42 # 43 # return templ 58 44 # } 59 45 # … … 63 49 # # the related signature values can be set. 64 50 # formaction = action( :form ) {|txn| 65 # Monitor[self].cumulativeRuntime.time do 66 # templ = self.loadTemplate( :form ) 67 # templ.txn = txn 68 # return templ 69 # end 51 # templ = self.loadTemplate( :form ) 52 # templ.txn = txn 53 # return templ 70 54 # } 71 55 # formaction.template = "form.tmpl" 72 56 # 57 # # Make a page full of 73 58 # def make_character_page( char ) 74 # Monitor[self].averageExecutionTimer.time( :make_character_page ) do 75 # page = (char * 80) 59 # page = '' 60 # 40.times do 61 # page << (char * 80) << "\n" 76 62 # end 77 63 # end … … 404 390 405 391 406 ### Create a new Arrow::Applet object with the specified +config+ 407 ### (an Arrow::Config object) and +templateFactory+ (an 408 ### Arrow::TemplateFactory object). 409 def initialize( config, templateFactory ) 410 @config = config 411 @templateFactory = templateFactory 412 @signature = self.class.signature 413 @runCount = 0 414 @totalUtime = 0 415 @totalStime = 0 392 ### Create a new Arrow::Applet object with the specified +config+ (an 393 ### Arrow::Config object), +templateFactory+ (an Arrow::TemplateFactory 394 ### object), and the +uri+ the applet will live under in the appserver (a 395 ### String). 396 def initialize( config, templateFactory, uri ) 397 @config = config 398 @templateFactory = templateFactory 399 @uri = uri 400 401 @signature = self.class.signature 402 @runCount = 0 403 @totalUtime = 0 404 @totalStime = 0 416 405 417 406 # Make a regexp out of all public <something>_action methods … … 429 418 # The Arrow::Config object which contains the system's configuration. 430 419 attr_accessor :config 420 421 # The URI the applet answers to 422 attr_reader :uri 431 423 432 424 # The Struct that contains the configuration values for this applet
