Compose Runtime - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Compose Runtime

Description:

Handle message calls. Constructor notification. Handle casting requests. 4 ... For each call the following is done: ... So self calls cause deadlock! Each ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 11
Provided by: tomst73
Category:

less

Transcript and Presenter's Notes

Title: Compose Runtime


1
Compose Runtime
  • Pascal Dürr

2
Filters_at_Runtime in Compose
3
MessageHandlingFacility
  • Interfaces with the code
  • ILICIT redirects all interesting things to the
    MHF
  • Events redirected to the MHF
  • Application Start
  • Handle message calls
  • Constructor notification
  • Handle casting requests

4
Application Start
  • A special start application is inserted in the
    code by ILICIT
  • ltapplication name"Jukebox.TheJukebox"gt
  • ltnotifyStart id"application_start"/gt
  • lt/applicationgt
  • Location of repository.xml
  • Runtime debug level
  • MessageHandlingFacility is called with this info

5
Runtime deserializing
  • The runtime deserializes the repository xml file.
  • The entire (public) repository is restored.
  • Pay attention in CompileTime
  • No interfaces as types
  • No transient stuff
  • No java 1.2 stuff
  • Empty constructor

6
Runtime shadows
  • For each compile time entity we have a runtime
    shadow.
  • This shadow is instantiate at load time
  • Each runtime entity implements an interpret
    method
  • Message m ? the message object
  • Context c ? a context, used for dynamic info
  • The RepositoryLinker links the compile time to
    the runtime.

7
Code example FilterElementRuntime
  • public boolean interpret(Message m, Dictionary
    context)
  • if(this.conditionpart.interpret(m,context))
  • boolean matches false
  • for(int i0 iltthis.matchingPatterns.size()
    i)
  • MatchingPatternRuntime mpr
    (MPR)this.matchingPatterns.get(i)
  • matches matches mpr.interpret(m,context)
  • if(this.theEnableOperatorTypeRuntime
    instanceof EnableOperatorRuntime)
  • returnvalue matches
  • else if(this.theEnableOperatorTypeRuntime
    instanceof DisableOperatorRuntime)
  • returnvalue !matches
  • return matches
  • else

8
Handle messages
  • A message is delivered to MHF
  • If an ObjectManager does not yet exists one is
    create
  • All internals for the superimposed FMs are
    instantiated
  • All externals are linked
  • Next the ObjectManager handles the
    incomming/outgoing messages.

9
  • For each call the following is done
  • First the message is passes through all output
    filters of the imposed filtermodules of the
    sender
  • Then the message is passes through all input
    filters of the target

10
  • The evaluation of a filter is based on the
    interpreter pattern
  • The evaluation of a filtermodule is atomic.
  • The ObjectManager locks the evaluation of new
    message until the old one is done.
  • So self calls cause deadlock!
  • Each filter have two actions
Write a Comment
User Comments (0)
About PowerShow.com