com.ibm.di.server
Class RS

java.lang.Object
  extended by java.lang.Thread
      extended by com.ibm.di.server.RS
All Implemented Interfaces:
RSInterface, Runnable

public class RS
extends Thread
implements RSInterface

This is the main TDI class that forks off new threads to run AssemblyLines and EventHandlers.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String CL_AL_DEBUG
           
static String CL_CONFIG
           
static String CL_CONFIG_DRIVER
           
static String CL_CONFIG_ENCODING
           
static String CL_CONFIG_STDIN
           
static String CL_DEBUG_OPTIONS
           
static String CL_DEBUG_PORT
           
static String CL_DISABLE_REMOTE_API
           
static String CL_DUMP_PERFPROPS
           
static String CL_DUMP_PROPS
           
static String CL_EH_DEBUG
           
static String CL_EXECUTE_SCRIPT
           
static String CL_EXT_PROP_FILE
           
static String CL_FORCE_RESET_CHECKPOINT
           
static String CL_IGNORE_GLOBAL_PROPERTIES
          if this option is specified, the server will not read global.properties; solution.properties will still be read if present
static String CL_INTERNAL_CONFIG_NSTANCE_NAME
          This is not a command line option but an internal parameter that lets you start a Config Instance with a name different than the config file name.
static String CL_LOGFILE
           
static String CL_NO_AUTOSTART
           
static String CL_NO_TERMINATE
           
static String CL_PASSWORD
           
static String CL_RUN_DAEMON
           
static String CL_RUN_MODE
           
static String CL_SECURE_MODE
           
static String CL_START_AL
           
static String CL_START_EH
           
static String CL_USAGE
          Command line switches
static String CL_VERSION_INFO
           
static String CL_WAIT
           
static RS gRS
          Global static reference to the master RS object (non-threaded)
static MetamergeConfig gSysConfig
          This is the templates configuration file loaded from the rs.jar file
 long mmReloaded
           
 long mmServerStarted
          Time we started
 long mmStarted
           
 Hashtable params
          This table holds the command line params.
static String PROP_CONFIG_ENCODING
          System property that specifies the encoding to be used when reading/writing configuration files.
static String PROP_SECURE_MODE
          System property that specifies whether the Server is run in secure mode.
static String PROP_SERVER_KEY_ALIAS
           
static String PROP_SERVER_KEYSTORE
           
static String PROPERTY_JVM_SHUTDOWN_HOOK
           
static String PROTECT_PREFIX
           
static String PROTECT_VAL_PREFIX
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
  RS()
          Default constructor
protected RS(String[] args)
           
protected RS(ThreadGroup group, String name)
           
 
Method Summary
 void checkTask(String name)
          Check for existance of "AssemblyLine" name, or throw an exception
 String commandLineParam(String param)
          Returns the value for a command line parameter
 void dump(Object o)
          This methods dumps an object to the log file.
 void dumpEntry(Entry e)
          This methods dumps the contents of an Entry to the log file.
static void encryptPropertiesfile(String path, Log log)
           
 AttributeMapConfig getAttributeMap(String name)
          Returns the the "Attribute Map" entry for a named connector
 String getCommandLineConfigId()
           
 String getConfigPath()
          This method returns the current configuration file path
 Object getConfiguration(String key)
          Returns the entire table or a sub-section of the configuration file.
 ConnectorConfig getConnector(String name)
          Returns the "Connector" entry for name
 ConnectorPool getConnectorPool(String connName)
           
 String[] getConnectorPoolNames()
           
 Throwable getExitError()
          Returns the exit error of the instance
 int getExitStatus()
          Returns the exit code of the instance
 FunctionConfig getFunction(String name)
          Returns the "FunctionConfig" entry for name
 LibraryConfig getLibraries()
          Returns all "Libraries"
 Object getLibrary(String name)
          Returns the the "Java Library" entry for name
