Feature #1737

Feature #44: Implement basic introspection support

Implement participant creation and destruction hooks

Added by J. Moringen over 7 years ago. Updated almost 7 years ago.

Status:ResolvedStart date:03/24/2014
Priority:NormalDue date:03/24/2014
Assignee:J. Wienke% Done:

100%

Category:Java
Target version:rsb-0.11

Associated revisions

Revision c390bb00
Added by S. Wrede over 7 years ago

realized observer pattern as hook for participant creation and desctruction, initially implemented for Listener objects, refs #1737

Revision 9d56ed13
Added by S. Wrede almost 7 years ago

extended factory code to notify about LocalServer, RemoteServer and
Informer creation and destruction
added test case for the factory observer mechanism
added call to deactivate method of the Participant class to Informer and
Server classes
refs #1737

Revision 03ce183e
Added by J. Wienke almost 7 years ago

Observer pattern for participant changes

Adds an observer pattern to Factory to be notified whenever participants
are created or destroyed. This will enable the introspection to hook
into the creation and destruction process.

  • src/rsb/Factory.java:
    Added management of observers in a new child class called
    ParticipantObserverManager; pass the observer manager instance to
    newly created participants so that they can notify observers when they
    are deactivated
  • src/rsb/Participant.java:
    accept a ParticipantObserverManager and call it on deactivation
  • src/rsb/Informer.java: ensure superclass deactivation
  • src/rsb/Listener.java: likewise
  • src/rsb/patterns/Method.java: likewise
  • src/rsb/ParticipantObserver.java: new observer interface
  • src/rsb/patterns/Server.java:
    ensure superclass deactivation; notify ParticipantObservers of new
    methods, which are not constructed by the Factory
  • test/rsb/ParticipantObservationTest.java:
    new test case for observer pattern

Based on original patch by Sebastian Wrede
<>.

fixes #1737

Signed-off-by: Jan Moringen <>

History

#1 Updated by J. Moringen over 7 years ago

  • Assignee set to S. Wrede

#2 Updated by J. Moringen over 7 years ago

  • Assignee changed from S. Wrede to S. Sharma

#3 Updated by S. Wrede over 7 years ago

  • Status changed from New to In Progress
  • Assignee changed from S. Sharma to S. Wrede
  • % Done changed from 0 to 20

Realized infrastructure and tested for Listener participants.

#4 Updated by S. Wrede almost 7 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 20 to 100

Basic implementation for all participant types done and intial test available.

#5 Updated by J. Wienke almost 7 years ago

  • Status changed from Feedback to In Progress
  • Assignee changed from S. Wrede to J. Wienke

#6 Updated by J. Wienke almost 7 years ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF