org.jruby.runtime
Class EventHook

java.lang.Object
  extended by org.jruby.runtime.EventHook
Direct Known Subclasses:
Ruby.CallTraceFuncHook

public abstract class EventHook
extends java.lang.Object

Author:
headius, hooligan495 Changed event hook to an enum that manages a collection of event handlers. There are now global event delgators for each event type. If a component is interested in being notified of an event they should register a handler with that event. one of the motivations of implementing the EventHook in this way is that we needed to handle modifying line numbers to be one based (and the RETURN type ine number for ruby needs to be offset by 2). If these rules ever change we can change them here.

Constructor Summary
EventHook()
           
 
Method Summary
 void event(ThreadContext context, RubyEvent event, java.lang.String file, int line, java.lang.String name, IRubyObject type)
           
abstract  void eventHandler(ThreadContext context, java.lang.String eventName, java.lang.String file, int line, java.lang.String name, IRubyObject type)
           
abstract  boolean isInterestedInEvent(RubyEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventHook

public EventHook()
Method Detail

event

public void event(ThreadContext context,
                  RubyEvent event,
                  java.lang.String file,
                  int line,
                  java.lang.String name,
                  IRubyObject type)

eventHandler

public abstract void eventHandler(ThreadContext context,
                                  java.lang.String eventName,
                                  java.lang.String file,
                                  int line,
                                  java.lang.String name,
                                  IRubyObject type)

isInterestedInEvent

public abstract boolean isInterestedInEvent(RubyEvent event)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.