static com.ibm.it.rome.xslm.ITLMApplicationLicense getLicense()
          Function to retrieve licence
 Log getLog()
          Returns the Log for the current instance
 String getLogDirectory(Object owner)
          This method returns the default directory path where logfiles are stored.
 MetamergeConfig getMetamergeConfig()
          Returns the config object for this instance
 String getNullBehavior()
          Return the null behavior value from the System.props
 String getNullBehaviorValue()
           
 String getNullDefinition()
          Return the null definition value from the System.props
 String getNullDefinitionValue()
           
 ParserConfig getParser(String name)
          Returns the the "Parser" entry for name
static ReconnectRuleEngine getReconnectRuleEngine()
           
 ScriptConfig getScript(String name)
          Returns the "Script Library" entry for name
static RS getServer()
          Returns the RS instance associated with the current ThreadGroup
static RS getServer(String name)
          Returns a named RS instance
static RS getServerByConfig(MetamergeConfig aConfig)
           
 String getSysProp(String name)
          Returns the value for a system property.
 AssemblyLineConfig getTask(String name)
          Returns the "AssemblyLine" entry
 EventHandlerConfig getTrigger(String name)
          Returns the "EventHandler" entry
 Object invokeServerHook(String name, Object caller, Object userInfo)
          Invokes a server hook.
static boolean isSecured()
           
 void limitNumberOfThreads()
           
 void logerror(String msg, Throwable error)
           
 void logmsg(String msg)
          This method writes a message to the logfile.
 void logmsg(String level, String msg)
          This method logs a message with the specified level.
static void main(String[] args)
          The main methods creates the Log object and kicks off the main thread.
 void persistConfiguration()
          This method saves the current configuration to disk.
static void prepareSolutionDirectory(Log log)
          Prepare the solution directory (working directory) by ensuring solution.properties is present.
static void registerServer(RS server)
          Registers the config object to be associated with the current ThreadGroup
static void releaseLicense(com.ibm.it.rome.xslm.ITLMApplicationLicense license)
          Function to release licence
 void reload()
          This method reloads the configuration file.
 AssemblyLine restartAL(String assemblyLine, String checkpointID)
          Restart the AssemblyLine given by the parameter.
 void run()
          Thread main
 int runServer()
           
 void setConfigPath(String path)
          This method sets the current configuration file path.
 void setConfiguration(MetamergeConfig config)
           
static void setGlobalProperties()
           
 void setMetamergeConfig(MetamergeConfig config)
          Sets the given configuration to this instance.
static boolean shouldCreateSolutionProps()
           
static void showLogHeader(Log log)
          This method writes a log header to the Log object.
 void shutdownServer()
          Set the shutdown request flag with exit code 0
 void shutdownServer(int aExitCode)
          Set the shutdown request flag with exit code
 AssemblyLine startAL(String assemblyLine)
          Start named AssemblyLine
 AssemblyLine startAL(String assemblyLine, Connector connector, Entry work)
          Start named AssemblyLine providing an initial work entry and a connector
 AssemblyLine startAL(String assemblyLine, int runMode)
          Start named AssemblyLine
 AssemblyLine startAL(String assemblyLine, Object io)
          Start named AssemblyLine providing a parameter
 AssemblyLine startAL(String assemblyLine, Object io, org.apache.log4j.Appender logAppender)
          Start named AssemblyLine providing a parameter
 AssemblyLine startAL(TaskCallBlock tcb)
          Start the AssemblyLine named in the TCB
 AssemblyLine startALDebug(String assemblyLine, int port)
          Start named AssemblyLine in debug mode.
 Thread startEH(String name)
          This method starts an EventHandler.
 Object startEventTrigger(String name, boolean checkEnabled)
          This method starts an EventHandler.
 Object startEventTrigger(String name, boolean checkEnabled, int debugPort)
          This method starts an EventHandler.
 Object startEventTrigger(String name, boolean checkEnabled, int debugPort, int runMode)
          This method starts an EventHandler.
 Object startEventTrigger(String name, boolean checkEnabled, int debugPort, int runMode, EventHandlerListener eventHandlerListener, boolean deliverLogs)
           
 void startEventTriggers()
          This methods starts all EventHandlers that are configured with autoStart = true.
