org.jruby.ext.ffi.jffi
Class CallbackManager

java.lang.Object
  extended by org.jruby.ext.ffi.CallbackManager
      extended by org.jruby.ext.ffi.jffi.CallbackManager

public class CallbackManager
extends CallbackManager

Manages Callback instances for the low level FFI backend.


Constructor Summary
CallbackManager()
           
 
Method Summary
static RubyClass createCallbackClass(Ruby runtime, RubyModule module)
          Creates a Callback class for a ruby runtime
 Pointer getCallback(Ruby runtime, CallbackInfo cbInfo, java.lang.Object proc)
          Gets a Callback object conforming to the signature contained in the CallbackInfo for the ruby Proc or Block instance.
static CallbackManager getInstance()
          Gets the singleton instance of CallbackManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallbackManager

public CallbackManager()
Method Detail

getInstance

public static final CallbackManager getInstance()
Gets the singleton instance of CallbackManager


createCallbackClass

public static RubyClass createCallbackClass(Ruby runtime,
                                            RubyModule module)
Creates a Callback class for a ruby runtime

Parameters:
runtime - The runtime to create the class for
module - The module to place the class in
Returns:
The newly created ruby class

getCallback

public final Pointer getCallback(Ruby runtime,
                                 CallbackInfo cbInfo,
                                 java.lang.Object proc)
Gets a Callback object conforming to the signature contained in the CallbackInfo for the ruby Proc or Block instance.

Specified by:
getCallback in class CallbackManager
Parameters:
runtime - The ruby runtime the callback is attached to
cbInfo - The signature of the native callback
proc - The ruby Proc or Block object to call when the callback is invoked.
Returns:
A native value returned to the native caller.


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