Class JNetCoreBase<T>
Public entry point of JNetCoreBase<T>
public abstract class JNetCoreBase<T> : SetupJVMWrapper<T>, IJVMWrapperManagement, IJVMBridgeCore where T : JNetCoreBase<T>
Type Parameters
T
- Inheritance
-
JNetCoreBase<T>
- Implements
- Derived
- Inherited Members
-
SetupJVMWrapper<T>.ScopedOnSetupJVMWrapper<T>.ScopedOnVersionSetupJVMWrapper.Initialize()SetupJVMWrapper.InitializeRemote()
- Extension Methods
Constructors
JNetCoreBase()
Public ctor
public JNetCoreBase()
Fields
JARsSubFolder
The path where JARs are stored
public const string JARsSubFolder = "jars"
Field Value
Parser
Command line Parser instance
protected static readonly Parser Parser
Field Value
Properties
ApplicationDebugSuspendFlag
Sets the value of DebugSuspendFlag
public static string ApplicationDebugSuspendFlag { get; set; }
Property Value
ApplicationEnableDebug
Sets the value of EnableDebug
public static bool? ApplicationEnableDebug { get; set; }
Property Value
- bool?
ApplicationHeapSize
Sets the global value of GlobalHeapSize
public static string ApplicationHeapSize { get; set; }
Property Value
ApplicationInitialHeapSize
Sets the global value of the InitialHeapSize
public static string ApplicationInitialHeapSize { get; set; }
Property Value
ApplicationJDKHome
Sets the value of JDKHome
public static string ApplicationJDKHome { get; set; }
Property Value
ApplicationJNIOutputFile
Sets the value of JNIOutputFile
public static string ApplicationJNIOutputFile { get; set; }
Property Value
ApplicationJNIVerbosity
Sets the value of JNIVerbosity
public static string ApplicationJNIVerbosity { get; set; }
Property Value
ApplicationJVMExtraOptions
Generic extra options to be used from JVM
public static IDictionary<string, string> ApplicationJVMExtraOptions { get; }
Property Value
ApplicationJVMPath
Sets the value of JVMPath
public static string ApplicationJVMPath { get; set; }
Property Value
ApplicationJavaDebugOpts
Sets the value of JavaDebugOpts
public static string ApplicationJavaDebugOpts { get; set; }
Property Value
ApplicationJavaDebugPort
Sets the value of JavaDebugPort
public static short? ApplicationJavaDebugPort { get; set; }
Property Value
ApplicationJmxPort
Sets the value of JmxPort
public static short? ApplicationJmxPort { get; set; }
Property Value
ApplicationLicensePath
Sets the value of LicensePath
public static string ApplicationLicensePath { get; set; }
Property Value
ApplicationLogClassPath
Sets the global value of the log class path
public static bool? ApplicationLogClassPath { get; set; }
Property Value
- bool?
ApplicationWriteEventOrExceptionOnCmdLine
Sets the global value to show events from the underlying JCOBridge engine
public static bool? ApplicationWriteEventOrExceptionOnCmdLine { get; set; }
Property Value
- bool?
ClassPath
The starting JVM class path. Further path can be added later.
public override sealed string ClassPath { get; }
Property Value
Remarks
It is not the same classpath switch available in CLI. No wildcards expansion is made at this level. Use ClassPathBuilder in this case.
CommandLineArguments
IEnumerable<T> for command line
public virtual IEnumerable<IArgumentMetadata> CommandLineArguments { get; }
Property Value
DebugSuspendFlag
Enables Debug
public override string DebugSuspendFlag { get; }
Property Value
EnableDebug
Enables Debug
public override bool EnableDebug { get; }
Property Value
EventOrExceptionEvent
Set the handler to receive events raised from the underlying JCOBridge engine; see SetEventOrExceptionHandler(EventHandler<EventOrExceptionEventArgs>)
public Action<EventOrExceptionEventArgs> EventOrExceptionEvent { get; set; }
Property Value
GlobalHeapSize
Sets the global heap size
public override string GlobalHeapSize { get; }
Property Value
InitialHeapSize
Sets the initial heap size
public override string InitialHeapSize { get; }
Property Value
JDKHome
The path where is located the JRE of the installed JDK
public override string JDKHome { get; }
Property Value
JNIOutputFile
The path where the JNI verbose info will be written. The file will be opened in append mode.
public override string JNIOutputFile { get; }
Property Value
JNIVerbosity
Sets the verbosity of the JNI interface. See oracle documentation.
public override string JNIVerbosity { get; }
Property Value
JVMOptions
The options to pass to the JVM when a JVM will be created
public override sealed IEnumerable<KeyValuePair<string, string>> JVMOptions { get; }
Property Value
JVMPath
The path to the JRE ennvironment or full path to (jvm.dll/libjvm.so). If not set the library try to find a suitable version on the system.
public override string JVMPath { get; }
Property Value
JavaDebugOpts
Java Debug options used if EnableDebug is true
public override string JavaDebugOpts { get; }
Property Value
JavaDebugPort
Java Debug Port
public override short JavaDebugPort { get; }
Property Value
JmxPort
The JMX Port to use
public override short? JmxPort { get; }
Property Value
LicensePath
The path where is located the license file
public override string LicensePath { get; }
Property Value
LogClassPath
Set to true to print ClassPath
public virtual bool LogClassPath { get; }
Property Value
Options
Adds options to the JVM
protected abstract IDictionary<string, string> Options { get; }
Property Value
ParsedArgs
Arguments parsed
public IEnumerable<IArgumentMetadataParsed> ParsedArgs { get; }
Property Value
PathToParse
A list of paths to be used in initialization of JVM ClassPath
protected virtual IList<string> PathToParse { get; }
Property Value
WriteEventOrExceptionOnCmdLine
Set to true to show events from the underlying JCOBridge engine
public virtual bool WriteEventOrExceptionOnCmdLine { get; }
Property Value
Methods
AddJVMOption(string, string)
Adds jvmOptionName
, with optional jvmOptionValue
, to ApplicationJVMExtraOptions
public static void AddJVMOption(string jvmOptionName, string jvmOptionValue = null)
Parameters
jvmOptionName
stringThe JVM option name
jvmOptionValue
stringThe value of
jvmOptionName
if it is an option like name=value
EventOrExceptionHandler(EventOrExceptionEventArgs)
Manages events raised from the underlying JCOBridge engine; see SetEventOrExceptionHandler(EventHandler<EventOrExceptionEventArgs>)
protected virtual void EventOrExceptionHandler(EventOrExceptionEventArgs e)
Parameters
e
EventOrExceptionEventArgsThe EventOrExceptionEventArgs with information
HelpInfo(int?)
public static string HelpInfo(int? width = null)
Parameters
width
int?
Returns
Launch(Type, params string[])
Launch the type
with the args
arguments
public static void Launch(Type type, params string[] args)
Parameters
type
TypeThe Type extending IJVMBridgeMain
args
string[]The arguments of the main method
LaunchWithFilteredArgs(Type)
Launch the type
with the FilteredArgs arguments
public static void LaunchWithFilteredArgs(Type type)
Parameters
type
TypeThe Type extending IJVMBridgeMain
LaunchWithFilteredArgs<TClass>()
Launch the TClass
class with the FilteredArgs arguments
public static void LaunchWithFilteredArgs<TClass>() where TClass : IJVMBridgeMain
Type Parameters
TClass
A type which is defined as Main-Class
Launch<TClass>(params string[])
Launch the TClass
class with the args
arguments
public static void Launch<TClass>(params string[] args) where TClass : IJVMBridgeMain
Parameters
args
string[]The arguments of the main method
Type Parameters
TClass
A type which is defined as Main-Class
New(string)
Retrieve the object associated to className
public static dynamic New(string className)
Parameters
className
stringThe java class to be instantiated
Returns
- dynamic
The instance associated to the requested
className
New(string, params object[])
Retrieve the object associated to className
public static dynamic New(string className, params object[] args)
Parameters
Returns
- dynamic
The instance associated to the requested
className
PreInitialization(ref string, ref Version)
Override the method to setup some information, this is the first virtual method invoked: some settings can be applied here like SetEventOrExceptionHandler(EventHandler<EventOrExceptionEventArgs>)
protected override void PreInitialization(ref string scopeOn, ref Version scopeOnVersion)
Parameters
scopeOn
stringThe value to return to override the value of MASES.JCOBridge.C2JBridge.SetupJVMWrapper.ScopedOn
scopeOnVersion
VersionThe value to return to override the value of MASES.JCOBridge.C2JBridge.SetupJVMWrapper.ScopedOnVersion
ProcessCommandLine()
Process command line arguments
protected override string[] ProcessCommandLine()
Returns
- string[]
The filtered residual arguments
ReplaceEnvironmentVariable(string)
Replace environment variable in item
public static string ReplaceEnvironmentVariable(string item)
Parameters
item
stringThe string where the environemnt variables shall be replaced
Returns
- string
The string with replaced environment varibales
Remarks
Each environment variable is expected in the form $(ENV_VAR)