static RS startServer(String[] args)
          Calls startServer using the config URL as the unique thread group name.
static RS startServer(String groupName, Hashtable params)
          Starts a new server instance.
static RS startServer(String config, String assemblyLines, String eventHandlers)
          Calls startServer using the config URL as the unique thread group name.
static RS startServer(String config, String assemblyLines, String eventHandlers, String passw)
          Calls startServer using the config URL as the unique thread group name.
static RS startServer(String config, String assemblyLines, String eventHandlers, String passw, boolean dontTerminate)
          Calls startServer using the config URL as the unique thread group name.
 int stopAL(String name)
          Stop named AssemblyLine
 int stopEH(String name)
          Stop named EventHandler
static void unregisterServer(RS server)
          Registers the config object to be associated with the current ThreadGroup
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CL_USAGE

public static final String CL_USAGE
Command line switches

See Also:
Constant Field Values

CL_START_AL

public static final String CL_START_AL
See Also:
Constant Field Values

CL_START_EH

public static final String CL_START_EH
See Also:
Constant Field Values

CL_NO_AUTOSTART

public static final String CL_NO_AUTOSTART
See Also:
Constant Field Values

CL_CONFIG

public static final String CL_CONFIG
See Also:
Constant Field Values

CL_WAIT

public static final String CL_WAIT
See Also:
Constant Field Values

CL_PASSWORD

public static final String CL_PASSWORD
See Also:
Constant Field Values

CL_DUMP_PROPS

public static final String CL_DUMP_PROPS
See Also:
Constant Field Values

CL_VERSION_INFO

public static final String CL_VERSION_INFO
See Also:
Constant Field Values

CL_EXECUTE_SCRIPT

public static final String CL_EXECUTE_SCRIPT
See Also:
Constant Field Values

CL_RUN_DAEMON

public static final String CL_RUN_DAEMON
See Also:
Constant Field Values

CL_SECURE_MODE

public static final String CL_SECURE_MODE
See Also:
Constant Field Values

CL_EXT_PROP_FILE

public static final String CL_EXT_PROP_FILE
See Also:
Constant Field Values

CL_DEBUG_OPTIONS

public static final String CL_DEBUG_OPTIONS
See Also:
Constant Field Values

CL_AL_DEBUG

public static final String CL_AL_DEBUG
See Also:
Constant Field Values

CL_EH_DEBUG

public static final String CL_EH_DEBUG
See Also:
Constant Field Values

CL_DEBUG_PORT

public static final String CL_DEBUG_PORT
See Also:
Constant Field Values

CL_CONFIG_STDIN

public static final String CL_CONFIG_STDIN
See Also:
Constant Field Values

CL_FORCE_RESET_CHECKPOINT

public static final String CL_FORCE_RESET_CHECKPOINT
See Also:
Constant Field Values

CL_RUN_MODE

public static final String CL_RUN_MODE
See Also:
Constant Field Values

CL_CONFIG_DRIVER

public static final String CL_CONFIG_DRIVER
See Also:
Constant Field Values

CL_LOGFILE

public static final String CL_LOGFILE
See Also:
Constant Field Values

CL_NO_TERMINATE

public static final String CL_NO_TERMINATE
See Also:
Constant Field Values

CL_DISABLE_REMOTE_API

public static final String CL_DISABLE_REMOTE_API
See Also:
Constant Field Values

CL_CONFIG_ENCODING

public static final String CL_CONFIG_ENCODING
See Also:
Constant Field Values

CL_DUMP_PERFPROPS

public static final String CL_DUMP_PERFPROPS
See Also:
Constant Field Values

CL_IGNORE_GLOBAL_PROPERTIES

public static final String CL_IGNORE_GLOBAL_PROPERTIES
if this option is specified, the server will not read global.properties; solution.properties will still be read if present

See Also:
Constant Field Values

CL_INTERNAL_CONFIG_NSTANCE_NAME

