Package com.adaptris.jruby
Class ContainerBuilderImpl
- java.lang.Object
-
- com.adaptris.jruby.ContainerBuilderImpl
-
- All Implemented Interfaces:
ContainerBuilder
- Direct Known Subclasses:
AdvancedBuilder
,DefaultBuilder
public abstract class ContainerBuilderImpl extends java.lang.Object implements ContainerBuilder
-
-
Constructor Summary
Constructors Constructor Description ContainerBuilderImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.jruby.embed.ScriptingContainer
build()
protected abstract org.jruby.embed.ScriptingContainer
configure(org.jruby.embed.ScriptingContainer c)
org.jruby.RubyInstanceConfig.CompileMode
getCompileMode()
org.jruby.embed.LocalContextScope
getContextScope()
java.lang.String
getJrubyHome()
java.util.List<java.lang.String>
getLoadPaths()
org.jruby.embed.LocalVariableBehavior
getVariableBehaviour()
void
setCompileMode(org.jruby.RubyInstanceConfig.CompileMode m)
void
setContextScope(org.jruby.embed.LocalContextScope c)
Set the context scopevoid
setJrubyHome(java.lang.String d)
void
setLoadPaths(java.util.List<java.lang.String> paths)
Set any additional directories that need to be added viaScriptingContainer.setLoadPaths()
.void
setVariableBehaviour(org.jruby.embed.LocalVariableBehavior b)
Set the variable behaviourvoid
terminate(org.jruby.embed.ScriptingContainer c)
<T extends ContainerBuilderImpl>
TwithCompileMode(org.jruby.RubyInstanceConfig.CompileMode s)
<T extends ContainerBuilderImpl>
TwithContextScope(org.jruby.embed.LocalContextScope s)
<T extends ContainerBuilderImpl>
TwithJrubyHome(java.lang.String s)
<T extends ContainerBuilderImpl>
TwithLoadPaths(java.lang.String... strings)
<T extends ContainerBuilderImpl>
TwithVariableBehaviour(org.jruby.embed.LocalVariableBehavior s)
-
-
-
Method Detail
-
build
public org.jruby.embed.ScriptingContainer build() throws CoreException
- Specified by:
build
in interfaceContainerBuilder
- Throws:
CoreException
-
terminate
public void terminate(org.jruby.embed.ScriptingContainer c)
- Specified by:
terminate
in interfaceContainerBuilder
-
configure
protected abstract org.jruby.embed.ScriptingContainer configure(org.jruby.embed.ScriptingContainer c) throws CoreException
- Throws:
CoreException
-
getContextScope
public org.jruby.embed.LocalContextScope getContextScope()
- Returns:
- the contextScope
-
setContextScope
public void setContextScope(org.jruby.embed.LocalContextScope c)
Set the context scope- Parameters:
c
- the contextScope to set; default isLocalContextScope.THREADSAFE
-
withContextScope
public <T extends ContainerBuilderImpl> T withContextScope(org.jruby.embed.LocalContextScope s)
-
getVariableBehaviour
public org.jruby.embed.LocalVariableBehavior getVariableBehaviour()
- Returns:
- the variableBehaviour
-
setVariableBehaviour
public void setVariableBehaviour(org.jruby.embed.LocalVariableBehavior b)
Set the variable behaviour- Parameters:
b
- the variableBehaviour to set; default isLocalVariableBehavior.TRANSIENT
-
withVariableBehaviour
public <T extends ContainerBuilderImpl> T withVariableBehaviour(org.jruby.embed.LocalVariableBehavior s)
-
getLoadPaths
public java.util.List<java.lang.String> getLoadPaths()
- Returns:
- the loadPaths
-
setLoadPaths
public void setLoadPaths(java.util.List<java.lang.String> paths)
Set any additional directories that need to be added viaScriptingContainer.setLoadPaths()
.- Parameters:
paths
- the loadPaths to set
-
withLoadPaths
public <T extends ContainerBuilderImpl> T withLoadPaths(java.lang.String... strings)
-
getCompileMode
public org.jruby.RubyInstanceConfig.CompileMode getCompileMode()
- Returns:
- the compileMode
-
setCompileMode
public void setCompileMode(org.jruby.RubyInstanceConfig.CompileMode m)
- Parameters:
m
- the compileMode to set; default isJIT
-
withCompileMode
public <T extends ContainerBuilderImpl> T withCompileMode(org.jruby.RubyInstanceConfig.CompileMode s)
-
getJrubyHome
public java.lang.String getJrubyHome()
- Returns:
- the jrubyHomeDir
-
setJrubyHome
public void setJrubyHome(java.lang.String d)
- Parameters:
d
- the jrubyHomeDir to set
-
withJrubyHome
public <T extends ContainerBuilderImpl> T withJrubyHome(java.lang.String s)
-
-