Top Description Methods
org.jruby.embed.internal

public Interface LocalContextProvider

Known Direct Implementers
org.jruby.embed.internal.AbstractLocalContextProvider
Imports
java.util.Map, org.jruby.Ruby, .RubyInstanceConfig, org.jruby.embed.LocalVariableBehavior

LocalContextProvider provides an instance of org.jruby.embed.internal.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

Modifier and TypeMethod and Description
public Map<K, V>

Returns:

an attribute map
getAttributeMap
()

Returns an attribute map of a specified scope.

public LocalVariableBehavior

Returns:

a local variable behavior
getLocalVariableBehavior
()

Returns a local variable behavior associated to the scope.

public RubyInstanceConfig

Returns:

an instance of RubyInstanceConfig.
getRubyInstanceConfig
()

Gets an instance of org.jruby.RubyInstanceConfig.

public Ruby

Returns:

a Ruby runtime
getRuntime
()

Returns a Ruby runtime of a specified scope.

public BiVariableMap

Returns:

a variable map
getVarMap
()

Returns a BiVariableMap of a specified scope.

public boolean

Returns:

true if initialized, false otherwise.
isRuntimeInitialized
()

Tests whether Ruby runtime has been initialized or not.

public void
terminate()

Clears up a variable map.

Method Detail

getAttributeMapback to summary
public Map<K, V> getAttributeMap()

Returns an attribute map of a specified scope.

Returns:Map<K, V>

an attribute map

getLocalVariableBehaviorback to summary
public LocalVariableBehavior getLocalVariableBehavior()

Returns a local variable behavior associated to the scope.

Returns:LocalVariableBehavior

a local variable behavior

getRubyInstanceConfigback to summary
public RubyInstanceConfig getRubyInstanceConfig()

Gets an instance of org.jruby.RubyInstanceConfig.

Returns:RubyInstanceConfig

an instance of RubyInstanceConfig.

getRuntimeback to summary
public Ruby getRuntime()

Returns a Ruby runtime of a specified scope.

Returns:Ruby

a Ruby runtime

getVarMapback to summary
public BiVariableMap getVarMap()

Returns a BiVariableMap of a specified scope.

Returns:BiVariableMap

a variable map

isRuntimeInitializedback to summary
public boolean isRuntimeInitialized()

Tests whether Ruby runtime has been initialized or not.

Returns:boolean

true if initialized, false otherwise.

terminateback to summary
public void terminate()

Clears up a variable map.