public static final String CL_INTERNAL_CONFIG_NSTANCE_NAME
This is not a command line option but an internal parameter that lets you start a Config Instance with a name different than the config file name. It is used for starting temporaty Config Instances on load for editing.

See Also:
Constant Field Values

PROPERTY_JVM_SHUTDOWN_HOOK

public static final String PROPERTY_JVM_SHUTDOWN_HOOK
See Also:
Constant Field Values

PROTECT_PREFIX

public static final String PROTECT_PREFIX
See Also:
Constant Field Values

PROTECT_VAL_PREFIX

public static final String PROTECT_VAL_PREFIX
See Also:
Constant Field Values

PROP_CONFIG_ENCODING

public static final String PROP_CONFIG_ENCODING
System property that specifies the encoding to be used when reading/writing configuration files.

See Also:
Constant Field Values

PROP_SECURE_MODE

public static final String PROP_SECURE_MODE
System property that specifies whether the Server is run in secure mode.

See Also:
Constant Field Values

PROP_SERVER_KEYSTORE

public static final String PROP_SERVER_KEYSTORE
See Also:
Constant Field Values

PROP_SERVER_KEY_ALIAS

public static final String PROP_SERVER_KEY_ALIAS
See Also:
Constant Field Values

gSysConfig

public static MetamergeConfig gSysConfig
This is the templates configuration file loaded from the rs.jar file


params

public Hashtable params
This table holds the command line params.


mmServerStarted

public long mmServerStarted
Time we started


mmStarted

public long mmStarted

mmReloaded

public long mmReloaded

gRS

public static RS gRS
Global static reference to the master RS object (non-threaded)

Constructor Detail

RS

public RS()
Default constructor


RS

protected RS(String[] args)

RS

protected RS(ThreadGroup group,
             String name)
Method Detail

releaseLicense

public static void releaseLicense(com.ibm.it.rome.xslm.ITLMApplicationLicense license)
Function to release licence


getLicense

public static com.ibm.it.rome.xslm.ITLMApplicationLicense getLicense()
                                                              throws Exception
Function to retrieve licence

Throws:
Exception

main

public static void main(String[] args)
                 throws Exception
The main methods creates the Log object and kicks off the main thread.

Throws:
Exception

isSecured

public static boolean isSecured()

getReconnectRuleEngine

public static ReconnectRuleEngine getReconnectRuleEngine()

setConfiguration

public void setConfiguration(MetamergeConfig config)

getConfiguration

public Object getConfiguration(String key)
Returns the entire table or a sub-section of the configuration file.

Specified by:
getConfiguration in interface RSInterface
Parameters:
key - Name of subsection or null
Returns:
The entire table (key == null) or section in table

getLibrary

public Object getLibrary(String name)
Returns the the "Java Library" entry for name

Specified by:
getLibrary in interface RSInterface
Parameters:
name - The java library name
Returns:
The section for name

getFunction

public FunctionConfig getFunction(String name)
                           throws Exception
Returns the "FunctionConfig" entry for name

Specified by:
getFunction in interface RSInterface
Parameters:
name - The name of the function
Returns:
The function config object
Throws:
Exception

getLibraries

public LibraryConfig getLibraries()
Returns all "Libraries"

Specified by:
getLibraries in interface RSInterface
Returns:
The entire list of Libraries

getScript

public ScriptConfig getScript(String name)
Returns the "Script Library" entry for name

Specified by:
getScript in interface RSInterface
Parameters:
name - The script library name
Returns:
The section for name

getConnector

public ConnectorConfig getConnector(String name)
Returns the "Connector" entry for name

Specified by:
getConnector in interface RSInterface
Parameters:
name - The connector name
Returns:
The section from either the file configuration or the templates configuration

getParser

public ParserConfig getParser(String name)
Returns the the "Parser" entry for name

Specified by:
getParser in interface RSInterface
Parameters:
name - The parser name
Returns:
The section either the file configuration or the templates configuration

getAttributeMap

public AttributeMapConfig getAttributeMap(String name)
Returns the the "Attribute Map" entry for a named connector

