Package com.smeup.jardis.jariko.endpoint
Class Jardis
- java.lang.Object
-
- com.smeup.jardis.jariko.endpoint.Jardis
-
public class Jardis extends Object
- Author:
- lana
-
-
Field Summary
Fields Modifier and Type Field Description static StringLOCAL_WORKSPACE_PROPERTY_AS_USERIf local workspace property is set as follows local workspace will be assumed from the user workspacestatic StringLOCAL_WORKSPACE_PROPERTY_DEFAULTDefault value for local workspace property.static StringLOCAL_WORKSPACE_PROPERTY_NAMEstatic StringPATH_FOR_RPGstatic StringRESOURCES_CLASSLOADER_FACTORY
-
Constructor Summary
Constructors Constructor Description Jardis(com.smeup.jardis.endpoint.JardisEndPoint jardisEndPoint, Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace, Consumer<JarikoLanguageConfig> languageConfigConsumer)Create an instance of JardisJardis(Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace)Creates an instance of Jardis with the following default parameters:jardisEndPointset toJardisServerlanguageConfigConsumerset tonullFor the meaning of other parameters:Jardis(Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace, Consumer<JarikoLanguageConfig> languageConfigConsumer)Creates an instance of Jardis with the following default parameters:jardisEndPointset toJardisServerFor the meaning of other parameters:
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebuggable(String name, Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> contextSupplier)Use this method if you want to enable debugging in attach modestatic voidmain(String[] args)Starts the Jardis server.voidshutdown()Shudowns the endpointvoidstart()Starts the endpoint
-
-
-
Field Detail
-
LOCAL_WORKSPACE_PROPERTY_NAME
public static final String LOCAL_WORKSPACE_PROPERTY_NAME
- See Also:
- Constant Field Values
-
PATH_FOR_RPG
public static final String PATH_FOR_RPG
- See Also:
- Constant Field Values
-
RESOURCES_CLASSLOADER_FACTORY
public static final String RESOURCES_CLASSLOADER_FACTORY
- See Also:
- Constant Field Values
-
LOCAL_WORKSPACE_PROPERTY_DEFAULT
public static final String LOCAL_WORKSPACE_PROPERTY_DEFAULT
Default value for local workspace property. Ig you set default local workspace is set toJarikoConsts.DEFAULT_LOCAL_WORKSPACE- See Also:
- Constant Field Values
-
LOCAL_WORKSPACE_PROPERTY_AS_USER
public static final String LOCAL_WORKSPACE_PROPERTY_AS_USER
If local workspace property is set as follows local workspace will be assumed from the user workspace- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Jardis
public Jardis(com.smeup.jardis.endpoint.JardisEndPoint jardisEndPoint, Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace, Consumer<JarikoLanguageConfig> languageConfigConsumer)Create an instance of Jardis- Parameters:
jardisEndPoint- An endpoint instancejarikoDebuggeeContextSupplier- Has to supply debugge context for the program launched from VSC.localWorkspace- A source root dir. RPGLE programs must be placed into path:<localWorkspace>/rpg. Acceptsnullin this case it assumes that user workspace and local workspace are the same, for example when you are using vscode where it runs Jardis, or if you are using SSH Remote extension.languageConfigConsumer- If passed allows to associate a logic on JarikoLanguageConfig creation. Allows null.- See Also:
start(),shutdown()
-
Jardis
public Jardis(Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace) throws IOException
Creates an instance of Jardis with the following default parameters:jardisEndPointset toJardisServerlanguageConfigConsumerset tonull
-
Jardis
public Jardis(Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> jarikoDebuggeeContextSupplier, Path localWorkspace, Consumer<JarikoLanguageConfig> languageConfigConsumer) throws IOException
Creates an instance of Jardis with the following default parameters:jardisEndPointset toJardisServer
-
-
Method Detail
-
start
public void start() throws IOExceptionStarts the endpoint- Throws:
IOException
-
shutdown
public void shutdown()
Shudowns the endpoint
-
debuggable
public void debuggable(String name, Function<com.smeup.jardis.core.JardisSession,JarikoDebugeeContext> contextSupplier)
Use this method if you want to enable debugging in attach mode- Parameters:
name- The debuggable programcontextSupplier- Context supplier needed for JarikoDebugee
-
main
public static void main(String[] args) throws Exception
Starts the Jardis server. Accepts the follows system properties:JardisServerConfiguration.PORT_PROPERTY_NAMEJardisServerConfiguration.SHUTDOWN_PORT_PROPERTY_NAMEJardisServerConfiguration.SHUTDOWN_PASSWORD_PROPERTY_NAMELOCAL_WORKSPACE_PROPERTY_NAME
- Throws:
Exception
-
-