org.jruby.embed.internal
Interface LocalContextProvider

All Known Implementing Classes:
AbstractLocalContextProvider, ConcurrentLocalContextProvider, SingleThreadLocalContextProvider, SingletonLocalContextProvider, ThreadSafeLocalContextProvider

public interface LocalContextProvider

LocalContextProvider provides an instance of LocalContext from a specified scope defined by LocalContextScope. Users can configure Ruby runtime by using methods of this interface before Ruby runtime is used. Default scope is LocalContextScope.THREADSAFE.

Author:
Yoko Harada

Method Summary
 java.util.Map getAttributeMap()
          Returns an attribute map of a specified scope.
 LocalVariableBehavior getLocalVariableBehavior()
          Returns a local variable behavior associated to the scope.
 RubyInstanceConfig getRubyInstanceConfig()
          Gets an instance of RubyInstanceConfig.
 Ruby getRuntime()
          Returns a Ruby runtime of a specified scope.
 BiVariableMap getVarMap()
          Returns a BiVariableMap of a specified scope.
 boolean isRuntimeInitialized()
          Tests whether Ruby runtime has been initialized or not.
 void setClassCache(ClassCache classCache)
          Deprecated. 
 void setLoadPaths(java.util.List loadPaths)
          Deprecated. 
 void terminate()
          Clears up a variable map.
 

Method Detail

setLoadPaths

@Deprecated
void setLoadPaths(java.util.List loadPaths)
Deprecated. 

Sets a scripts' loading path to a Ruby runtime.

Parameters:
loadPaths - is a list of paths to load scritps

setClassCache

@Deprecated
void setClassCache(ClassCache classCache)
Deprecated. 

Sets a class cash option to a Ruby runtime.

Parameters:
classCache - is a class cache option

getRubyInstanceConfig

RubyInstanceConfig getRubyInstanceConfig()
Gets an instance of RubyInstanceConfig.

Returns:
an instance of RubyInstanceConfig.

isRuntimeInitialized

boolean isRuntimeInitialized()
Tests whether Ruby runtime has been initialized or not.

Returns:
true if initialized, false otherwise.

getRuntime

Ruby getRuntime()
Returns a Ruby runtime of a specified scope.

Returns:
a Ruby runtime

getLocalVariableBehavior

LocalVariableBehavior getLocalVariableBehavior()
Returns a local variable behavior associated to the scope.

Returns:
a local variable behavior

getVarMap

BiVariableMap getVarMap()
Returns a BiVariableMap of a specified scope.

Returns:
a variable map

getAttributeMap

java.util.Map getAttributeMap()
Returns an attribute map of a specified scope.

Returns:
an attribute map

terminate

void terminate()
Clears up a variable map.



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