Specified by:
getAttributeMap in interface RSInterface
Parameters:
name - The connector name
Returns:
The attribute map section

getTask

public AssemblyLineConfig getTask(String name)
Returns the "AssemblyLine" entry

Specified by:
getTask in interface RSInterface
Parameters:
name - The AssemblyLine name
Returns:
The configuration for the AssemblyLine

checkTask

public void checkTask(String name)
               throws Exception
Check for existance of "AssemblyLine" name, or throw an exception

Parameters:
name - The AssemblyLine name
Throws:
Exception

getTrigger

public EventHandlerConfig getTrigger(String name)
Returns the "EventHandler" entry

Specified by:
getTrigger in interface RSInterface
Parameters:
name - The EventHandler name
Returns:
The EventHandler section

getSysProp

public String getSysProp(String name)
Returns the value for a system property. The system properties include all Java system properties as well as Metamerge's own properties.

Specified by:
getSysProp in interface RSInterface
Parameters:
name - The system property name
Returns:
The value for the property

runServer

public int runServer()

restartAL

public AssemblyLine restartAL(String assemblyLine,
                              String checkpointID)
                       throws Exception
Restart the AssemblyLine given by the parameter. See also the introduction to AssemblyLines.

Specified by:
restartAL in interface RSInterface
Parameters:
assemblyLine - The name identifying the AssemblyLine to start
checkpointID - The checkpoint identifier
Throws:
Any - uncaught exception
Exception

startAL

public AssemblyLine startAL(String assemblyLine)
                     throws Exception
Start named AssemblyLine

Specified by:
startAL in interface RSInterface
Parameters:
assemblyLine - Name of AssemblyLine to start
Returns:
The AssemblyLine Thread object
Throws:
Exception

startAL

public AssemblyLine startAL(String assemblyLine,
                            int runMode)
                     throws Exception
Start named AssemblyLine

Parameters:
assemblyLine - Name of AssemblyLine to start
Returns:
The AssemblyLine Thread object
Throws:
Exception

startALDebug

public AssemblyLine startALDebug(String assemblyLine,
                                 int port)
                          throws Exception
Start named AssemblyLine in debug mode.

Parameters:
assemblyLine - Name of AssemblyLine to start
Returns:
The AssemblyLine Thread object
Throws:
Exception

startAL

public AssemblyLine startAL(String assemblyLine,
                            Connector connector,
                            Entry work)
                     throws Exception
Start named AssemblyLine providing an initial work entry and a connector

Specified by:
startAL in interface RSInterface
Parameters:
assemblyLine - Name of AssemblyLine to start
connector - The runtime connector (or null)
work - The initial work entry to the AssemblyLine (or null)
Returns:
The AssemblyLine Thread object
Throws:
Exception

startAL

public AssemblyLine startAL(TaskCallBlock tcb)
                     throws Exception
Start the AssemblyLine named in the TCB

Parameters:
tcb - The TaskCallBlock
Returns:
The AssemblyLine Thread object
Throws:
Exception

startAL

public AssemblyLine startAL(String assemblyLine,
                            Object io)
                     throws Exception
Start named AssemblyLine providing a parameter

Specified by:
startAL in interface RSInterface
Parameters:
assemblyLine - Name of AssemblyLine to start
io - Parameter to AssemblyLine (Work Entry, Connector or Vector with both )
Returns:
The AssemblyLine Thread object
Throws:
Exception

startAL

public AssemblyLine startAL(String assemblyLine,
                            Object io,
                            org.apache.log4j.Appender logAppender)
                     throws Exception
Start named AssemblyLine providing a parameter

Parameters:
assemblyLine - Name of AssemblyLine to start
io - Parameter to AssemblyLine (Work Entry, Connector or Vector with both )
logAppender - A Log4J Appender to use with the AssemblyLine
Returns:
The AssemblyLine Thread object
Throws:
Exception

stopAL

public int stopAL(String name)
Stop named AssemblyLine

Parameters:
name - Name of AssemblyLine to stop
Returns:
The number of AssemblyLines we tried to stop

startEH

public Thread startEH(String name)
               throws Exception
This method starts an EventHandler.

Parameters:
name - The EventHandler name
Returns:
The EventHandler thread object
Throws:
Exception - if the EventHandler cannot be found, or has no associated java class

stopEH

public int stopEH(String name)
Stop named EventHandler

Parameters:
name - Name of EventHandler to stop
Returns:
The number of EventHandlers we tried to stop

startEventTriggers

public void startEventTriggers()
This methods starts all EventHandlers that are configured with autoStart = true.


startEventTrigger

public Object startEventTrigger(String name,
                                boolean checkEnabled)
                         throws Exception
This method starts an EventHandler.

Specified by:
startEventTrigger in interface RSInterface
Parameters:
name - The EventHandler name
checkEnabled - If false, the autoStart flag is overridden
Returns:
The EventHandler thread object
Throws:
Exception

startEventTrigger

public Object startEventTrigger(String name,
                                boolean checkEnabled,
                                int debugPort)
                         throws Exception
This method starts an EventHandler.

Parameters:
name - The EventHandler name
checkEnabled - If false, the autoStart flag is overridden
debugPort - If true the EH is debugged
Returns:
The EventHandler thread object
Throws:
Exception

startEventTrigger

public Object startEventTrigger(String name,
                                boolean checkEnabled,
                                int debugPort,
                                int runMode)
                         throws Exception
This method starts an EventHandler.

Parameters:
name - The EventHandler name
checkEnabled - If false, the autoStart flag is overridden
debugPort - If true the EH is debugged
runMode - The mode to run in.
Returns:
The EventHandler thread object
Throws:
Exception

startEventTrigger

public Object startEventTrigger(String name,
                                boolean checkEnabled,
                                int debugPort,
                                int runMode,
                                EventHandlerListener eventHandlerListener,
                                boolean deliverLogs)
                         throws Exception
Throws:
Exception

logmsg

public void logmsg(String msg)
This method writes a message to the logfile.

Specified by:
logmsg in interface RSInterface
Parameters:
msg - The message

logmsg

public void logmsg(String level,
                   String msg)
This method logs a message with the specified level.

Specified by:
logmsg in interface RSInterface
Parameters:
level - Loglevel. Legal values are FATAL, ERROR, WARN, INFO, DEBUG. Unrecognized keyword means DEBUG.
msg - The message

logerror

public void logerror(String msg,
                     Throwable error)

dump

public void dump(Object o)
This methods dumps an object to the log file.

Specified by:
dump in interface RSInterface
Parameters:
o - The object to dump
See Also:
RSInterface.dumpEntry(com.ibm.di.entry.Entry)

dumpEntry

public void dumpEntry(Entry e)
This methods dumps the contents of an Entry to the log file.

Specified by:
dumpEntry in interface RSInterface
Parameters:
e - The entry to dump
See Also:
Entry

reload

public void reload()
            throws Exception
This method reloads the configuration file.

Specified by:
reload in interface RSInterface
Throws:
Exception

getConfigPath

public String getConfigPath()
This method returns the current configuration file path

Specified by:
getConfigPath in interface RSInterface
Returns:
The configuration file path as a string

setConfigPath

public void setConfigPath(String path)
This method sets the current configuration file path. This will be used when a persistConfiguration is requested.

Specified by:
setConfigPath in interface RSInterface
Parameters:
path - The new configuration path

persistConfiguration

public void persistConfiguration()
                          throws Exception
This method saves the current configuration to disk.

Specified by:
persistConfiguration in interface RSInterface
Throws:
Exception

showLogHeader

public static void showLogHeader(Log log)
This method writes a log header to the Log object.

Parameters:
log - The log output object

getLogDirectory

public String getLogDirectory(Object owner)
This method returns the default directory path where logfiles are stored. TODO: implement this

Parameters:
owner - The Java class or string denoting the type (e.g. AssemblyLine, EventHandler)
Returns:
The log file directory

shutdownServer

public void shutdownServer()
Set the shutdown request flag with exit code 0

Specified by:
shutdownServer in interface RSInterface

shutdownServer

public void shutdownServer(int aExitCode)
Set the shutdown request flag with exit code

Specified by:
shutdownServer in interface RSInterface

getNullBehavior

public String getNullBehavior()
Return the null behavior value from the System.props

Specified by:
getNullBehavior in interface RSInterface

getNullBehaviorValue

public String getNullBehaviorValue()
Specified by:
getNullBehaviorValue in interface RSInterface

getNullDefinition

public String getNullDefinition()
Return the null definition value from the System.props

Specified by:
getNullDefinition in interface RSInterface

getNullDefinitionValue

public String getNullDefinitionValue()
Specified by:
getNullDefinitionValue in interface RSInterface

limitNumberOfThreads

public void limitNumberOfThreads()

setGlobalProperties

public static void setGlobalProperties()

shouldCreateSolutionProps

public static boolean shouldCreateSolutionProps()

prepareSolutionDirectory

public static void prepareSolutionDirectory(Log log)
                                     throws Exception
Prepare the solution directory (working directory) by ensuring solution.properties is present.

Throws:
Exception

encryptPropertiesfile

public static void encryptPropertiesfile(String path,
                                         Log log)

run

public void run()
Thread main

Specified by:
run in interface Runnable
Overrides:
run in class Thread

commandLineParam

public String commandLineParam(String param)
Returns the value for a command line parameter


getMetamergeConfig

public MetamergeConfig getMetamergeConfig()
Returns the config object for this instance

Specified by:
getMetamergeConfig in interface RSInterface
Returns:
the configuration object of this instance.

setMetamergeConfig

public void setMetamergeConfig(MetamergeConfig config)
Sets the given configuration to this instance.

Specified by:
setMetamergeConfig in interface RSInterface
Parameters:
config - The configuration object to assign to the instance.

getLog

public Log getLog()
Returns the Log for the current instance


getExitStatus

public int getExitStatus()
Returns the exit code of the instance


getExitError

public Throwable getExitError()
Returns the exit error of the instance


getServerByConfig

public static RS getServerByConfig(MetamergeConfig aConfig)

getServer

public static RS getServer()
Returns the RS instance associated with the current ThreadGroup


getServer

public static RS getServer(String name)
Returns a named RS instance


registerServer

public static void registerServer(RS server)
Registers the config object to be associated with the current ThreadGroup


unregisterServer

public static void unregisterServer(RS server)
Registers the config object to be associated with the current ThreadGroup


startServer

public static RS startServer(String[] args)
                      throws Exception
Calls startServer using the config URL as the unique thread group name.

Throws:
Exception

startServer

public static RS startServer(String config,
                             String assemblyLines,
                             String eventHandlers)
                      throws Exception
Calls startServer using the config URL as the unique thread group name.

Throws:
Exception

startServer

public static RS startServer(String config,
                             String assemblyLines,
                             String eventHandlers,
                             String passw)
                      throws Exception
Calls startServer using the config URL as the unique thread group name.

Throws:
Exception

startServer

public static RS startServer(String config,
                             String assemblyLines,
                             String eventHandlers,
                             String passw,
                             boolean dontTerminate)
                      throws Exception
Calls startServer using the config URL as the unique thread group name.

Throws:
Exception

startServer

public static RS startServer(String groupName,
                             Hashtable params)
                      throws Exception
Starts a new server instance.

Parameters:
groupName - The unique name for the server instance
params - Hashtable of assemblylines to start (same syntax as command line)
Throws:
Throws - an exception if there is another instance using the same groupName
Exception

getCommandLineConfigId

public String getCommandLineConfigId()

invokeServerHook

public Object invokeServerHook(String name,
                               Object caller,
                               Object userInfo)
Invokes a server hook.

Parameters:
name - The name of the hook
caller - The object invoking the hook
userInfo - Arbitrary information to the hook from the caller

getConnectorPoolNames

public String[] getConnectorPoolNames()

getConnectorPool

public ConnectorPool getConnectorPool(String connName)